fix(pump-fun): move SKILL.md to root for skill discoverability#225
fix(pump-fun): move SKILL.md to root for skill discoverability#225skylavis-sky wants to merge 2 commits intoMigOKG:mainfrom
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Phase 4: Summary + Pre-flight for
|
| Command | Description |
|---|---|
quote |
Get swap quotes across volatile/stable pools (read-only) |
swap |
Execute token swaps with slippage protection |
pools |
Query pool addresses, reserves, and deployment status |
positions |
View LP token balances and estimated underlying assets |
add-liquidity |
Add liquidity to pools and receive ERC-20 LP tokens |
remove-liquidity |
Burn LP tokens to withdraw underlying token pairs |
claim-rewards |
Claim AERO emissions from staked gauge positions |
Triggers
Activate this skill when users want to trade tokens, provide liquidity, or manage LP positions specifically on Aerodrome's classic AMM pools (not Slipstream CLMM). Use for Base network DeFi operations involving WETH, USDC, AERO, and other major tokens through Aerodrome's traditional constant-product or stable swap mechanisms.
Auto-injected Pre-flight
## Pre-flight Dependencies (auto-injected by Plugin Store CI)
> Run once per session before first use. These checks ensure required tools are installed.
### Install onchainos CLI + Skills (auto-injected)
```bash
# 1. Install onchainos CLI
onchainos --version 2>/dev/null || curl -fsSL https://raw.githubusercontent.com/okx/onchainos-skills/main/install.sh | sh
# 2. Install onchainos skills (enables AI agent to use onchainos commands)
npx skills add okx/onchainos-skills --yes --global
# 3. Install plugin-store skills (enables plugin discovery and management)
npx skills add MigOKG/plugin-store --skill plugin-store --yes --globalInstall aerodrome-amm binary (auto-injected)
if ! command -v aerodrome-amm >/dev/null 2>&1; then
OS=$(uname -s | tr A-Z a-z)
ARCH=$(uname -m)
case "${OS}_${ARCH}" in
darwin_arm64) TARGET="aarch64-apple-darwin" ;;
darwin_x86_64) TARGET="x86_64-apple-darwin" ;;
linux_x86_64) TARGET="x86_64-unknown-linux-gnu" ;;
linux_aarch64) TARGET="aarch64-unknown-linux-gnu" ;;
esac
curl -fsSL "https://github.com/MigOKG/plugin-store/releases/download/plugins/aerodrome-amm@0.1.0/aerodrome-amm-${TARGET}" -o ~/.local/bin/aerodrome-amm
chmod +x ~/.local/bin/aerodrome-amm
fiReport install (auto-injected, runs once)
REPORT_FLAG="$HOME/.plugin-store/reported/aerodrome-amm"
if [ ! -f "$REPORT_FLAG" ]; then
mkdir -p "$HOME/.plugin-store/reported"
# Device fingerprint → SHA256 → 32-char device ID
DEV_RAW="$(hostname):$(uname -s):$(uname -m):$HOME"
DEV_ID=$(echo -n "$DEV_RAW" | shasum -a 256 | head -c 32)
# HMAC signature (obfuscated key, same as CLI binary)
_K=$(echo 'OE9nNWFRUFdfSVJkektrMExOV2RNeTIzV2JibXo3ZWNTbExJUDFIWnVoZw==' | base64 -d 2>/dev/null || echo 'OE9nNWFRUFdfSVJkektrMExOV2RNeTIzV2JibXo3ZWNTbExJUDFIWnVoZw==' | openssl base64 -d)
HMAC_SIG=$(echo -n "${_K}${DEV_ID}" | shasum -a 256 | head -c 8)
DIV_ID="${DEV_ID}${HMAC_SIG}"
unset _K
# Report to Vercel stats
curl -s -X POST "https://plugin-store-dun.vercel.app/install" \
-H "Content-Type: application/json" \
-d '{"name":"aerodrome-amm","version":"0.1.0"}' >/dev/null 2>&1 || true
# Report to OKX API (with HMAC-signed device token)
curl -s -X POST "https://www.okx.com/priapi/v1/wallet/plugins/download/report" \
-H "Content-Type: application/json" \
-d '{"pluginName":"aerodrome-amm","divId":"'"$DIV_ID"'"}' >/dev/null 2>&1 || true
touch "$REPORT_FLAG"
fi
</details>
---
*Generated by Plugin Store CI after maintainer approval.*
📋 Phase 3: AI Code Review Report — Score: 68/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 token swaps, swap quotes, pool queries, LP position viewing, adding/removing liquidity, and claiming AERO gauge rewards. Read operations use direct JSON-RPC calls to a public Base RPC endpoint, while write operations are delegated to Target Users: DeFi users and AI agents wanting to manage Aerodrome Finance classic AMM positions on Base chain — swapping tokens, providing/removing liquidity, and claiming rewards. 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 significant financial operation capabilities: 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 routed 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)TF005 · curl|sh + Financial Access Chain:
TF006 · External Data No Boundary + Financial Operations:
Prompt Injection Scan
Result: Dangerous Operations Check
Result: Data Exfiltration Risk
Result: Overall Security Rating: 🔴 High RiskPrimary concerns:
6. Source Code Security (if source code is included)Language & Build Config
Dependency AnalysisKey dependencies (from Cargo.toml):
No suspicious, unmaintained, or vulnerable dependencies detected. Dependency set is minimal and appropriate. 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 | All 7 commands implemented with error handling. Pre-flight checks present. Missing: input validation for addresses (no checksum/format validation), no slippage bounds checking. |
| Clarity (descriptions, no ambiguity) | 20/25 | SKILL.md is well-structured with clear command documentation, output examples, and error table. Minor: confirmation flow in SKILL.md says --confirm but source code maps this to --force on onchainos, which could confuse. |
| Security Awareness (confirmations, slippage, limits) | 12/25 | Has --confirm gate for write ops. Has slippage parameter for swaps. Missing: limited approval option (always unlimited), no maximum transaction value checks, no security scan before operations, base64-obfuscated telemetry key is a red flag. |
| Skill Routing (defers correctly, no overreach) | 12/15 | Correctly routes to other skills (okx-dex-swap, okx-defi-portfolio, okx-dex-token). Correctly uses onchainos for all writes. Minor: could reference okx-security for pre-swap token scanning. |
| Formatting (markdown, tables, code blocks) | 6/10 | Good use of tables and code blocks. JSON output examples provided. Minor formatting inconsistencies in some sections. |
Strengths
- Clean architecture: Clear separation between read operations (direct RPC) and write operations (onchainos CLI), fully compliant with onchainos requirements
- Comprehensive command coverage: All major AMM operations covered (quote, swap, pools, positions, add/remove liquidity, claim rewards) with proper ABI encoding
- Minimal dependencies: Small, well-known Rust crate set with no suspicious packages
Issues Found
- 🔴 Critical: TF005 —
curl|shfrom unpinnedmainbranch URL in SKILL.md combined with financial operations. The install script URLhttps://raw.githubusercontent.com/okx/onchainos-skills/main/install.shis not pinned to a release tag. An attacker who compromises the repo'smainbranch could inject malicious code that runs before any financial operation. - 🔴 Critical: C03 — Base64-obfuscated HMAC key in SKILL.md telemetry section. The Report install section contains
OE9nNWFRUFdfSVJkektrMExOV2RNeTIzV2JibXo3ZWNTbExJUDFIWnVoZw==decoded at runtime, which obscures what the key is and what it's used for. This evades static audit. - 🟡 Important: Unlimited ERC-20 approvals — All approve calls use
u128::MAXwithout giving users the option for limited approvals. This creates long-term risk if the Router contract is compromised. - 🟡 Important: Device fingerprinting telemetry — The Report install section collects hostname, OS, arch, and HOME directory, hashes them, and sends to two external servers without clear user consent.
- 🟡 Important:
wallet_contract_call_with_valuealways passes--force— Although currently dead code (#[allow(dead_code)]), if activated this bypasses user confirmation for value-bearing contract calls. - 🟡 Important: No address format validation — Token addresses and wallet addresses passed to commands are not validated for format (checksum, length, hex characters).
- 🔵 Minor: M01/M02 — Unpinned skill installations in SKILL.md pre-flight (
npx skills addwithout version). - 🔵 Minor: No amount bounds checking — No maximum transaction value limits to prevent accidental large transactions.
- 🔵 Minor:
amount_a_minandamount_b_mindefault to 0 — For add/remove liquidity, this means no slippage protection by default.
8. Recommendations
- [CRITICAL] Pin the onchainos install script URL to a specific release tag instead of
mainbranch. Use${LATEST_TAG}pattern like the official skills do, and verify checksum before execution. - [CRITICAL] Remove or clearly document the base64-encoded HMAC key in the Report install section. The obfuscation pattern violates C03. If telemetry is needed, use a plaintext API key or clearly document what the key is.
- [HIGH] Offer limited approvals — Instead of always approving
u128::MAX, approve only the exact amount needed for the current operation, or at minimum warn the user and offer the choice. - [HIGH] Add explicit user consent for telemetry — The Report install section should clearly inform the user what data is being collected and sent, and ideally make it opt-in.
- [HIGH] Remove or gate
wallet_contract_call_with_value— Either remove this dead code or ensure it respects the--confirm/--forcepattern likewallet_contract_call. - [MEDIUM] Add address format validation — Validate that addresses are proper hex format with correct length before passing to RPC or onchainos commands.
- [MEDIUM] Set non-zero default minimums for liquidity operations —
amount_a_minandamount_b_minshould have sensible defaults (e.g., 95% of desired) rather than 0. - [MEDIUM] Pin skill installations to specific versions in SKILL.md pre-flight section.
- [LOW] Add pre-swap security scanning — Suggest or integrate
onchainos security token-scanbefore executing swaps on unfamiliar tokens. - [LOW] Add transaction value bounds — Implement configurable maximum transaction limits to prevent accidental large trades.
9. Reviewer Summary
One-line verdict: Plugin is architecturally sound and onchainos-compliant for on-chain writes, but the SKILL.md contains critical supply chain risks (unpinned curl|sh, base64-obfuscated telemetry key, device fingerprinting) that combined with financial operations create a TF005 CRITICAL toxic flow.
Merge recommendation: 🔍 Needs changes before merge
Items that must be addressed:
- Pin
install.shURL to a release tag and add checksum verification (fixes C01/TF005) - Remove or de-obfuscate the base64-encoded HMAC key in Report install (fixes C03)
- Add user consent disclosure for device fingerprint telemetry
- Offer limited approvals instead of unlimited
u128::MAXby default - Remove dead-code
wallet_contract_call_with_valueor add confirmation gate
Generated by Claude AI via Anthropic API — review the full report before approving.
🔨 Phase 2: Build Verification — ✅ PASSED
Build succeeded. Compiled artifact uploaded as workflow artifact. Source integrity: commit SHA `` is the content fingerprint. |
Copies
SKILL.mdfromskills/pump-fun/skills/pump-fun/SKILL.mdtoskills/pump-fun/SKILL.mdso thatnpx skills add MigOKG/plugin-store --skill pump-funcan find it.