agentleFS
RidhuanDEVRidhuanDEV/claude-skills/shadow-api/SKILL.md

shadow-api

Skill1 starsChanged yesterdayMITView on GitHub

Backend API & Contract Sync. Use when creating, modifying, or testing HTTP/REST API endpoints, generating or validating OpenAPI 3.1 (openapi.yaml), or syncing Postman collections via shadow_api MCP.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill whenever the Monarch invokes /shadow-api, asks to generate OpenAPI/Postman from an existing backend, or builds/updates …

    line 8
  2. Very specific:

    Call bulk_upsert_openapi_endpoints in a single batch call with specPath: "<project>/docs/api/openapi.yaml", autoSyncPostman: true, and the …

    line 15
  3. Very specific:

    When adding or modifying 1–2 endpoints during development, call upsert_openapi_endpoint followed by sync_postman_collection.

    line 18
  4. Distinctive:

    Ensure zero missing summaries or responses.

    line 20
  5. Very specific:

    When the local/staging backend server is running, fire real HTTP requests to verify status codes, latency (ms), and response payloads, …

    line 22
  6. Very specific:

    Standard Error Envelope: Use structured application/problem+json (RFC 9457: type, title, status, detail, instance / errors[]) without …

    line 24
  7. Very specific:

    Evolution & Negative Testing: Document breaking vs additive changes (/shadow-compat), emit Deprecation/Sunset headers before removing …

    line 26

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/shadow-api — Real API Tester, OpenAPI 3.1 & Postman Sync (Shadow Army)

Use this skill whenever the Monarch invokes /shadow-api, asks to generate OpenAPI/Postman from an existing backend, or builds/updates backend API endpoints. This skill connects directly to the shadow_api MCP server (test_api_endpoint, upsert_openapi_endpoint, bulk_upsert_openapi_endpoints, validate_openapi_spec, sync_postman_collection, run_api_collection).

Workflow

  1. Generate OpenAPI + Postman from an Existing Backend (bulk_upsert_openapi_endpoints):
    • Scout the existing backend routes, controllers, validators (Zod/Joi/class-validator/Pydantic/Go structs), and response DTOs.
    • Call bulk_upsert_openapi_endpoints in a single batch call with specPath: "<project>/docs/api/openapi.yaml", autoSyncPostman: true, and the full endpoints array.
    • Automatically selects Compact Mode (docs/api/openapi.yaml) for small projects (≤ 4 modules) or Modular Mode (docs/api/modules/<module>.openapi.yaml + bundled docs/api/openapi.yaml + nested Postman folders) for multi-module projects.
  2. Single Endpoint Upsert (upsert_openapi_endpoint):
    • When adding or modifying 1–2 endpoints during development, call upsert_openapi_endpoint followed by sync_postman_collection.
  3. Validate OpenAPI (validate_openapi_spec):
    • Ensure zero missing summaries or responses.
  4. Live HTTP Verification (test_api_endpoint / run_api_collection):
    • When the local/staging backend server is running, fire real HTTP requests to verify status codes, latency (ms), and response payloads, recording real responses directly into OpenAPI.
  5. Contract-First, RFC 9457 Errors, Idempotency & Pagination Discipline:
    • Standard Error Envelope: Use structured application/problem+json (RFC 9457: type, title, status, detail, instance / errors[]) without leaking stack traces or internal SQL errors.
    • Idempotency & Pagination: Enforce Idempotency-Key semantics on non-idempotent payment/order POST routes (/shadow-concurrency//shadow-cache); enforce bounded cursor (seek / keyset) or validated offset pagination (limit <= 100) with stable sort keys (tie-broken by id).
    • Evolution & Negative Testing: Document breaking vs additive changes (/shadow-compat), emit Deprecation/Sunset headers before removing fields, and test invalid payloads (400/422), unauthorized (401/403), and conflicts (409).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.