pharos-skills
v1.2.1
Published
CLI installer for Pharos Skills — composable on-chain operation primitives for the Pharos Network
Maintainers
Readme
A Pharos Skill is a structured folder that AI agents (Claude Code, Cursor, opencode, Windsurf, etc.) read at runtime. Each skill ships with a SKILL.md capability index, exact cast/forge command references, and battle-tested Solidity contracts — so your agent knows exactly what to run without guessing.
Skills
pharos-contract-verify ──────────────────────────────── no deps
pharos-deploy-kit ──→ pharos-contract-verify
pharos-token-factory ──→ pharos-deploy-kit + pharos-contract-verify
pharos-safe-multisig ──────────────────────────────── no deps
pharos-agent-wallet ──────────────────────────────── no deps
pharos-x402-payments ──→ pharos-agent-wallet| Skill | What it does |
|-------|-------------|
| pharos-contract-verify | Verify any deployed Solidity contract on Pharos via Blockscout. Handles constructor args, compiler flags, and indexer retry. |
| pharos-deploy-kit | Deploy via forge script or deterministic CREATE2/CREATE3 for same-address-across-networks. Dry-run gate before any broadcast. |
| pharos-token-factory | Deploy ERC20/ERC721/ERC1155 tokens using audited OpenZeppelin v5 contracts. Mint, burn, pause, transfer ownership — with guardrails against dangerous combos. |
| pharos-safe-multisig | Deploy and manage Gnosis Safe multisigs. Treasury management, owner changes, contract ownership transfer to Safe. |
| pharos-agent-wallet | Autonomous wallet safety layer. Balance preflight, gas estimation, nonce management, per-session spend caps, and recipient allowlists. |
| pharos-x402-payments | Full x402 HTTP micropayment stack. Monetize Express endpoints as a server and pay autonomously as a client — with spend caps and idempotency built in. |
Installation
npx pharos-skills add <skill>The CLI prompts you to pick your editor(s) and install scope. Use arrow keys to move, space to select/deselect, and enter to confirm.
# Install a single skill (auto-resolves dependencies)
npx pharos-skills add pharos-token-factory
# Install all 6 skills at once
npx pharos-skills add-all
# Non-interactive / CI
npx pharos-skills add-all --yes
# Install into a specific directory
npx pharos-skills add pharos-token-factory --dir ./my-project
# Browse available skills
npx pharos-skills list
# Inspect a skill and its dependency tree
npx pharos-skills info pharos-x402-paymentsWhat gets installed
<target>/
├── SKILL.md ← merged Capability Index for all installed skills
└── .pharos/
├── shared/
│ ├── assets/
│ │ ├── networks.json ← Pharos testnet + mainnet RPC, chain IDs, explorers
│ │ ├── tokens.json ← canonical token registry
│ │ └── canonical-contracts.json
│ └── references/
│ └── _guardrails.md ← mandatory pre-check protocol for all write ops
└── skills/
└── <skill-name>/
├── SKILL.md
├── skill.json
├── references/ ← exact command specs per operation
└── assets/ ← contracts, scripts, templatesNetworks
| Network | Chain ID | RPC | Explorer |
|---------|----------|-----|----------|
| Atlantic Testnet (default) | 688689 | https://atlantic.dplabs-internal.com | atlantic.pharosscan.xyz |
| Pacific Mainnet | 1672 | https://rpc.pharos.xyz | pharosscan.xyz |
[!IMPORTANT] Every skill defaults to Atlantic Testnet. Any mainnet write operation requires an explicit "This is a MAINNET transaction with real value" confirmation — this cannot be skipped.
Guardrails
Every skill enforces five non-negotiable safeguards:
- Foundry pre-check —
which cast && which forgebefore any command; prints install hint if missing. - Explicit private key — always
--private-key $PRIVATE_KEY. Foundry does not auto-read env. Never hardcode, log, or echo keys. - 4-step Write Pre-Check — derive sender → confirm chain ID → verify balance covers value + gas → simulate before send. Cannot be skipped.
- Testnet default + mainnet gate — all skills default to testnet; mainnet requires explicit confirmation.
- Explorer link on every tx —
<explorer>/tx/<hash>and<explorer>/address/<addr>always output after broadcast.
How an Agent Uses These Skills
- Agent reads
SKILL.md→ scans the Capability Index for matching user intent - Opens the linked reference file (e.g.,
pharos-token-factory/references/erc20.md#deploy) - Follows the Agent Guidelines checklist at the bottom of each section
- Runs Write Operation Pre-Checks from
_guardrails.md - Executes exact
cast/forgecommands from the template - Outputs explorer links and records the result in a local ledger
Development
Prerequisites: Foundry · Node.js ≥ 20
# Install dependencies
npm install
# Build the CLI
npm run build
# Run CLI tests (22 tests, vitest 4)
npm test
# Compile Solidity contracts (solc 0.8.35 + OpenZeppelin v5.6.1)
cd contracts && forge build
# Run Solidity tests (15 tests)
cd contracts && forge test
# End-to-end install test
npx pharos-skills add pharos-token-factory --dir ./demo --yesContracts
All contracts are in contracts/src/, compiled with solc 0.8.35, via-ir, and 200 optimizer runs.
| Contract | Description |
|----------|-------------|
| StandardERC20.sol | ERC20 + Burnable + Pausable + Capped + Ownable |
| StandardERC721.sol | ERC721 + URIStorage + Pausable + Ownable |
| StandardERC1155.sol | ERC1155 + Pausable + Supply + Ownable |
| SpendLimitGuard.sol | Gnosis Safe Guard — per-period cumulative spend cap |
[!NOTE] Contracts are designed as reference implementations. Audit before using in production.
