fix(quickswap-dex): move SKILL.md to root for skill discoverability#226
fix(quickswap-dex): move SKILL.md to root for skill discoverability#226skylavis-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 AI agents to interact with Aerodrome Finance's classic AMM (volatile/stable pools) on Base chain (8453). It supports swapping tokens, querying pool data and LP positions, adding/removing liquidity, and claiming AERO gauge rewards. Read operations use direct JSON-RPC calls to a public Base node, while write operations delegate to Target Users: DeFi users who want to manage Aerodrome classic AMM positions, swap tokens, and claim rewards on Base through an AI agent. 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 capabilities: it can execute token swaps, approve unlimited ERC-20 allowances, add/remove liquidity, and claim rewards on Aerodrome Finance on Base. All write operations go through 4. onchainos API ComplianceDoes this plugin use onchainos CLI for all on-chain write operations?Yes — All on-chain write operations (swap, approve, add liquidity, remove liquidity, claim rewards) are executed via 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 use 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)
Prompt Injection ScanNo instruction overrides, no identity manipulation, no hidden behavior, no confirmation bypass, no base64/unicode encoded hidden content detected in SKILL.md or source code. Result: ✅ Clean Dangerous Operations CheckThe plugin involves: token approvals (unlimited Result: Data Exfiltration RiskThe SKILL.md pre-flight section reports installation data to two endpoints ( Result: Overall Security Rating: 🔴 High RiskDue to TF005 (curl|sh + financial operations forming a complete attack chain). 6. Source Code Security (if source code is included)Language & Build Config
Dependency Analysis
No suspicious or unmaintained dependencies detected. Code Safety Audit
Does SKILL.md accurately describe what the source code does?Yes, mostly. The SKILL.md accurately describes all 7 commands, their parameters, and behavior. The source code implements exactly what is documented. Minor discrepancy: SKILL.md mentions Verdict:
|
| Dimension | Score | Notes |
|---|---|---|
| Completeness (pre-flight, commands, error handling) | 18/25 | Good command coverage (7 commands). Error handling is present but basic — some error messages could be more helpful. Pre-flight is comprehensive but contains curl|sh. |
| Clarity (descriptions, no ambiguity) | 20/25 | SKILL.md is well-organized with clear command descriptions, output examples, and flow documentation. Contract addresses and token mappings are clearly documented. |
| Security Awareness (confirmations, slippage, limits) | 15/25 | Has --confirm flag for write ops, slippage control on swaps, deadline parameters. However: unlimited approvals, no maximum transaction amount limits, dead code with hardcoded --force. Untrusted data boundary declared but field isolation is weak. |
| Skill Routing (defers correctly, no overreach) | 12/15 | Correctly routes to other skills (okx-dex-swap for cross-DEX, okx-defi-portfolio for tracking). Stays within Aerodrome classic AMM scope. |
| Formatting (markdown, tables, code blocks) | 7/10 | Good use of tables, code blocks, and structured sections. Some output examples could be more complete. |
Strengths
- Clean architecture: Read operations via direct RPC, write operations via onchainos — proper separation
- Well-documented: SKILL.md has comprehensive command index, flow descriptions, error handling table, and contract addresses
- Safety mechanisms:
--confirmflag for write ops,--dry-runmode, slippage control, deadline parameters
Issues Found
- 🔴 Critical: TF005 — curl|sh + financial operations in SKILL.md pre-flight section. The
curl -fsSL ... | shpattern for installing onchainos is in the SKILL.md (agent execution path), combined with financial operations. - 🟡 Important: TF006 — External data field passthrough + financial operations. On-chain data from RPC responses flows into agent context without field-level isolation.
- 🟡 Important: Unlimited ERC-20 approvals (
u128::MAX). Common pattern but exposes user to risk if the Router contract is compromised. - 🟡 Important: Dead code
wallet_contract_call_with_valuehardcodes--forceflag, bypassing user confirmation. Though currently unused, it could be activated in future versions. - 🟡 Important: Install telemetry with obfuscated HMAC key in SKILL.md pre-flight. The base64-encoded key and HMAC signing in the install reporter is unusual and could be more transparent.
- 🔵 Minor: No version pinning in
npx skills addcommands in SKILL.md pre-flight. - 🔵 Minor: No maximum transaction amount limits — SKILL.md mentions "Max 0.00005 ETH (~0.1 USDC) per test transaction" for swap but this is not enforced in code.
8. Recommendations
-
🔴 Replace
curl | shwith checksummed installer: The SKILL.md pre-flight should download the installer to a temp file, verify SHA256 against a known checksum, then execute — identical to how other official OKX skills handle it. This eliminates TF005. -
🟡 Add field-level isolation for external data: In SKILL.md command output sections, explicitly enumerate which fields are safe to display (e.g., "Display: pool address, reserve0, reserve1, stable flag. Do NOT render raw API response fields directly."). This addresses TF006/M08.
-
🟡 Limit ERC-20 approval amounts: Instead of
u128::MAX, approve only the amount needed for the current operation (e.g.,amount_infor swaps,amount_a_desiredfor add-liquidity). Or at minimum, warn the user about the unlimited approval. -
🟡 Remove or gate the dead code: Either delete
wallet_contract_call_with_valueor add proper--confirm/--forcegating to matchwallet_contract_call. -
🟡 Make install telemetry more transparent: Document the purpose of the HMAC key in the install reporter. Consider removing the obfuscated key or making the telemetry opt-in.
-
🔵 Pin dependency versions: Change
npx skills add okx/onchainos-skillstonpx skills add okx/onchainos-skills@x.y.zin the SKILL.md pre-flight. -
🔵 Enforce transaction limits in code: Add a configurable maximum amount check in the swap/liquidity commands to prevent accidental large transactions.
-
🔵 Add version pinning to binary download URL: The SKILL.md binary download uses a specific version tag, which is good. Ensure checksum verification is added for the binary download as well.
9. Reviewer Summary
One-line verdict: Well-architected Aerodrome AMM plugin with proper onchainos integration for all write operations, but the SKILL.md pre-flight contains curl | sh which combined with financial operations creates a critical supply chain attack vector (TF005).
Merge recommendation: 🔍 Needs changes before merge
The following items must be addressed:
- Replace
curl | shin SKILL.md pre-flight with a checksummed download-then-execute pattern (eliminates TF005 CRITICAL toxic flow) - Add field-level isolation in SKILL.md output sections to address TF006
- Remove or properly gate
wallet_contract_call_with_valuedead code that hardcodes--force
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/quickswap-dex/skills/quickswap-dex/SKILL.mdtoskills/quickswap-dex/SKILL.mdso thatnpx skills add MigOKG/plugin-store --skill quickswap-dexcan find it.