fix(raydium): move SKILL.md to root for skill discoverability#227
fix(raydium): move SKILL.md to root for skill discoverability#227skylavis-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: 62/100
1. Plugin Overview
Summary: This plugin provides an interface to Aerodrome Finance's classic AMM (volatile/stable pools) on Base (chain 8453). It supports token swaps, LP position management (add/remove liquidity), pool queries, position viewing, and AERO gauge reward claiming. Read operations use direct JSON-RPC 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 financial permissions: it can execute token swaps, approve unlimited ERC-20 allowances, add/remove liquidity from Aerodrome pools, and claim gauge rewards — all on Base. Write operations use 4. onchainos API ComplianceDoes this plugin use onchainos CLI for all on-chain write operations?Yes — all on-chain write operations go through 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 correctly 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)TF006 — External data no boundary + financial operations:
No other toxic flows detected. Prompt Injection ScanThe SKILL.md contains no instruction overrides, no identity manipulation, no hidden behavior directives. The base64-encoded string in the pre-flight section is for HMAC telemetry key obfuscation, not prompt injection. Result: Dangerous Operations CheckThe plugin performs:
Confirmation mechanisms:
Result: Data Exfiltration RiskThe pre-flight "Report install" section sends:
The device fingerprint includes the HOME directory path. The HMAC key is obfuscated via base64. While this appears to be install analytics, it does exfiltrate a device identifier to two external endpoints. The Rust binary source code does NOT exfiltrate any data — it only communicates with Result: Overall Security Rating: 🔴 High RiskRationale: C01 (curl|sh in SKILL.md) + C03 (base64 obfuscation in SKILL.md) + H05 (financial operations) trigger TF005 (curl|sh + financial access = CRITICAL → FAIL). The unlimited approval pattern and telemetry with device fingerprinting add to the risk profile. 6. Source Code Security (if source code is included)Language & Build Config
Dependency Analysis
All dependencies are mainstream, well-maintained Rust crates. No suspicious or unmaintained packages. Code Safety Audit
Does SKILL.md accurately describe what the source code does?Mostly Yes — The SKILL.md accurately describes the 7 commands and their behavior. However:
Verdict:
|
| Dimension | Score | Notes |
|---|---|---|
| Completeness (pre-flight, commands, error handling) | 18/25 | Good command coverage (7 commands), reasonable error handling. Missing: input validation on addresses, amount overflow checks. Pre-flight has excessive auto-injected content. |
| Clarity (descriptions, no ambiguity) | 16/25 | Command descriptions are clear. Some ambiguity around --confirm vs --force semantics. The "Proceeding automatically in non-interactive mode" messages are misleading — they suggest auto-execution. |
| Security Awareness (confirmations, slippage, limits) | 10/25 | Slippage control present. Confirmation gate via --confirm flag. Major gaps: unlimited approvals, wallet_contract_call_with_value always forces, no amount limits, curl |
| Skill Routing (defers correctly, no overreach) | 12/15 | Good routing to other skills (okx-dex-swap, okx-defi-portfolio, aerodrome-slipstream). Stays within its domain (Aerodrome classic AMM on Base). |
| Formatting (markdown, tables, code blocks) | 6/10 | Well-formatted tables and code blocks. Some output examples are JSON-in-println which could be cleaner. |
Strengths
- Clean onchainos integration: All write operations correctly delegate to
onchainos wallet contract-callvia subprocess — no self-implemented signing or broadcasting - Comprehensive DeFi coverage: 7 commands covering the full Aerodrome classic AMM lifecycle (quote → swap → LP management → rewards)
- Well-structured Rust code: Clean module separation, proper error handling with
anyhow, no unsafe code, standard dependencies
Issues Found
- 🔴 Critical: C01 —
curl | shin SKILL.md pre-flight section (curl -fsSL ... | sh). This is executed by the Agent and allows arbitrary code execution from the remote server. Combined with financial operations (H05), this forms TF005 (CRITICAL toxic flow). - 🔴 Critical: C03 — Base64-obfuscated HMAC key in SKILL.md pre-flight (
OE9nNWFRUFdfSVJkektrMExOV2RNeTIzV2JibXo3ZWNTbExJUDFIWnVoZw==). The decoded key is used to generate an HMAC-signed device fingerprint sent to external servers. This evades static review. - 🔴 Critical: Binary download without checksum verification — The pre-flight downloads
aerodrome-ammbinary from GitHub releases without SHA256 verification. The binary could be replaced by the repository owner at any time. - 🟡 Important: Unlimited ERC-20 approvals — All approve calls use
u128::MAXwhich grants the Router unlimited spending authority. Should warn users and/or use exact amounts. - 🟡 Important:
wallet_contract_call_with_valuealways passes--force— This bypasses onchainos confirmation prompts even without user consent. While currently unused (#[allow(dead_code)]), it's a dangerous pattern if activated. - 🟡 Important: Device fingerprint telemetry — Pre-flight section collects hostname, OS, architecture, and HOME directory, hashes them, and sends to two external endpoints. Users are not informed.
- 🟡 Important: No amount limits in code — SKILL.md mentions "Max 0.00005 ETH per test transaction" but no such limit is enforced in code.
- 🔵 Minor: "Proceeding automatically in non-interactive mode" messages are misleading — they suggest the transaction will auto-execute, but the
--confirmflag actually gates execution. - 🔵 Minor: Missing
--chainparameter inonchainos wallet addressescall —resolve_walletcallsonchainos wallet addresseswithout filtering by chain, then manually parses for chainIndex 8453.
8. Recommendations
-
🔴 MUST FIX — Remove
curl | shfrom SKILL.md: Replace with versioned, checksum-verified installation. Download the installer first, verify SHA256, then execute. This is the most critical finding as it forms TF005 with the financial operations. -
🔴 MUST FIX — Remove base64-obfuscated content from SKILL.md: The telemetry HMAC key must be presented in plaintext or removed entirely. Base64 obfuscation in agent-executed content is a CRITICAL finding (C03).
-
🔴 MUST FIX — Add SHA256 checksum verification for binary download: The binary download in pre-flight must verify the downloaded binary against a published checksum before execution.
-
🟡 SHOULD FIX — Use exact approval amounts instead of unlimited: Replace
build_approve_calldata(router, u128::MAX)withbuild_approve_calldata(router, args.amount_in)to limit approval to the needed amount. -
🟡 SHOULD FIX — Remove or gate the
--forceinwallet_contract_call_with_value: Even though it's currently dead code, remove the always-force pattern or add aforceparameter like the main function. -
🟡 SHOULD FIX — Disclose telemetry to users: If install telemetry is retained, add clear disclosure in the SKILL.md that device information will be collected and sent to external servers.
-
🟡 SHOULD FIX — Add M07 untrusted data field enumeration: Specify exactly which fields from RPC responses are safe to display (e.g., "Display: pool address, reserve amounts, LP balance. Do NOT render raw token names/symbols directly.").
-
🔵 NICE TO HAVE — Enforce amount limits: If test transaction limits are intended, enforce them in code rather than just documenting them.
9. Reviewer Summary
One-line verdict: Plugin has clean onchainos integration and solid DeFi functionality, but the SKILL.md pre-flight section contains critical supply-chain risks (curl|sh, base64 obfuscation, unverified binary download) that form a CRITICAL toxic flow with its financial capabilities.
Merge recommendation: 🔍 Needs changes before merge
The following items must be addressed before merge:
- Remove
curl | shpipe from SKILL.md and replace with checksum-verified installation - Remove base64-obfuscated content from SKILL.md (the HMAC key)
- Add SHA256 checksum verification for the
aerodrome-ammbinary download - Replace unlimited ERC-20 approvals with exact-amount approvals
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/raydium/skills/raydium/SKILL.mdtoskills/raydium/SKILL.mdso thatnpx skills add MigOKG/plugin-store --skill raydiumcan find it.