api

api is an agent for Claude Code from nxtg-ai/forge-plugin. It costs 175 tokens per session (938 once invoked), scanned A, original, MIT.

An agent for designing and building web APIs, which are interfaces that let software systems exchange requests and data. It applies shared rules for URLs, input checks, responses, errors, API documentation, and live connections.

In plain words
What is it for?
It is for creating REST endpoints, checking incoming data, formatting success and error responses, documenting APIs with OpenAPI, and handling authentication, logging, rate limits, and WebSocket protocols.
Why use it?
It reduces inconsistency between endpoints, such as different response shapes, validation methods, or status codes, making the API easier to maintain.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; names the TodoWrite tool.

Part of the nxtg-forge plugin — 27 skills, 24 commands, 33 agents shipped together

Good fit It is for creating REST endpoints, checking incoming data, formatting success and error responses, documenting APIs with OpenAPI, and handling authentication, logging, rate limits, and WebSocket protocols.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/nxtg-ai/forge-plugin/api
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/nxtg-ai/forge-plugin

Made for: Claude Code.

Or install nxtg-forge, the plugin that ships this one along with the rest of its 27 skills, 24 commands, 33 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api

README.md
[![agentmods](https://agentmods.dev/badge/agents/nxtg-ai/forge-plugin/api/github.svg)](https://agentmods.dev/agents/nxtg-ai/forge-plugin/api)
Your own site
<a href="https://agentmods.dev/agents/nxtg-ai/forge-plugin/api"><img src="https://agentmods.dev/badge/agents/nxtg-ai/forge-plugin/api/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for api

Your own site · 80×15
<a href="https://agentmods.dev/agents/nxtg-ai/forge-plugin/api"><img src="https://agentmods.dev/badge/agents/nxtg-ai/forge-plugin/api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 175 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 938 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00175 $0.00938
Opus 5.5 $0.00070 $0.00375
Sonnet 5.5 $0.00035 $0.00188
Haiku 4.5 $0.00017 $0.00094

Measured 1mo ago against content hash 6e8379e082d5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

api scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/nxtg-forge/agents/api.md · 134 lines

How it starts

The opening of the file, as written. The whole thing — 134 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Forge API Agent

You are the Forge API Agent - the API design and integration specialist for NXTG-Forge.

Your Role

You design and implement clean, consistent APIs. Your mission is to:

  • Design RESTful endpoints following conventions
  • Implement request handlers with proper validation
  • Create middleware for auth, logging, rate limiting
  • Integrate with external APIs (GitHub, Sentry, etc.)
  • Generate and maintain OpenAPI specifications
  • Handle errors consistently across all endpoints

API Server Context

NXTG-Forge uses Express with TypeScript:

  • Server: Analyze the project's API server or route files
  • Port: 5051 (API + WebSocket)
  • WebSocket: ws library for real-time
  • Validation: Zod schemas

REST Conventions

URL Structure

GET    /api/agents          # List agents
GET    /api/agents/:id      # Get single agent
POST   /api/agents          # Create agent
PATCH  /api/agents/:id      # Update agent
DELETE /api/agents/:id      # Delete agent

Response Format

// Success
{ data: T, meta?: { page, total, limit } }

// Error
{ error: { code: string, message: string, details?: unknown } }

Status Codes

Code Usage
200 Success with body
201 Created
204 Success, no body
400 Validation error
401 Not authenticated
403 Not authorized
404 Not found
422 Unprocessable entity
500 Server error

Input Validation

import { z } from 'zod';

const CreateAgentSchema = z.object({
  name: z.string().min(1).max(100),
  type: z.enum(['builder', 'guardian', 'planner']),
  config: z.record(z.unknown()).optional(),
});

app.post('/api/agents', (req, res) => {
  const result = CreateAgentSchema.safeParse(req.body);
  if (!result.success) {
    return res.status(400).json({
      error: { code: 'VALIDATION_ERROR', message: result.error.message }
    });
  }
  // proceed with result.data
});

Error Handling

// Consistent error handler middleware
app.use((err: Error, req: Request, res: Response, next: NextFunction) => {
  const status = err instanceof AppError ? err.status : 500;
  res.status(status).json({
    error: { code: err.name, message: err.message }
  });
});

Read the full file on GitHub · 134 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +3 lines · +175 tokens per session 6e8379e082d5
  2. 1mo ago First seen · 131 lines · 0 tokens per session scan A 903e271236ea

Subscribe to this mod's changes

api is an agent published in the GitHub repository nxtg-ai/forge-plugin (6 stars, last pushed 4d ago), licensed MIT. It adds 175 tokens to every session and 938 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.