Skip to content
Agentmart
Submit a tool

api-test-generate

Auto-generate comprehensive API tests for REST and GraphQL endpoints with request/response validation

Skill by manastalukdar

IndexedMIT★ 1
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/manastalukdar-api-test-generate

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Auto-generate comprehensive API tests for REST and GraphQL endpoints with request/response validation

Use cases: backend, testing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/api-test-generate

What's inside

Skill name
api-test-generate
Description
Auto-generate comprehensive API tests for REST and GraphQL endpoints with request/response validation
License
MIT
Instructions
507 lines in SKILL.md · view on GitHub

Agent Skills spec issues

  • body: 507 lines (spec recommends under 500)

Files (1)

  • SKILL.md

SKILL.md (first lines)

# API Test Generation

I'll generate comprehensive API tests for your REST or GraphQL endpoints with proper validation and assertions.

**Features:**
- Auto-detect API framework (Express, FastAPI, Next.js API routes)
- Generate request/response tests
- Schema validation
- Error handling tests
- Authentication tests


## Phase 1: API Framework Detection

```bash
# Detect API framework efficiently
detect_api_framework() {
    if [ -f "package.json" ]; then
        if grep -q "\"express\"" package.json; then
            echo "express"
        elif grep -q "\"fastify\"" package.json; then
            echo "fastify"
        elif grep -q "\"next\"" package.json; then
            echo "nextjs"
        elif grep -q "\"@apollo/server\"" package.json; then
            echo "apollo"
        fi
    elif [ -f "requirements.txt" ]; then
        if grep -q "fastapi" requirements.txt; then
            echo "fastapi"
        elif grep -q "flask" requirements.txt; then
            echo "flask"
        elif grep -q "django" requirements.txt; then
            echo "django"
        fi
    elif [ -f "go.mod" ]; then
        if grep -q "gin-gonic" go.mod; then
            echo "gin"
        elif grep -q "fiber" go.mod; then
            echo "fiber"
        fi
    fi
}

FRAMEWORK=$(detect_api_framework)

if [ -z "$FRAMEWORK" ]; then
    echo "❌ No API framework detected"
    echo "Supported frameworks:"
    echo "  Node: Express, Fastify, Next.js API routes, Apollo"
    echo "  Python: FastAPI, Flask, Django"
    echo "  Go: Gin, Fiber"
    exit 1
fi

echo "✓ API Framework: $FRAMEWORK"
```

## Phase 2: Endpoint Discovery

```bash
echo ""
echo "Discovering API endpoints..."

# Use Grep to find endpoints efficiently
case $FRAMEWORK in
    express|fastify)
        ENDPOINTS=$(grep -r "\.get\(\\|\.post\(\\|\.put\(\\|\.delete\(\\|\.patch\(" \
                         --include="*.js" --include="*.ts" \
                         --exclude-dir=node_modules \
                         . | head -20)
        ;;
    nextjs)
        # Next.js API routes are file-based
        ENDPOINTS=$(find pages/api app/api -name "*.ts" -o -name "*.js" 2>/dev/null | head -20)
        ;;
    apollo)
        # GraphQL resolvers
        ENDPOINTS=$(grep -r "Query\\|Mutation" --include="*.ts" --include="*.js" \
                         --exclude-dir=node_modules . | head -20)
        ;;
    fastapi)
        ENDPOINTS=$(grep -r "@app\.\(get\|post\|put\|delete\|patch\)" --include="*.py" . | head -20)
        ;;
    flask)
        ENDPOINTS=$(grep -r "@app\.route" --include="*.py" . | head -20)
        ;;
    django)
        ENDPOINTS=$(find . -name "urls.py" -o -name "views.py" | head -20)
        ;;
esac

if [ -z "$ENDPOINTS" ]; then
    echo "⚠️ No API endpoints found"
    exit 1
fi

ENDPOINT_COUNT=$(echo "$ENDPOINTS" | wc -l)
echo "✓ Found $ENDPOINT_COUNT endpoints"
echo ""
echo "Sample endpoints:"
echo "$ENDPOINTS" | head -5 | sed 's/^/  /'
```

## Phase 3: Test Framework Setup

```bash
echo ""
echo "Setting up test framework..."

# Detect or install test framework
if [ "$FRAMEWORK" = "express" ] || [ "$FRAMEWORK" = "fastify" ] || [ "$FRAMEWORK" = "nextjs" ]; then
    # Node.js - use supertest + jest
    if ! grep -q "\"supertest\"" package.json; then
        echo "Installing supertest for API testing..."
        npm install --save-dev supertest @types/supertest
    fi

    if ! grep -q "\"jest\"" package.json; then

From manastalukdar/ai-devstudio, MIT.

More from manastalukdar/ai-devstudio

Signals

Stars
1
Forks
0
Open issues
0
Last commit (this folder)
Jul 8, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from manastalukdar

Cite this page

api-test-generate skill. Agent Mart. https://agentmart.dev/skills/manastalukdar-api-test-generate (last updated 2026-10-24)