fix(solv-solvbtc): move SKILL.md to root for skill discoverability#229
fix(solv-solvbtc): move SKILL.md to root for skill discoverability#229skylavis-sky wants to merge 2 commits intoMigOKG:mainfrom
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
📋 Phase 3: AI Code Review Report — Score: 72/100
1. Plugin Overview
Summary: This plugin enables interaction with Aerodrome Finance's classic AMM (volatile/stable pools) on the Base blockchain. It supports token swaps, LP position management (add/remove liquidity), pool queries, position viewing, and gauge reward claiming. Read operations use direct JSON-RPC calls to a public Base RPC endpoint, while write operations delegate to the onchainos wallet for signing and broadcasting. Target Users: DeFi users who want to interact with Aerodrome Finance classic AMM pools on Base through an AI agent interface. 2. Architecture AnalysisComponents:
Skill Structure: Data Flow:
Dependencies:
3. Auto-Detected Permissionsonchainos Commands Used
Wallet Operations
External APIs / URLs
Chains Operated On
Overall Permission SummaryThis plugin has high-risk financial permissions — it can execute token swaps, ERC-20 approvals (including unlimited 4. onchainos API ComplianceDoes this plugin use onchainos CLI for all on-chain write operations?Yes — All on-chain write operations are delegated to On-Chain Write Operations (MUST use onchainos)
Data Queries (allowed to use external sources)
External APIs / Libraries Detected
Verdict: ✅ Fully CompliantAll on-chain write operations (swaps, approvals, liquidity management, reward claims) are properly delegated to onchainos wallet contract-call. Read operations use direct RPC calls which is allowed. 5. Security AssessmentStatic Rule Scan (C01-C09, H01-H09, M01-M08, L01-L02)
LLM Judge Analysis (L-PINJ, L-MALI, L-MEMA, L-IINJ, L-AEXE, L-FINA, L-FISO)
Toxic Flow Detection (TF001-TF006)TF005 · curl|sh + financial access (C01 + H05):
The TF006 · External data no boundary + financial operations (M08 + H05):
RPC response data flows into calldata construction without explicit field-level isolation. Prompt Injection ScanNo instruction override, identity manipulation, hidden behavior, confirmation bypass, unauthorized operations, hidden content (base64, invisible chars), or pseudo-system tags detected in SKILL.md or source code. The base64-encoded string in the "Report install" script ( Result: Dangerous Operations CheckThe plugin involves: token approvals (unlimited u128::MAX), swap execution, liquidity management, and reward claiming. Write operations have a Result: Data Exfiltration RiskThe install telemetry script collects: hostname, OS, architecture, and home directory path (hashed). This is sent to Result: Overall Security Rating: 🔴 High RiskDue to TF005 (curl|sh + financial operations), the overall assessment is FAIL. 6. Source Code Security (if source code is included)Language & Build Config
Dependency Analysis
All dependencies are well-known, actively maintained Rust ecosystem crates. No suspicious or unmaintained packages detected. Code Safety Audit
Does SKILL.md accurately describe what the source code does?Yes, with minor discrepancies:
Verdict:
|
| Dimension | Score | Notes |
|---|---|---|
| Completeness (pre-flight, commands, error handling) | 18/25 | Good command coverage (7 commands). Error handling present but some error messages could be more user-friendly. Missing: input validation for amount limits, no transaction simulation before broadcast. |
| Clarity (descriptions, no ambiguity) | 20/25 | Clear SKILL.md with good command documentation, token tables, and contract addresses. Minor: the relationship between --confirm (SKILL.md) and --force (onchainos) could be more transparent. |
| Security Awareness (confirmations, slippage, limits) | 14/25 | Has slippage control, confirmation flow via --confirm. Weaknesses: unlimited approvals without user warning, --force bypasses onchainos safety checks, no max amount caps enforced in code, amount_a_min/amount_b_min default to 0 (no slippage protection by default for liquidity operations). |
| Skill Routing (defers correctly, no overreach) | 12/15 | Correctly routes to onchainos for all write operations. Correctly suggests other skills for CLMM, portfolio, cross-DEX swaps. Does not overreach into other skills' domains. |
| Formatting (markdown, tables, code blocks) | 8/10 | Well-formatted SKILL.md with tables, code blocks, and clear sections. Good JSON output examples. |
Strengths
- Clean architecture: Clear separation between read (direct RPC) and write (onchainos delegation) paths
- Comprehensive command set: Covers the full Aerodrome classic AMM lifecycle (quote → swap → LP management → rewards)
- Pure Rust with minimal dependencies: No heavy web3 frameworks; manual ABI encoding is straightforward and auditable
Issues Found
- 🔴 Critical: TF005 — curl|sh in SKILL.md combined with financial operations. The
curl -fsSL https://raw.githubusercontent.com/okx/onchainos-skills/main/install.sh | shpattern in the pre-flight section runs arbitrary remote code. Combined with the plugin's financial capabilities, this creates a supply chain attack vector. - 🔴 Critical: Obfuscated HMAC key in install telemetry (
OE9nNWFRUFdfSVJkektrMExOV2RNeTIzV2JibXo3ZWNTbExJUDFIWnVoZw==). The base64-encoded key in the "Report install" shell script is obfuscated. While it appears to be for install telemetry HMAC signing, obfuscated secrets in agent-executed scripts are a security concern per C03. - 🟡 Important:
--forcealways passed to onchainos on confirmed writes, bypassing onchainos's native backend risk confirmation (code 81362). This means the onchainos safety net for high-risk transactions is never engaged. - 🟡 Important: Unlimited ERC-20 approvals (
u128::MAX) without user notification. The approve calldata uses maximum allowance without warning or offering a limited approval option. - 🟡 Important: Default slippage protection missing for liquidity operations.
amount_a_minandamount_b_mindefault to 0 in both add-liquidity and remove-liquidity, meaning users get no slippage protection unless they explicitly set these values. - 🟡 Important: Supply chain — unpinned skill installs (M01):
npx skills add okx/onchainos-skills --yes --globalwithout version lock. - 🔵 Minor: Dead code
wallet_contract_call_with_valuealways passes--forcewithout confirmation parameter — should be fixed or removed. - 🔵 Minor: No transaction simulation before broadcasting swaps or liquidity operations. Adding a
onchainos gateway simulatecall beforewallet contract-callwould improve safety.
8. Recommendations
-
[CRITICAL] Replace
curl | shinstallation with pinned version downloads with SHA256 verification. Use the pattern: download script → verify checksum → execute. Pin to specific release tags, notmainbranch. -
[CRITICAL] Remove or make transparent the obfuscated HMAC key in the install telemetry script. Hardcoded obfuscated keys in agent-executed scripts are unacceptable even for telemetry.
-
[HIGH] Remove automatic
--forcefrom wallet_contract_call whenconfirm=true. Instead, first call without--force, handle the confirming response (exit code 2), display the message to the user, and only re-run with--forceafter user confirmation — matching onchainos's intended confirmation flow. -
[HIGH] Add slippage protection defaults for add-liquidity and remove-liquidity. Default
amount_a_min/amount_b_minshould be calculated from the desired amounts (e.g., 99% of expected amounts) rather than 0. -
[HIGH] Warn users about unlimited approvals and offer a limited approval option (approve exact amount needed rather than
u128::MAX). -
[MEDIUM] Pin skill install versions:
npx skills add okx/onchainos-skills@x.y.z. -
[MEDIUM] Add transaction simulation via
onchainos gateway simulatebefore executing writes, especially for swaps. -
[LOW] Remove dead code (
wallet_contract_call_with_value) or fix its confirmation handling to matchwallet_contract_call.
9. Reviewer Summary
One-line verdict: Well-architected DeFi plugin with proper onchainos delegation for all write operations, but blocked by curl|sh supply chain risk and aggressive --force usage that bypasses safety confirmations.
Merge recommendation: 🔍 Needs changes before merge
Items that must be addressed:
- Remove or secure
curl | shinstallation pattern in SKILL.md (replace with version-pinned + checksum-verified download) - Remove obfuscated base64 key from install telemetry script
- Fix
--forcehandling to not bypass onchainos confirmation flow - Add non-zero default slippage protection for liquidity operations
Generated by Claude AI via Anthropic API — review the full report before approving.
Phase 4: Summary + Pre-flight for
|
🔨 Phase 2: Build Verification — ✅ PASSED
Build succeeded. Compiled artifact uploaded as workflow artifact. Source integrity: commit SHA `` is the content fingerprint. |
Copies
SKILL.mdfromskills/solv-solvbtc/skills/solv-solvbtc/SKILL.mdtoskills/solv-solvbtc/SKILL.mdso thatnpx skills add MigOKG/plugin-store --skill solv-solvbtccan find it.