Portfolio Skill
SkillDocs & knowledgePortfolio system knowledge base. Use when: position queries, routing strategy questions, provider integration. Not for: general code exploration (use code-explore), code review (use codex-code-review). Output: domain-specific analysis + recommendations.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Portfolio Skill skill
What this skill tells your AI
The instructions your AI receives, as published by sd0xdev/sd0x-harness in skills/portfolio/SKILL.md and read by ahel’s review.
Trigger
- Keywords: Portfolio, portfolio, position, {PRIMARY_PROVIDER}, protocol, lending, staking, liquidity
When NOT to Use
- General token queries (not Portfolio positions)
- Transaction building (use corresponding provider)
- Non-portfolio related API issues
Core Files
| Type | File | Purpose |
|---|---|---|
| Controller | src/entity/portfolio/portfolio.controller.ts | REST API |
| Router | src/service/portfolio/source-router/*.service.ts | Routing orchestration |
| Client | src/service/portfolio/providers/{provider}/*.ts | {PRIMARY_PROVIDER} integration |
| Aggregator | src/service/portfolio/aggregation/*.service.ts | Aggregation computation |
| DTO | src/dto/portfolio/position.types.ts | Position model |
API Overview
Base: /onchain/v1/portfolio
| Endpoint | Method | Purpose |
|---|---|---|
/positions | POST | Get portfolio positions |
/chains | GET | Supported chains list |
/protocols | GET | Supported protocols list |
Output
- Domain-specific query results with code references
- Analysis and recommendations based on current architecture
Verification
- Position data correctly normalized
- Cache hit/miss working properly
- Aggregation calculations accurate
Development Guide
Add Protocol Support
- Check if {PRIMARY_PROVIDER} supports it
- If custom build needed: implement
PortfolioPositionExtractor+ register + configure routing
Add Data Source
- Implement
ProviderClient+Adapter - Register with
SourceRouter - Configure routing strategy
Debug
redis-cli keys "portfolio:{provider}:*"
redis-cli get "portfolio:{provider}:positions:0x...:v2:..."
curl -X POST /positions -d '{"isForceRefresh": true, ...}'
References
references/architecture.md- System architecture + cache strategyreferences/api.md- API reference + data models- @docs/features/portfolio/ - Detailed documentation
Tests
| Type | Location |
|---|---|
| Unit | test/unit/service/portfolio/ |
| Integration | test/integration/portfolio/ |
Examples
Input: How to query portfolio positions?
Action: Explain POST /positions API + routing strategy
Input: How does {PRIMARY_PROVIDER} integration work?
Action: Explain {PRIMARY_PROVIDER}Client + {PRIMARY_PROVIDER}Adapter flow
Signals
- GitHub stars
- 188
- Forks
- 24
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
portfolio-sd0xdev- Source
- github.com/sd0xdev/sd0x-harness