Claude Code plugin recipes
The agirails Claude Code plugin gives Claude Code three things:
- Slash commands for common ACTP dev tasks (
/agirails:agent-new,/agirails:wallet-check,/agirails:audit). - Skills that Claude auto-invokes when relevant (integration wizard, security auditor, testing assistant).
- Agents — pre-configured sub-agents specialized for AGIRAILS work (integration wizard, security audit, test writing).
Install via the Claude Code marketplace: in your editor, /plugin install agirails.
Verify install
# In a Claude Code session
> /agirails:wallet-check
# Plugin command runs your local agent's config check; if no keystore is present
# it walks you through generating one and funding it.
Common usage patterns
Scaffold a new agent
> /agirails:agent-new translation-service
This generates a working TS project (or Python with --python flag) with:
package.json(orpyproject.toml) pinned to current SDK versions- A
provide('translation-service', …)skeleton with TODO markers .actp/keystore.jsongeneration prompt- A test harness that round-trips a mock job
actp deploy:check-passing config out of the box
You can then ask Claude to fill in the LLM call inside the handler:
> The handler should call Anthropic's Claude API with a system prompt for translation.
Specialized AGIRAILS agent
When working inside a project that imports @agirails/sdk or agirails, the plugin auto-suggests the agirails:integration-wizard agent for end-to-end integration work. Trigger it explicitly:
> Use the agirails:integration-wizard subagent to add USDC payments to this Express app.
The agent has internal knowledge of:
- Current SDK version surface (
@agirails/sdk@4.0.0,agirails@3.0.1) - The
wallet=autopattern, when to use it - Best practices for keystores per AIP-13
- AIP-2.1 quote-channel patterns
- Common error paths and fallback handling
Security audit on commit
> Use the agirails:security-auditor subagent to review the staged changes.
The auditor looks for:
- Committed private keys (any 64-char hex matching
0x[a-f0-9]{64}) - Missing budget caps on
agent.request()calls - x402 endpoints without
requirePaymentmiddleware - Hardcoded recipient addresses (should be config)
wallet: 'eoa'in production code (warns; you might have a reason)- Missing dispute handlers in long-running providers
Test writing
> Use the agirails:testing-assistant subagent to write tests for src/handlers/translate.ts.
It generates tests using the SDK's built-in MockRuntime — your tests run without touching any chain, but verify the full state machine path.
Skill auto-invocation
These skills fire automatically when Claude recognizes their triggers:
| Skill | Fires when |
|---|---|
agirails:integration-wizard | User mentions "integrate AGIRAILS", "add payments", or imports the SDK |
agirails:security-auditor | Plugin sees writes to wallet/payment/config files |
agirails:testing-assistant | User asks for tests, or creates a test file referencing the SDK |
You can disable auto-invocation per skill via Claude Code settings.
Composition with other plugins
The AGIRAILS plugin doesn't conflict with vercel, claude-code-guide, feature-dev, or framework-specific plugins. A typical full-stack flow:
> /feature-dev start (plans the feature)
> Use the agirails:integration-wizard subagent to scaffold the payments piece.
> /feature-dev implement
> Use the agirails:security-auditor subagent to review.
> /feature-dev review
Updating
The plugin pins SDK versions in its internal templates. When the SDK releases a major version, the plugin gets a corresponding bump. Update with /plugin update agirails.
If you're integrating against an older SDK (e.g. @agirails/sdk@3.x) explicitly pin in your scaffold:
> /agirails:agent-new my-service --sdk-version 3.5.0
See also
- Claude Code integration overview — broader Claude Code setup
- Claude skill (Anthropic Skills) — the other distribution channel
- Consumer agent — what the wizard generates for the consumer side
- Provider agent — same for providers
- Plugin source on GitHub