web3-agent-skills
# web3-agent-skills
[](https://github.com/Darkshanu/web3-agent-skills/actions/workflows/ci.yml)
[](LICENSE)
[](https://www.python.org/)
[](https://modelcontextprotocol.io/)
[](skills/)
Open-standard **Agent Skills (`SKILL.md`)** + zero-dependency **MCP Server** & **CLI** for EVM & Injective Web3 workflows — built for **Claude Code**, **Cursor**, **Gemini CLI**, and **Antigravity**.
> **Zero external `pip` dependencies.** Runs purely on Python 3.9+ standard library (`urllib`, `json`, `argparse`, `unittest`) with public RPC presets for Ethereum, Base, Arbitrum, Optimism, Polygon, and Injective.
---
## Why `web3-agent-skills`?
- **Open-Standard `SKILL.md` Pack:** Drop-in Agent Skills following the cross-client `SKILL.md` YAML frontmatter spec.
- **Bundled MCP Server (`--mcp`):** Speaks `MCP 2024-11-05` JSON-RPC 2.0 over `stdio` — works out of the box with Claude Code, Cursor, Gemini CLI, and Antigravity.
- **Read-Only Security First:** Never asks for seed phrases or private keys. Audits wallets, ERC-20 tokens, spender allowances, ERC-1967 proxies, and on-chain telemetry safely.
- **Multi-Chain Ready:** Built-in public RPC aliases (`ethereum`, `base`, `arbitrum`, `optimism`, `polygon`, `injective-evm`) plus Injective Cosmos LCD REST support.
---
## Included Agent Skills & MCP Tools
| Skill | Purpose | MCP Tools |
|---|---|---|
| [`evm-wallet-audit`](skills/evm-wallet-audit/SKILL.md) | Audit native ETH balance, nonce, EOA vs Contract status, and live gas telemetry | `inspect_evm_wallet`, `get_evm_network_stats` |
| [`erc20-token-safety`](skills/erc20-token-safety/SKILL.md) | Inspect ERC-20 metadata, supply, and flag `UNLIMITED` / `HIGH` spender allowances | `inspect_erc20_token`, `check_erc20_allowance` |
| [`contract-safety-check`](skills/contract-safety-check/SKILL.md) | Verify deployed bytecode size and ERC-1967 upgradeable proxy implementation slots | `check_contract_safety` |
| [`injective-telemetry`](skills/injective-telemetry/SKILL.md) | Query live Injective Mainnet block height, chain ID, and `inj1...` bank balances | `get_injective_telemetry` |
---
## 1-Line Install (Skills + Local MCP Runner)
Installs all 4 `SKILL.md` packages into `~/.claude/skills`, `~/.cursor/skills`, `~/.gemini/skills`, and `~/.gemini/antigravity/skills`, and stages the zero-dependency MCP server in `~/.web3-agent-skills`:
### macOS / Linux
```bash
curl -fsSL https://raw.githubusercontent.com/Darkshanu/web3-agent-skills/main/install.sh | bash
```
### Windows (PowerShell)
```powershell
irm https://raw.githubusercontent.com/Darkshanu/web3-agent-skills/main/install.ps1 | iex
```
<details>
<summary>Or install from a local git clone</summary>
```bash
git clone https://github.com/Darkshanu/web3-agent-skills.git
cd web3-agent-skills
bash install.sh # macOS / Linux
# or: powershell -ExecutionPolicy Bypass -File install.ps1 # Windows
```
</details>
---
## MCP JSON Config Examples
Add `web3-agent-skills` to your AI coding agent's MCP config (replace `/ABS/PATH/TO/web3-agent-skills` with `~/.web3-agent-skills` or your clone path):
### Claude Code (`.mcp.json` or CLI)
```bash
claude mcp add web3-agent-skills -- python /ABS/PATH/TO/web3-agent-skills/cli.py --mcp
```
```json
{
"mcpServers": {
"web3-agent-skills": {
"command": "python",
"args": ["/ABS/PATH/TO/web3-agent-skills/cli.py", "--mcp"],
"env": {
"WEB3_RPC_URL": "https://ethereum-rpc.publicnode.com",
"INJECTIVE_LCD_URL": "https://sentry.lcd.injective.network"
}
}
}
}
```
### Cursor (`.cursor/mcp.json`)
```json
{
"mcpServers": {
"web3-agent-skills": {
"command": "python",
"args": ["/ABS/PATH/TO/web3-agent-skills/cli.py", "--mcp"]
}
}
}
```
### Gemini CLI (`~/.gemini/settings.json`) & Antigravity (`~/.gemini/antigravity/mcp_config.json`)
```json
{
"mcpServers": {
"web3-agent-skills": {
"command": "python3",
"args": ["/ABS/PATH/TO/web3-agent-skills/cli.py", "--mcp"]
}
}
}
```
---
## Direct CLI Usage & Demo Output
```bash
# 1. Audit an EVM wallet
python cli.py wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --rpc ethereum
# 2. Check ERC-20 token metadata & ERC-1967 proxy status
python cli.py token 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 --rpc ethereum
# 3. Audit an ERC-20 spender allowance (detects UNLIMITED / HIGH / ELEVATED risk)
python cli.py allowance \
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 \
0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 \
0x000000000022D473030F116dDEE9F6B43aC78BA3
# 4. Check contract bytecode & proxy implementation slot
python cli.py contract 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
# 5. Live EVM chain ID, block number & gas price (supports ethereum, base, arbitrum, optimism, polygon, injective-evm)
python cli.py network --rpc base
# 6. Live Injective Mainnet telemetry & optional inj1... bank balances
python cli.py injective --address inj1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqe2hm49
```
<details>
<summary>Sample JSON output from <code>allowance</code> & <code>token</code></summary>
```json
{
"token_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"symbol": "USDC",
"decimals": 6,
"owner_address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"spender_address": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
"owner_balance": 250.0,
"allowance": 1.157920892373162e+71,
"is_unlimited": true,
"risk_level": "UNLIMITED",
"recommendation": "Revoke or cap allowance to the exact amount needed.",
"warnings": [
"Spender holds an unlimited (uint256 max-range) ERC-20 approval."
]
}
```
</details>
---
## Example Workflows
See [`examples/`](examples/README.md) for runnable end-to-end workflows:
- [`examples/audit_wallet_and_allowances.py`](examples/audit_wallet_and_allowances.py) — Full EVM wallet + ERC-20 + spender safety + Injective telemetry report
- [`examples/mcp_stdio_smoke.py`](examples/mcp_stdio_smoke.py) — Automated MCP `stdio` handshake and tool discovery check
---
## Run Tests
```bash
python -m unittest discover -s tests -v
python examples/mcp_stdio_smoke.py
```
---
## Project Structure
```text
web3-agent-skills/
├── .github/workflows/ci.yml # GitHub Actions CI (Python 3.9–3.12)
├── skills/ # Open-standard SKILL.md definitions
│ ├── evm-wallet-audit/SKILL.md
│ ├── erc20-token-safety/SKILL.md
│ ├── contract-safety-check/SKILL.md
│ └── injective-telemetry/SKILL.md
├── src/web3_agent_skills/
│ ├── abi.py # Zero-dependency ERC-20 ABI encoder/decoder
│ ├── rpc.py # EVM JSON-RPC, ERC-20 safety & Injective LCD tools
│ ├── mcp_server.py # MCP 2024-11-05 stdio JSON-RPC server
│ └── cli.py # CLI subcommands & --mcp entrypoint
├── examples/ # Runnable workflow & MCP smoke scripts
├── tests/ # Unit tests (mocked RPC/LCD + MCP + SKILL.md checks)
├── cli.py # Direct repo-root runner
├── install.sh / install.ps1 # 1-line cross-platform skill installers
└── pyproject.toml
```
## License
MIT License — see [LICENSE](LICENSE).
TDQS
Scored across 6 tools
Core purposes differ (wallet snapshot, contract bytecode/proxy, ERC-20 metadata, allowance, network stats, Injective telemetry), but three tools overlap heavily: inspect_evm_wallet, check_contract_safety, and inspect_erc20_token all report bytecode presence and EOA-vs-contract status, and the latter two both surface ERC-1967 proxy slots. 'check_contract_safety' also implies rug/honeypot analysis it does not perform, which can mislead selection.
All names follow a readable snake_case verb_noun pattern (inspect_/check_/get_ + resource). Minor deviation: inspect vs check are used interchangeably for similar bytecode/proxy checks, and chain scope is inconsistently embedded (evm in most names, injective only in one).
Six tools is well within the ideal 3-15 range and each maps to a distinct inspection target. No obvious filler tools; scope is tight for a read-only Web3 inspection server.
Covers the basics of address, token, and network inspection but leaves notable gaps: no generic read-contract/ABI call, no transaction or transfer-history lookup, no NFT/ERC-721 support, and no write operations at all. Injective appears as a single asymmetric tool, suggesting partial multi-chain coverage rather than a deliberate design.