← Browse

@monadworks/agentify-2

A

Your API has new users it doesn't know about yet — AI agents.

instructionscodexclaude

Install

agr install @monadworks/agentify-2 --target claude

Writes 1 file into .claude/skills/, pinned to git-99c4efc6.

  • .claude/skills/agentify-2/AGENTS.md

Document

AGENTS.md — Agentify

Identity

Agentify is an Agent Interface Compiler. It reads OpenAPI specifications and either returns structured data about the API (parse mode) or generates agent interface code (transform mode).

Install: npm install -g agentify-cli or use via npx agentify-cli.

How It Works

Agentify has a hybrid architecture. Some outputs are best generated deterministically (MCP servers, CLIs, A2A cards) while others — like documentation for intelligent agents — are better written by agents themselves using structured data.

Parse mode (agentify parse <spec>) outputs the intermediate representation (IR) as JSON. The IR contains product metadata, domain groupings, typed capabilities, auth configuration, and a scale-based generation strategy. Use this when you need to understand an API or write your own agent documentation.

Transform mode (agentify transform <spec>) generates runnable code and configuration files. It supports 9 output formats. Use this when you need deterministic artifacts.

Self-describe (agentify self-describe) outputs Agentify's own agent interface files.

Commands

CommandPurposeOutput
parse <spec>Structured API analysisJSON (AgentifyIR) to stdout
transform <spec>Code generationFiles in output directory
self-describeAgentify's own interfacesskills.json, CLAUDE.md, AGENTS.md

Transform Options

  • -o, --output <dir> — Output directory
  • -n, --name <name> — Override project name
  • -f, --format <formats...> — Select formats: mcp, claude.md, agents.md, cursorrules, skills, llms.txt, gemini.md, a2a, cli

When to Use Each Command

Use parse when you are an agent that wants to reason about an API — its domains, capabilities, auth scheme, and scale. The JSON output is designed for programmatic consumption. This is the right choice if you plan to write documentation, analyze API coverage, or build custom tooling.

Use transform when you need generated code: an MCP server with tool handlers, a standalone CLI, an A2A discovery card, or a skills manifest. These formats require structural correctness that benefits from deterministic generation.

Supported Inputs

  • Swagger 2.0 and OpenAPI 3.x (JSON or YAML)
  • URL or local file path
  • Lenient parsing: non-compliant specs are handled gracefully

Key Capabilities

  • Parses OpenAPI into a flat, agent-optimized intermediate representation
  • Detects auth schemes (apiKey, bearer, oauth2, basic) and maps them to environment variables
  • Groups endpoints into semantic domains automatically
  • Selects generation strategy by API scale (small/medium/large)
  • Sanitizes all spec inputs to prevent injection in generated code
  • Scans generated output for security issues

Tested At Scale

APIEndpointsNotes
Notion13Small, clean spec
Petstore20Swagger 2.0 reference
httpbin73Medium, diverse operations
Slack174Large, complex auth
Stripe452Very large, nested schemas
GitHub1,093Stress test scale

Constraints

  • Requires Node.js 18+
  • Remote specs require internet access
  • Generated MCP servers need their own npm install and env configuration

Context

Repository README

Describes MonadWorks/agentify as a whole, which may contain artifacts other than this one. Where this artifact had no useful description of its own, its summary was taken from here.


Your API has new users it doesn't know about yet — AI agents.

Claude Code reads CLAUDE.md. Cursor reads .cursorrules. Codex and Copilot read AGENTS.md. And if you want your API callable as a tool, you need an MCP server. That's a lot of files to write and keep in sync with your API spec.

Agentify reads your OpenAPI spec and writes them all.

npx agentify-cli transform https://petstore.swagger.io/v2/swagger.json

What You Get

One command generates up to 9 formats from a single OpenAPI spec:

FormatUsed by
MCP ServerClaude, ChatGPT, Copilot (with Dockerfile)
CLAUDE.mdClaude Code
AGENTS.mdCodex, Copilot, Cursor, Gemini CLI
.cursorrulesCursor IDE
SkillsAgent platforms
llms.txtLLM search engines
GEMINI.mdGemini CLI
A2A CardGoogle Agent-to-Agent protocol
CLIA standalone command-line tool that makes real API calls

Quick Start

# Transform any OpenAPI spec (Swagger 2.0 or OpenAPI 3.x)
npx agentify-cli transform https://petstore.swagger.io/v2/swagger.json

# Pick specific formats
npx agentify-cli transform ./my-api.yaml -f mcp claude.md agents.md

# Generate a standalone CLI tool
npx agentify-cli transform ./my-api.yaml -f cli -o my-api-cli

# Custom output directory and project name
npx agentify-cli transform https://api.example.com/openapi.json -o ./output -n my-project

Example output:

  Agentify v0.4.1
  Agent Interface Compiler

  +-- 20 endpoints detected -> SMALL API strategy
  +-- 3 domains identified (pet, store, user)
  +-- Auth: apiKey (SWAGGER_PETSTORE_API_KEY)
  +-- Strategy: Direct tool mapping — one tool per endpoint

  > Generated mcp + claude.md + agents.md + cursorrules + llms.txt + gemini.md + skills + a2a (15 files)
  > Output: ./swagger-petstore-mcp-server
  > Security scan: PASSED

Tested on Real APIs

Agentify handles APIs of any size — from 13-endpoint apps to 1,000+ endpoint platforms.

APIEndpointsDomainsTypeScriptServer starts
Notion135PASSPASS
Petstore (Swagger 2.0)203PASSPASS
httpbin (non-compliant spec)7311PASSPASS
Slack Web API17455PASSPASS
Stripe4521PASSPASS
GitHub REST API1,09343PASSPASS

Every generated MCP server compiles with zero TypeScript errors and starts immediately. Non-compliant specs (like httpbin) are auto-normalized with warnings instead of rejected. The GitHub REST API — 1,093 endpoints across 43 domains — produces a working server with 1,093 tools.

How It Works

OpenAPI Spec (URL or file)
    |
    v
  PARSE ──> SANITIZE ──> ANALYZE ──> COMPILE ──> EMIT ──> SCAN ──> OUTPUT
              |              |           |          |        |
          Strip unsafe    Detect     Build IR    Run      Security
          patterns        domains,   (typed)     emitters  scan all
                          auth,                            generated
                          API scale                        code

Agentify parses your spec into an intermediate representation (AgentifyIR), then runs pluggable emitters to produce each output format. Every generated artifact goes through a security scan before being written to disk.

Security built in:

  • Input sanitization (blocks eval, exec, Function constructor injection)
  • Prompt injection pattern detection
  • Generated code scanning

Contributing

New emitters are welcome. Each one implements a simple interface:

import type { Emitter, AgentifyIR, EmitterOptions, EmitterResult } from "../types";

export class MyFormatEmitter implements Emitter {
  readonly name = "my-format";
  readonly format = "my-format";

  async emit(ir: AgentifyIR, options: EmitterOptions): Promise<EmitterResult> {
    // Generate output files from the IR
    return { format: this.format, filesWritten: [...], warnings: [] };
  }
}
agentify/
+-- src/
|   +-- cli.ts              # CLI entry point
|   +-- parser/             # OpenAPI parsing + sanitization
|   +-- generator/          # Pluggable emitters for each format
|   +-- security/           # Input sanitization + output scanning
|   +-- types.ts            # AgentifyIR type definitions
+-- test/                   # Vitest test suite (136 tests)

Status

This is early. It works on Swagger 2.0 and OpenAPI 3.x specs, handles auth detection, domain grouping, and API scale analysis. If you try it and something breaks, open an issue — that helps a lot.

  • OpenAPI parser, MCP emitter, security scanner, CLI
  • 9 output formats: MCP, CLAUDE.md, AGENTS.md, .cursorrules, Skills, llms.txt, GEMINI.md, A2A, CLI
  • Capability graph and semantic grouping
  • Web UI and one-click deploy
  • Custom emitter plugins

License

MIT

Trustgrade A

  • passBody integrity

    Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.

  • passType matchnot applicable to this artifact type

    Whether the artifact is really the kind of thing its metadata claims it is.

  • passFreshness

    How long since the source repository was last pushed to.

  • passPrompt injection

    Scans the artifact's own text for instructions aimed at your agent rather than at you.

  • passLicense

    Whether the source repository declares an SPDX license permissive enough to redistribute.

How the grade is calculated

Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:

  • Aevery check passed
  • Bone warning
  • Ctwo warnings
  • Dprompt injection or body integrity failed, or three warnings
  • Fone of those failed, and something else is wrong

These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.

Versions

  • git-99c4efc65e2f2026-08-04