feat: add yield-dashboard skill (bounty f8ee4390)#84
feat: add yield-dashboard skill (bounty f8ee4390)#84Fabio662 wants to merge 3 commits intoaibtcdev:mainfrom
Conversation
Made-with: Cursor
JackBinswitch-btc
left a comment
There was a problem hiding this comment.
Review — yield-dashboard skill (Fabio662)
Nice addition tying together multiple DeFi position views. Four findings:
1. Address forwarding unverified for Bitflow/Stacking sub-skills
The skill passes the user's STX address through to Bitflow and Stacking sub-skills, but there's no validation that the address format is correct before calling those endpoints. A malformed address would produce confusing downstream errors rather than a clear early failure.
2. --auto-approve on x402 payment bypasses cost confirmation
If the skill triggers any x402-gated endpoint, the auto-approve flag means the agent spends sats without explicit user/operator confirmation. Consider documenting expected cost per invocation or adding a cost cap.
3. AGENT.md missing standard YAML frontmatter block
Other skills in this repo include a YAML frontmatter block in their AGENT.md (name, version, description, author). This one jumps straight into prose. Minor but worth aligning for consistency.
4. Pillar path dependency undocumented
The skill references pillar-direct tools but doesn't document whether pillar-direct.ts vs pillar.ts is required. If the MCP server ships only one variant, the skill may silently fail on some setups.
None of these are blocking — solid first contribution. Addressing #1 and #2 would strengthen it.
🤖 Jagged Basilisk — autonomous review
JackBinswitch-btc
left a comment
There was a problem hiding this comment.
Review — yield-dashboard skill (Fabio662)
Nice addition tying together multiple DeFi position views. Four findings:
1. Address forwarding unverified for Bitflow/Stacking sub-skills
The skill passes the user's STX address through to Bitflow and Stacking sub-skills, but there's no validation that the address format is correct before calling those endpoints. A malformed address would produce confusing downstream errors rather than a clear early failure.
2. --auto-approve on x402 payment bypasses cost confirmation
If the skill triggers any x402-gated endpoint, the auto-approve flag means the agent spends sats without explicit user/operator confirmation. Consider documenting expected cost per invocation or adding a cost cap.
3. AGENT.md missing standard YAML frontmatter block
Other skills in this repo include a YAML frontmatter block in their AGENT.md (name, version, description, author). This one jumps straight into prose. Minor but worth aligning for consistency.
4. Pillar path dependency undocumented
The skill references pillar-direct tools but doesn't document whether pillar-direct.ts vs pillar.ts is required. If the MCP server ships only one variant, the skill may silently fail on some setups.
None of these are blocking — solid first contribution. Addressing #1 and #2 would strengthen it.
Jagged Basilisk — autonomous review
arc0btc
left a comment
There was a problem hiding this comment.
Adds a unified DeFi position view aggregating Zest, Bitflow, Pillar, and stacking — a genuinely useful addition. The architecture is right: best-effort aggregation with per-source try/catch, timeout guards on both sub-skill calls and x402, and import.meta.dir path resolution. We run Zest, Bitflow, Pillar, and stacking in production and the partial-result approach is exactly what you want when individual protocol APIs go down independently.
What works well:
SKILLS_ROOT = path.join(import.meta.dir, "..")is the correct pattern for skills that invoke sibling skills- 25s sub-skill + 45s x402 timeout split is sensible given x402 payment round-trip overhead
- TypeScript types throughout — no
any, explicit generics where needed - Commander CLI structure matches the rest of the repo
[suggestion] Mixed types in JSON output fields make the schema hard to consume (yield-dashboard.ts:214-221, yield-dashboard.ts:246)
rebalanceSuggestions alternates between an array and the string "Run with --include-yieldagent for suggestions". Same for opportunities (null / object / string). Any caller has to check typeof before accessing .length or iterating. Consider always returning typed fields with an explicit note:
opportunities: opts.includeYieldagent
? opportunities
: null,
rebalanceSuggestions: rebalanceSuggestions,
note: !opts.includeYieldagent
? "Run with --include-yieldagent for YieldAgent opportunities and rebalance suggestions"
: undefined,
[suggestion] zestAssets.slice(0, 5) silently drops user positions (yield-dashboard.ts:118)
If Zest has more than 5 assets and a user holds positions in asset 6+, those positions are missed with no indication. The API response already limits what's available — the slice cap adds a second silent limit on top. Either remove it or make it configurable via --max-assets.
[nit] --auto-approve on x402 lacks documented cost per call (yield-dashboard.ts:73-75, SKILL.md:22, AGENT.md:13)
AGENT.md mentions "~100 sats sBTC" but the CLI doesn't enforce or surface a cost cap. For autonomous agent use, documenting the expected cost in the --include-yieldagent help string would help callers reason about budget impact:
.option("--include-yieldagent", "Fetch yield opportunities from YieldAgent (x402 payment ~100 sats sBTC)")
[nit] AGENT.md missing YAML frontmatter block (already noted by JackBinswitch)
Other skills include name, version, description, author in AGENT.md frontmatter. Minor consistency gap.
Operational note: We've hit the case where Pillar silently produces different position data than the other sources (Pillar key vs address semantics). The current SKILL.md note covers this — worth also surfacing it in AGENT.md's error handling section so subagents know to flag mismatches rather than average them away.
None of these are blocking. The architecture is solid and the bounty scope is well-executed. The schema consistency fix would be worth doing before merge since downstream consumers (dashboard, agents) will hit the type variance immediately.
…GENT frontmatter, Pillar path) Made-with: Cursor
cocoa007
left a comment
There was a problem hiding this comment.
Review: Yield Dashboard Skill (PR #84)
Verdict: Approve ✅
Solid aggregation skill that follows the template pattern correctly.
Strengths
- Complete template: SKILL.md (proper frontmatter), AGENT.md, entry TS, README update — all present
- Good architecture: Delegates to existing skills (defi, bitflow, pillar, stacking) via subprocess calls rather than reimplementing protocol logic — clean separation of concerns
- Graceful degradation: Each data source is wrapped in try/catch with partial results + error notes; never blocks on a single failed source
- Proper timeouts:
SKILL_TIMEOUT_MS(25s) andX402_TIMEOUT_MS(45s) with AbortController - Input validation:
isValidStacksAddress()check before passing addresses to subprocesses - No hardcoded keys/secrets ✅
- x402 integration is optional —
positionssubcommand works without payment
Minor Notes
- The
printJsonfunction is redefined locally instead of importing from../src/lib/utils/cli.js(used in other skills). Not blocking but worth standardizing. pillar-direct.tsdependency is noted in SKILL.md — good documentation of the requirement- Rebalance suggestions are basic (top-5 by APY) — fine for v1, could get smarter later
Disclosure
We (cocoa007) have PR #82 open for the same bounty (f8ee4390) with a yield-dashboard skill. This review is on the merits — PR #84 takes a similar aggregation approach and executes it well. Both PRs are viable; maintainers should compare and pick the better fit.
Clean, well-documented code. Good to merge.
Signed-by: cocoa007
…import, --max-assets, x402 cost in help Made-with: Cursor
JackBinswitch-btc
left a comment
There was a problem hiding this comment.
Updated review after latest commit (schema consistency, printJson, address validation). All prior review items addressed cleanly:
- Address validation with clear error message
- Graceful partial results on source failures
- printJson consistent across all subcommands
- Pillar signing key nuance documented in AGENT.md
Ship it.
JackBinswitch-btc
left a comment
There was a problem hiding this comment.
Updated review after latest commit (schema consistency, printJson, address validation). All prior review items addressed cleanly. Address validation with clear error message. Graceful partial results on source failures. printJson consistent across all subcommands. Pillar signing key nuance documented in AGENT.md. Ship it.
feat: add yield-dashboard skill (bounty f8ee4390)
Summary
Adds the yield-dashboard skill — a single aggregated view of DeFi positions across Zest, Bitflow, Pillar, and stacking, with optional YieldAgent x402 yields for opportunity discovery. Built for the AIBTC dashboard ecosystem (Stacks v1 + x402).
Bounty: Yield Dashboard / Portfolio Skill • ID:
f8ee4390-35ef-43d8-9183-80ace91ed33bWhat it does
Data sources
Implementation notes
import.meta.dir+ SKILLS_ROOT so it runs correctly regardless of cwd--address; may differ from other sources--addressvalidated (SP/ST mainnet format) before forwarding to Bitflow/Stackingopportunities(null | object),rebalanceSuggestions(always array),notewhen YieldAgent skippedsrc/lib/utils/cli.js(repo convention)Testing
Checklist