Skip to main content

AGIRAILS Claude Plugin: AI-Assisted Payment Integration

· 4 min read
AGIRAILS Core Team

The AGIRAILS Claude Plugin brings AI-assisted development to ACTP integration. Install it in Claude Code to get contextual help, guided workflows, and proactive security reviews.

Installation

/plugin install agirails

GitHub: agirails/claude-plugin


What's Included

The plugin provides three types of assistance:

ComponentCountPurpose
Commands8Guided workflows for common tasks
Skills6Protocol knowledge in Claude's context
Agents3Autonomous helpers for complex tasks

Commands

Interactive workflows that guide you through common tasks:

CommandDescription
/agirails:initSet up SDK in your project
/agirails:payCreate a payment interactively
/agirails:statusCheck transaction status
/agirails:watchMonitor transaction in real-time
/agirails:debugDiagnose integration issues
/agirails:statesVisualize ACTP state machine
/agirails:upgradeUpgrade SDK version
/agirails:exampleGenerate working code examples

Example: Creating a Payment

> /agirails:pay

Payment Summary:
+-------------------------------------+
| To: 0xAbc...123 |
| Amount: $100.00 USDC |
| Fee: $1.00 (1%) |
| Total: $101.00 USDC |
| Deadline: 2025-12-30 15:30 UTC |
| Mode: mock (no real funds) |
+-------------------------------------+

Proceed?
Options: [Create Payment] [Edit Details] [Cancel]

The command validates inputs, calculates fees, and generates ready-to-use code in your project's language.


Skills

Skills provide contextual knowledge when you discuss AGIRAILS topics:

SkillTriggers When Discussing
agirails-coreACTP protocol, state machine, invariants
agirails-patternsAPI tiers, mode selection
agirails-securityProduction readiness, key management
agirails-typescriptTypeScript SDK patterns
agirails-pythonPython SDK patterns

Skills activate automatically. Ask "How does the ACTP state machine work?" and Claude will have the full 8-state specification in context.


Agents

Agents handle complex, multi-step tasks autonomously:

Integration Wizard

Guides you through end-to-end SDK integration:

> "I'm building a LangChain agent and want to add payment functionality"

Claude: "I'll use the integration-wizard agent to guide you through
integrating AGIRAILS with your LangChain agent."

The wizard:

  1. Analyzes your project structure
  2. Detects your framework (LangChain, Express, FastAPI, etc.)
  3. Creates a tailored integration plan
  4. Generates framework-specific code
  5. Sets up testing patterns

Testing Assistant

Generates comprehensive tests for your ACTP integration:

  • Happy path tests
  • Edge cases (deadlines, disputes, cancellations)
  • Mock mode tests for CI/CD
  • Testnet integration tests

Security Auditor

Proactively reviews code for vulnerabilities:

SECURITY AUDIT REPORT
=====================

CRITICAL: 0
HIGH: 1
MEDIUM: 2

[H1] Missing rate limiting on /api/payments
File: src/routes/payments.ts:15
Fix: Add express-rate-limit middleware

PRODUCTION READINESS: CONDITIONAL
Address HIGH severity issues before deploying.

The auditor scans for:

  • Hardcoded private keys
  • Missing input validation
  • Verbose error messages
  • Missing rate limiting
  • Outdated SDK versions

Proactive Hooks

The plugin includes hooks that activate automatically:

HookTriggerAction
Project DetectionSession startDetects AGIRAILS SDK, shows available commands
Security ReviewWriting payment codeScans for hardcoded keys, validation issues
Testnet ReminderSetting mode: 'mainnet'Reminds to test on testnet first

Quick Start

1. Install Plugin

/plugin install agirails

2. Initialize SDK

/agirails:init

This detects your language (TypeScript or Python), installs the SDK, and creates configuration files.

3. Create Your First Payment

/agirails:pay

Follow the interactive prompts to generate payment code.

4. Understand the State Machine

/agirails:states

Visualizes the 8-state ACTP transaction lifecycle.


Language Support

FeatureTypeScriptPython
SDK Installationnpm install @agirails/sdkpip install agirails
Code GenerationFull supportFull support
ExamplesIncludedIncluded
Framework DetectionNode.js, Express, LangChainFastAPI, Django, CrewAI

Mock Mode by Default

All generated code uses mock mode:

const client = await ACTPClient.create({
mode: 'mock', // No blockchain needed
requesterAddress: '0x...',
});

Mock mode features:

  • No gas fees or wallet required
  • Instant transactions
  • Persistent state in .actp/ directory
  • Mint unlimited test USDC

Requirements

  • Claude Code CLI
  • Node.js 18+ (TypeScript) or Python 3.9+ (Python)
  • No blockchain wallet needed for development

Resources


Feedback

Found an issue? Open a GitHub issue or reach out on Discord.