Skip to content

automata-network/agent-skills

Repository files navigation

Agent Skills

A collection of AI agent skills following the agentskills.io specification for automated web application testing.

1. Installation

Use the ai-agent-skills CLI to install skills:

Claude Code

npx ai-agent-skills install automata-network/agent-skills --agent claude

Cursor

npx ai-agent-skills install automata-network/agent-skills --agent cursor

Codex

npx ai-agent-skills install automata-network/agent-skills --agent codex

2. Supported Agents

These skills work with any AI coding agent that supports the SKILL.md format:

  • Claude Code
  • Cursor
  • Codex
  • VS Code (GitHub Copilot)
  • Amp
  • Goose
  • OpenCode

3. Manual Configuration

Web3 DApp Testing (Optional)

For testing Web3 DApps, create a .test-env file in tests/ directory:

mkdir -p tests
echo 'WALLET_PRIVATE_KEY="your_private_key_here"' > tests/.test-env

Security Notes:

  • Private key is only read from tests/.test-env file (not environment variables)
  • This file is NOT exposed to AI agent APIs
  • Add .test-env to .gitignore to prevent accidental commits
  • Use a test wallet with test funds only
  • WALLET_PASSWORD is auto-generated and saved to .test-env if not set

4. How to Run

Simply tell your AI agent what you want to do:

Generate Test Cases (First Time)

"Generate test cases for this project"

or

"Run web-test-case-gen to analyze and create test cases"

This will:

  1. Analyze your project (dependencies, code, UI screenshots)
  2. Generate test cases in ./tests/ directory
  3. You can commit these to git for repeatable testing

Execute Tests

"Run the tests for this project"

or

"Use web-test to execute the test cases"

This will:

  1. Load test cases from ./tests/
  2. Set up browser and wallet (if Web3)
  3. Execute all tests
  4. Generate a report in ./test-output/

Git Configuration

After generating test cases, configure your project's git:

# Add tests/ to git (persistent test cases)
git add tests/
git commit -m "Add test cases"

# Add test-output/ to .gitignore (temporary artifacts)
echo "test-output/" >> .gitignore
Directory Git Status Contents
tests/ Commit to git Test case definitions (YAML), reusable across runs
test-output/ Add to .gitignore Screenshots, reports, browser profiles (temporary)

5. Project Structure

agent-skills/
├── README.md
├── LICENSE
│
├── web-test/                       # Test execution skill
│   ├── SKILL.md
│   └── scripts/
│       ├── test-helper.js          # Main CLI
│       ├── lib/                    # Core libraries
│       └── commands/               # Command modules
│
├── web-test-case-gen/              # Test case generation skill
│   └── SKILL.md
│
├── web-test-research/              # Project analysis (internal)
│   └── SKILL.md
│
├── web-test-cleanup/               # Cleanup (internal)
│   ├── SKILL.md
│   └── scripts/
│       └── cleanup.sh
│
├── web-test-wallet-setup/          # Wallet setup (internal)
│   ├── SKILL.md
│   └── scripts/
│       ├── wallet-setup-helper.js
│       ├── lib/
│       └── commands/
│
├── web-test-wallet-connect/        # Wallet connect (internal)
│   ├── SKILL.md
│   └── scripts/
│       ├── wallet-connect-helper.js
│       ├── lib/
│       └── commands/
│
└── web-test-report/                # Report generation (internal)
    └── SKILL.md

6. How It Works

Two-Phase Architecture

┌─────────────────────────────────────────────────────────────────────────┐
│                         PHASE 1: GENERATE                               │
│                                                                         │
│   $ skill web-test-case-gen                                             │
│                                                                         │
│   ┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐  │
│   │ Analyze Code    │────▶│ Take UI         │────▶│ Generate YAML   │  │
│   │ (package.json,  │     │ Screenshots     │     │ Test Cases      │  │
│   │  WebSearch)     │     │ (Playwright)    │     │ (tests/*.yaml)  │  │
│   └─────────────────┘     └─────────────────┘     └─────────────────┘  │
│                                                                         │
│   Output: tests/config.yaml, tests/test-cases.yaml → Commit to Git     │
│                                                                         │
└─────────────────────────────────────────────────────────────────────────┘
                                    │
                                    ▼
┌─────────────────────────────────────────────────────────────────────────┐
│                         PHASE 2: EXECUTE                                │
│                                                                         │
│   $ skill web-test                                                      │
│                                                                         │
│   ┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐  │
│   │ Load Test Cases │────▶│ Setup Wallet    │────▶│ Execute Tests   │  │
│   │ (tests/*.yaml)  │     │ (if Web3 DApp)  │     │ (Vision-based)  │  │
│   └─────────────────┘     └─────────────────┘     └─────────────────┘  │
│                                                           │             │
│                                                           ▼             │
│                                                   ┌─────────────────┐  │
│                                                   │ Generate Report │  │
│                                                   │ (test-output/)  │  │
│                                                   └─────────────────┘  │
│                                                                         │
└─────────────────────────────────────────────────────────────────────────┘

Vision-Based Testing

During test execution, AI uses vision to interact with the UI:

┌─────────────────┐     ┌──────────────────┐     ┌─────────────────┐
│   AI Agent      │────▶│  test-helper.js  │────▶│   Playwright    │
│ (Claude Code)   │     │     (CLI)        │     │   Browser       │
└────────┬────────┘     └──────────────────┘     └────────┬────────┘
         │                                                 │
         │◀──────────── Screenshot (Base64) ◀─────────────┘
         │
         ▼
   Visual Analysis → Determine click coordinates → Execute action

Test Case Format

Test cases are stored in YAML format in your project's ./tests/ directory:

tests/config.yaml

project:
  name: MyDApp
  url: http://localhost:3000

web3:
  enabled: true
  wallet: rabby

execution_order:
  - WALLET-001
  - SWAP-001

tests/test-cases.yaml

test_cases:
  - id: WALLET-001
    name: Connect Wallet
    priority: critical
    web3: true
    wallet_popups: 1
    steps:
      - action: navigate
        url: /
      - action: vision-click
        target: Connect Wallet button
      - action: wallet-approve
    expected:
      - Wallet address displayed

7. Available Skills

User-Facing Skills

These skills can be invoked directly by users:

Skill Description Usage
web-test-case-gen Generate persistent test cases from project analysis (code + UI screenshots) skill web-test-case-gen
web-test Execute tests from ./tests/ directory and generate report skill web-test

Internal Skills

These skills are called automatically by user-facing skills. Do not invoke directly.

Skill Description Called By
web-test-research Analyze project: detect framework, dependencies, Web3 status, take UI screenshots web-test-case-gen
web-test-cleanup Kill browsers, stop dev servers, free ports, clean artifacts web-test
web-test-wallet-setup Download and initialize Rabby wallet extension web-test (if Web3)
web-test-wallet-connect Connect wallet to DApp, handle approval popups web-test (if Web3)
web-test-report Generate test report with pass/fail indicators web-test

Skill Dependency Map

┌──────────────────────────────────────────────────────────────────────────┐
│                          Skill Dependencies                              │
├──────────────────────────────────────────────────────────────────────────┤
│                                                                          │
│  USER-FACING:                                                            │
│                                                                          │
│  web-test-case-gen ─────────▶ web-test-research (internal)               │
│                                                                          │
│  web-test ──┬───────────────▶ web-test-cleanup (internal)                │
│             │                                                            │
│             ├── (if Web3) ──▶ web-test-wallet-setup (internal)           │
│             │                        │                                   │
│             │                        ▼                                   │
│             │                 web-test-wallet-connect (internal)         │
│             │                                                            │
│             └───────────────▶ web-test-report (internal)                 │
│                                                                          │
└──────────────────────────────────────────────────────────────────────────┘

Skill Responsibilities

Skill Key Responsibilities
web-test-case-gen Run research, generate YAML test cases, save to ./tests/
web-test Load test cases, orchestrate full test flow, execute vision-based tests
web-test-research Read package.json, WebSearch dependencies, read code, start dev server, take UI screenshots, analyze features
web-test-cleanup Kill Chromium/Chrome processes, stop dev servers, free ports (3000, 5173, 8080), remove test-output
web-test-wallet-setup Download Rabby wallet, import private key, initialize and unlock wallet
web-test-wallet-connect Navigate with wallet extension, click Connect Wallet, handle popups, verify connection
web-test-report Collect test results, generate markdown report with ✅/❌ indicators, document failures

8. Learn More

License

MIT

About

A repo contain agent skills can be used by claude or codex. learn more about agent skills: https://agentskills.io/

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published