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.
npx agentmods add instructions/ycs77/apifable/agents-mdgit clone --depth 1 https://github.com/ycs77/apifableWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00771 | $0.00771 |
| Opus 5 | $0.00385 | $0.00385 |
| Sonnet 5 | $0.00154 | $0.00154 |
| Haiku 4.5 | $0.00077 | $0.00077 |
Grade A, and why
apifable AGENTS.md 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 49 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Keep This File Strict
- Do not add repo tours, architecture summaries, or file inventories.
- Only keep constraints, non-obvious behavior, and things an agent must not do.
- If a fact is easy to find with grep, it probably does not belong here.
Constraints
- Node.js v22+
- Zod v4
- MCP SDK protocol version
2025-11-25(stable) - Bundler is
tsdown, nottsc - TypeScript formatting: 2 spaces, single quotes, no semicolons, trailing commas
Commands
pnpm buildpnpm lint --fixpnpm lint [...files] --fixpnpm fmtpnpm fmt [...files]pnpm typecheckpnpm test --run
Rules
- Config priority: CLI flag > config > default value
- Prefer pure-function tests first; controlled temp-dir fs tests are allowed, but skip MCP handlers, CLI code, prompt flows, process.exit paths, and real network calls
- Do not reintroduce ParsedSpec cache assumptions; parsed specs are built directly
Non-Obvious Behavior
HTTP_METHODSandisValidHttpMethodlive insrc/http-methods.ts; do not re-declare method lists in tools or parserssearch_endpointsdefaultlimitis 10; max is 100search_schemasdefaultlimitis 10; max is 100search_endpointsandsearch_schemasreturn real match count intotal; truncated responses usehasMoresearch_endpointsfuzzy fallback uses MiniSearch withfuzzy: 0.2and prefix matching; response includesmatchType, fuzzy results includescore, empty fuzzy results includemessageget_endpointvalidates mutually exclusive modes in the tool function, not the handler; valid modes aremethod+pathoroperationId; emptyoperationIdis an errorget_endpoint,get_types,get_schema, andlist_endpoints_by_tagusesrc/tools/suggestions.tsfor guided not-found errors;findSimilarNamestries substring matches before MiniSearch fuzzy fallback and returns up to 5 suggestionslist_endpoints_by_tagsupportslimitandoffset; response includestotal,offset,hasMore; warn whentotal > 30 && limit === undefinedget_typesaccepts exactly one mode per call:schemas,method+path, oroperationId; mixing modes is an errorget_typesreturns self-contained TypeScript declarations as code text with no importsget_typessupports inline JSON request/response schemas throughsrc/tools/inline-schemas.ts; names are{PascalOperationId}Request|Responseor{Method}{NormalizedPath}Request|Responsewhen there is nooperationId- Inline schema extraction only promotes top-level non-
$refJSON request schemas and first 2xx response schemas to inline roots; nested$refvalues still use normal dependency tracking - Zod schemas use
.loose()to allow unknown keys; path-specific errors for invalid known field types (not.passthrough()which is deprecated in Zod v4) - Auth headers live in
.apifable/auth.jsonand are not version-controlled;spec.headersin config is for non-secret headers; auth values override config on key conflict; both support${ENV_VAR}expansion and keep undefined vars unchanged
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.
- 2d ago First seen · 49 lines · 771 tokens per session scan A 36da8bd3c774
apifable AGENTS.md is an instructions file published in the GitHub repository ycs77/apifable (10 stars, last pushed 16d ago), licensed MIT. It adds 771 tokens to every session, about $0.0039 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.
Other instructions, from other repositories
scalar AGENTS.md
Instructions for scalar/scalar, covering agents.md - ai agent guide for scalar, project overview, prerequisites, first-time setup and commands.
scalar CLAUDE.md
Instructions for scalar/scalar, a project described as: Scalar is an open-source API platform: 🌐 Modern REST API Client 📖 Beautiful API References ✨ 1st-Class OpenAPI/Swagger Support.
api-gateway CLAUDE.md
Instructions for membrane/api-gateway, covering claude.md, working principles, 1. think before coding, 2. simplicity first and 3. surgical changes.
LAP CLAUDE.md
Instructions for Lap-Platform/LAP, covering lap - lean api platform, what this is, quick reference, install and run tests.
lathe CLAUDE.md
Instructions for lathe-cli/lathe, covering claude.md, project intent, product positioning, source of truth and project structure.
oastools copilot-instructions.md
Instructions for erraggy/oastools, covering github copilot instructions for oastools, how to use this file, project overview, specification references and key openapi specification concepts.