map

A codebase-mapping command for generated OpenAPI code. OpenAPI is a standard description of an HTTP API; the command finds where its generated functions, hooks, and types are used in the project.

In plain words
What is it for?
Use it to map all API usage, or narrow the search to one API area or exported function, and save a usage summary for later checks.
Why use it?
It shows which pages, components, and other code may be affected by an API change. This makes the impact of changing generated API code easier to track.

Command

Part of the oas plugin — 6 skills, 6 commands shipped together

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.

agentmods
npx agentmods add commands/jhlee0409/claude-plugins/map
Clone the repo
git clone --depth 1 https://github.com/jhlee0409/claude-plugins

Or install oas, the plugin that ships this one along with the rest of its 6 skills, 6 commands.

Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,268 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00012 $0.02268
Opus 5 $0.00006 $0.01134
Sonnet 5 $0.00002 $0.00454
Haiku 4.5 $0.00001 $0.00227

Measured 3d ago against content hash a4d3050b8aed, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

map 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 3d 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/oas/commands/map.md · 377 lines

How it starts

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

OpenAPI Map

Discover and track where your generated API code is used throughout your codebase. Essential for understanding impact of API changes.


EXECUTION INSTRUCTIONS

When /oas:map is invoked, Claude MUST perform these steps in order:

Step 0: MCP Dependency Check

Invoke skill: mcp-dependency

  • Verify OpenAPI Sync MCP server is installed
  • If not available, offer to install via npm install -g @jhlee0409/openapi-sync-mcp
  • Only proceed after MCP is confirmed available
  1. Load config - Read .openapi-sync.json for generated file locations
  2. Identify API exports - Find all exported functions, hooks, types
  3. Search codebase - Find all files that import these exports
  4. Build usage graph - Map API → Components/Pages/Hooks
  5. Store mapping - Save to .openapi-sync.state.json
  6. Report results - Show usage summary

Usage

# Full codebase mapping
/oas:map

# Map specific domain only
/oas:map --tag=users

# Map specific export
/oas:map --export=useUser

# Show detailed usage
/oas:map --verbose

Step 1: Load Configuration

1. Read .openapi-sync.json
2. Identify generated domains from entities/ or api/ directory
3. For each domain, find:
   - API functions (e.g., userApi.getUser)
   - Query hooks (e.g., useUser, useCreateUser)
   - Types (e.g., User, CreateUserRequest)

Step 2: Identify API Exports

Scan generated API files and extract exports:

// From src/entities/users/api/users-queries.ts
export const useUsers = ...     // Hook export
export const useUser = ...      // Hook export
export const useCreateUser = ...// Hook export

// From src/entities/users/api/users-api.ts
export const userApi = {        // API object export
  list: ...,
  get: ...,
  create: ...,
}

// From src/entities/users/model/types.ts
export interface User { ... }           // Type export
export interface CreateUserRequest { }  // Type export

Build export registry:

{
  "users": {
    "hooks": ["useUsers", "useUser", "useCreateUser", "useUpdateUser", "useDeleteUser"],
    "api": ["userApi"],
    "types": ["User", "CreateUserRequest", "UpdateUserRequest", "UserFilters"]
  }
}

Read the full file on GitHub · 377 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. 3d ago First seen · 377 lines · 12 tokens per session scan A a4d3050b8aed

Subscribe to this mod's changes

map is a command published in the GitHub repository jhlee0409/claude-plugins (4 stars, last pushed 7mo ago), licensed MIT. It adds 12 tokens to every session and 2,268 once invoked, about $0.0001 per session on Opus 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.