onchain-contract-token-analysis
Analyze smart contracts, token mechanics, permissions, fee flows, upgradeability, market risks, and likely attack surfaces for onchain projects. Use when reviewing ERC-20s, launchpads, vaults, staking systems, LP fee routing, ownership controls, proxy setups, or suspicious token behavior.
About this skill
This AI agent skill is designed to perform comprehensive security and economic analysis of onchain projects, including smart contracts and token systems. It meticulously examines various aspects such as token mechanics, ownership permissions, fee routing, upgradeability patterns, potential market risks, and common attack surfaces. The skill is particularly valuable for scrutinizing a wide range of decentralized finance (DeFi) components, from standard ERC-20 tokens and launchpads to complex vaults, staking systems, liquidity provider (LP) fee routing, and intricate ownership or proxy setups. The core objective is to deliver a practical analysis that clearly explains the system's functionality, identifies controlling entities, traces value and fee movements, highlights privileged actions, uncovers potential financial risks for users, and flags any obvious red flags or inherent design vulnerabilities. It systematically guides the agent through identifying the project's scope, mapping its architectural components, and rigorously checking control mechanisms, permissions, and tokenomics. By automating this detailed review process, the skill helps developers, auditors, and investors quickly gain a deep understanding of an onchain project's security posture and economic design. It enables the rapid assessment of complex systems, providing critical insights that would otherwise require extensive manual analysis, thus saving time and enhancing the thoroughness of due diligence.
Best use case
The primary use case for this skill is conducting security audits and due diligence on new or existing onchain projects. It benefits blockchain developers by helping them identify potential vulnerabilities in their contracts, security auditors by providing a structured approach to initial assessments, and investors or analysts by offering a quick yet thorough overview of a project's risks before engagement.
Analyze smart contracts, token mechanics, permissions, fee flows, upgradeability, market risks, and likely attack surfaces for onchain projects. Use when reviewing ERC-20s, launchpads, vaults, staking systems, LP fee routing, ownership controls, proxy setups, or suspicious token behavior.
A structured report detailing the onchain project's functionality, control mechanisms, value flows, identified risks, and any red flags related to security or tokenomics.
Practical example
Example input
Analyze the security and tokenomics of the 'CoolVault' staking protocol at address 0x123... and its associated token 'COOL' at address 0xabc... . Provide insights into ownership, fee distribution, and potential user risks.
Example output
**Project Scope:** Staking Vault (CoolVault) and ERC-20 Token (COOL). **Architecture Summary:** CoolVault (0x123) is a staking contract managed by a `Governor` role (0xdef). It accepts COOL tokens (0xabc) for staking, distributing rewards from a `Treasury` contract. Upgradeability via UUPS proxy. **Control & Permissions:** `Governor` (0xdef) can pause staking, update reward rates, upgrade proxy (high privilege). `Admin` (0xghi) can list/unlist staking pools. **Token Mechanics (COOL):** ERC-20 standard, fixed supply (100M). No mint/burn by contract after initial deployment. **Value & Fee Flow:** Stakers deposit COOL, earn COOL rewards from Treasury. No explicit deposit/withdrawal fees currently. **Risks:** `Governor` has significant control (pause, upgrade). Centralization risk if `Governor` key compromised. No timelock on critical `Governor` actions observed. **Red Flags:** None immediately obvious beyond typical centralization of governance roles.
When to use this skill
- When assessing the security, tokenomics, or behavior of an ERC-20 token, protocol, or module.
- When reviewing launchpads, vaults, staking systems, or liquidity provider (LP) mechanisms.
- To identify potential attack surfaces, permissions, and financial risks in onchain projects.
- When a detailed analysis of contract ownership, upgradeability, or fee flows is required.
When not to use this skill
- For writing or debugging smart contracts from scratch.
- For real-time onchain transaction monitoring or anomaly detection.
- When a quick summary without detailed architectural or permission analysis is sufficient.
- To execute transactions or interact directly with contracts onchain.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/onchain-contract-tokens/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How onchain-contract-token-analysis Compares
| Feature / Agent | onchain-contract-token-analysis | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | easy | N/A |
Frequently Asked Questions
What does this skill do?
Analyze smart contracts, token mechanics, permissions, fee flows, upgradeability, market risks, and likely attack surfaces for onchain projects. Use when reviewing ERC-20s, launchpads, vaults, staking systems, LP fee routing, ownership controls, proxy setups, or suspicious token behavior.
How difficult is it to install?
The installation complexity is rated as easy. You can find the installation instructions above.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
AI Agent for Product Research
Browse AI agent skills for product research, competitive analysis, customer discovery, and structured product decision support.
AI Agent for SaaS Idea Validation
Use AI agent skills for SaaS idea validation, market research, customer discovery, competitor analysis, and documenting startup hypotheses.
SKILL.md Source
# Onchain Contract / Token Analysis Use this skill when the task is to assess a token, protocol, launch module, vault, staking system, router, or related onchain project from a security, permissions, tokenomics, or behavior perspective. ## Core objective Produce a practical analysis that answers: - What the system does - Who controls it - How value and fees move - What privileged actions exist - What users can lose money from - Whether there are obvious red flags or design risks ## Workflow ### 1. Identify the scope First determine which of these the request actually targets: - token contract - factory / launcher - vault / staking / locker - router / hook / proxy / module - admin / governance / registry - full protocol system If the scope is unclear, infer it from the files, addresses, ABI names, deployment scripts, or docs. ### 2. Map the architecture Before judging risk, build a compact model of the system: - main contracts - ownership / admin roles - external dependencies - upgradeability pattern - event flow - token creation flow - fee routing flow Prefer a short system map over long prose. ### 3. Check control and permissions Always verify: - `owner`, `admin`, `governor`, `operator`, `manager`, `signer` - role-based access control - pausable / blacklist / whitelist powers - mint / burn / seize / rescue / withdraw permissions - parameter setters - upgrade authority - emergency functions Call out who can do what, and whether those powers are bounded or dangerous. ### 4. Check token mechanics For ERC-20 and tokenized systems, verify: - total supply model - mintability - burnability - transfer restrictions - fee on transfer / tax - max wallet / max tx rules - trading enable switch - blacklist / antibot logic - rebasing / reflection / hidden balance logic - allowance edge cases If the token claims to be standard, confirm whether behavior actually matches that claim. ### 5. Check fee and value flow Trace where user funds or protocol fees go: - LP fee recipients - treasury recipients - locker / vault recipients - protocol fee splits - conversion / swap path - withdrawal path - claim path Do not just name recipients. Explain whether they are: - immutable - admin-changeable - delayed - claim-based - dependent on offchain identity or signatures ### 6. Check upgradeability and mutability If proxies or modules exist, verify: - proxy type - implementation admin - initialization safety - reinitialization protection - storage layout assumptions - upgrade trust model If not upgradeable, still check whether behavior can change through configurable modules. ### 7. Check attack surface Look for: - arbitrary external calls - reentrancy opportunities - unchecked token callbacks - unsafe approvals - signature replay - missing nonce / deadline checks - address(0) edge cases - misconfigured recipient logic - accounting mismatch - stale state after recipient updates - rounding leakage - griefing / denial-of-service vectors When risk depends on business assumptions, state that explicitly. ### 8. Check market-facing risk When the target is a token or launch flow, explicitly assess: - honeypot-like behavior - sell restrictions - hidden tax changes - admin ability to freeze exits - liquidity custody - locker guarantees - whether front-end labels could misclassify the asset Do not overclaim. Distinguish: - confirmed malicious logic - dangerous centralization - poor design - heuristic / market-behavior false positives ## Output format Default to this structure: ### Summary One short paragraph stating what the system is and the top conclusion. ### Findings List issues in severity order: - severity - title - affected contract / function - why it matters - exploit or failure mode - whether it is confirmed or conditional ### Trust model State: - who controls upgrades - who controls fees - who controls pauses or restrictions - what users must trust offchain ### Token / fee flow Explain: - how tokens are created - where fees accrue - who can claim them - what can change later ### Open questions List anything blocked by missing source, missing ABI, missing deployment info, or offchain dependencies. ## Special guidance ### When reviewing a suspicious token Be precise: - "can blacklist holders" is stronger than "looks risky" - "owner can change tax" is stronger than "may be a scam" - "no onchain sell restriction found" is stronger than "not a honeypot" ### When reviewing a launch module Always distinguish: - launcher logic - underlying token implementation - LP locker behavior - fee locker behavior - who receives economic rights ### When chain data is required If the task depends on live state, verify with current chain or explorer data instead of assuming from source alone. ## Do not - Do not call something malicious without code-based support - Do not confuse admin centralization with exploitability - Do not ignore offchain identity dependencies when they control payouts - Do not stop at contract syntax; trace actual economic outcomes
Related Skills
HIPAA Compliance for AI Agents
Generate HIPAA compliance checklists, risk assessments, and audit frameworks for healthcare organizations deploying AI agents.
Data Governance Framework
Assess, score, and remediate your organization's data governance posture across 6 domains.
Cybersecurity Risk Assessment
You are a cybersecurity risk assessment specialist. When the user needs a security audit, threat assessment, or compliance review, follow this framework.
afrexai-cybersecurity-engine
Complete cybersecurity assessment, threat modeling, and hardening system. Use when conducting security audits, threat modeling, penetration testing, incident response, or building security programs from scratch. Works with any stack — zero external dependencies.
Compliance & Audit Readiness Engine
Your AI compliance officer. Guides startups and scale-ups through SOC 2, ISO 27001, GDPR, HIPAA, and PCI DSS — from zero to audit-ready. No consultants needed.
Compliance Audit Generator
Run internal compliance audits against major frameworks without hiring a consultant.
AI Safety Audit
Comprehensive AI safety and alignment audit framework for businesses deploying AI agents. Built around the UK AI Security Institute Alignment Project standards (2026), EU AI Act requirements, and NIST AI RMF.
clickhouse-github-forensics
Query GitHub event data via ClickHouse for supply chain investigations, actor profiling, and anomaly detection. Use when investigating GitHub-based attacks, tracking repository activity, analyzing actor behavior patterns, detecting tag/release tampering, or reconstructing incident timelines from public GitHub data. Triggers on GitHub supply chain attacks, repo compromise investigations, actor attribution, tag poisoning, or "query github events".
security-guardian
Automated security auditing for OpenClaw projects. Scans for hardcoded secrets (API keys, tokens) and container vulnerabilities (CVEs) using Trivy. Provides structured reports to help maintain a clean and secure codebase.
mema-vault
Secure credential manager using AES-256 (Fernet) encryption. Stores, retrieves, and rotates secrets using a mandatory Master Key. Use for managing API keys, database credentials, and other sensitive tokens.
guardian-wall
Mitigate prompt injection attacks, especially indirect ones from external web content or files. Use this skill when processing untrusted text from the internet, user-uploaded files, or any external source to sanitize content and detect malicious instructions (e.g., "ignore previous instructions", "system override").
SX-security-audit
全方位安全审计技能。检查文件权限、环境变量、依赖漏洞、配置文件、网络端口、Git 安全、Shell 安全、macOS 安全、密钥检测等。支持 CLI 参数、JSON 输出、配置文件。当用户要求"安全检查"、"漏洞扫描"、"权限检查"、"安全审计"时使用此技能。