apitap: Instructions file for Claude Code

CLAUDE.md

apitap CLAUDE.md is an instructions file for Claude Code from n1byn1kt/apitap. It costs 1,922 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for ApiTap, a tool that retrieves data from websites by replaying captured web API requests or reading pages directly.

In plain words
What is it for?
Use them when fetching website data, running tests, checking types, building the project, or running the command-line tool.
Why use it?
They define the preferred retrieval order, helping agents avoid opening a browser when a reusable API description is available.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is n1byn1kt/apitap's own configuration. It tells Claude Code how to work on apitap itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything apitap configures →

Reuse

Borrowing it

Nothing to install: this file belongs to n1byn1kt/apitap. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/n1byn1kt/apitap/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/n1byn1kt/apitap

Made for: Claude Code.

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 apitap CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/n1byn1kt/apitap/claude-md/github.svg)](https://agentmods.dev/instructions/n1byn1kt/apitap/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/n1byn1kt/apitap/claude-md"><img src="https://agentmods.dev/badge/instructions/n1byn1kt/apitap/claude-md/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 apitap CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/n1byn1kt/apitap/claude-md"><img src="https://agentmods.dev/badge/instructions/n1byn1kt/apitap/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,922 This file is loaded in full into every session.
When invoked 1,922 The same file — it is already loaded in full.
Security scan A 1 finding. 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.01922 $0.01922
Opus 5.5 $0.00769 $0.00769
Sonnet 5.5 $0.00384 $0.00384
Haiku 4.5 $0.00192 $0.00192

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

Security

Grade A, and why

apitap CLAUDE.md scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **SSRF defense is multi-layered**: validated at import, at replay, per redirect hop, and — the enforcement point — inside the connection's own DNS lookup (`validatingLookup`), so the checked address is the connected ad
CLAUDE.md · 84 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Using ApiTap as an MCP Tool

When asked to fetch data from a website, always check for existing skill files first:

  1. apitap show <domain> — check if a skill file already exists
  2. If it exists → use apitap replay <domain> <endpoint-id> (no browser needed)
  3. If no skill file → try apitap read <url> first (text extraction, no browser)
  4. Only use apitap capture or apitap browse as a last resort (requires browser)

The replay path is the fast path. It calls APIs directly over HTTP — no browser, no Playwright, no Chrome. Don't open a browser if a skill file already exists.

Commands

npm test                                          # Run all tests (~721, Node built-in runner + tsx)
node --import tsx --test test/path/to/test.ts     # Run a single test file
npm run typecheck                                 # Type check (tsc --noEmit)
npm run build                                     # Compile to dist/
npx tsx src/cli.ts <command> [args]               # Run CLI from source

Architecture

ApiTap intercepts web API traffic via browser, generates portable "skill files," and replays APIs without a browser. Two distinct runtime paths:

Capture path (requires Playwright):

Browser → CDP listener (monitor.ts) → filter.ts → SkillGenerator → skill.json on disk

Replay path (zero dependencies, stdlib node:http):

Skill file → replay/engine.ts → net/transport.ts pinnedFetch() → JSON response

Module Map

  • src/capture/ — Browser-side interception. monitor.ts is the Playwright CDP listener. session.ts wraps monitor into a stateful interactive session (used by MCP capture_start/capture_interact/capture_finish). filter.ts scores requests to separate API calls from noise. parameterize.ts converts /users/123 → /users/:id.
  • src/skill/ — Skill file lifecycle. generator.ts groups captured exchanges, deduplicates by method + parameterizedPath, extracts auth/pagination/body templates. store.ts reads/writes ~/.apitap/skills/<domain>.json. signing.ts provides HMAC-SHA256 integrity. ssrf.ts validates URLs against private IP ranges.
  • src/replay/ — engine.ts substitutes params, injects auth from encrypted storage, validates URLs via SSRF checks, and calls transport.fetch() (src/net/transport.ts). Auth comes from AuthManager, never from the skill file itself.
  • src/net/ — transport.ts: pinnedFetch(), a fetch-compatible client over node:http(s) whose DNS lookup rejects private addresses at connect time (closes DNS rebinding), never follows redirects, never pools sockets. fetchFollowing() adds fetch-style redirect following where every hop is re-checked and Authorization/Cookie are dropped on cross-origin hops. Every outbound HTTP call goes through here: replay, OAuth refresh, verifier, spec importers (GitHub/APIs.guru/SwaggerHub), and (via safeFetch) read/peek/discovery.
  • src/discovery/ — Browser-free API detection. frameworks.ts detects WordPress/Next.js/Shopify from HTML/headers. openapi.ts probes for specs. probes.ts checks common API paths. index.ts orchestrates all three in parallel.
  • src/read/ — Text-mode content extraction. Site-specific decoders (Reddit, YouTube, Wikipedia, HN, Twitter, Grokipedia, DeepWiki) in decoders/. Falls back to generic HTML extraction in extract.ts. peek.ts does HEAD-only triage.
  • src/auth/ — manager.ts stores/retrieves encrypted credentials (AES-256-GCM). refresh.ts handles browser-based token refresh. handoff.ts opens a visible browser for human login. oauth-refresh.ts handles OAuth refresh_token flows.
  • src/orchestration/ — browse.ts is the high-level "just get me the data" pipeline (cache → disk → discover → replay). cache.ts is an in-memory session cache for the MCP server.
  • src/cli.ts — Hand-rolled arg parser, all CLI commands. No framework (no yargs/commander).
  • src/mcp.ts — MCP server (12 tools) using @modelcontextprotocol/sdk. All responses from external APIs are wrapped with untrusted: true metadata.
  • src/plugin.ts — Lightweight non-MCP plugin interface (search + replay + batch tools).
  • src/serve.ts — Serves a single skill file as a dedicated MCP server where each endpoint becomes its own tool.

Read the full file on GitHub · 84 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 · +54 tokens per session 631ad6624bf2
  2. 1mo ago Changed · +2 lines · +185 tokens per session 3ab0cfb0ed3f
  3. 2mo ago First seen · 82 lines · 1,683 tokens per session scan A b40a23a03e8d

Subscribe to this mod's changes

apitap CLAUDE.md is an instructions file published in the GitHub repository n1byn1kt/apitap (131 stars, last pushed 17d ago), licensed Apache-2.0. It adds 1,922 tokens to every session, about $0.0077 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

apitap CLAUDE.md compared with instructions from other repositories

apitap CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
apitap CLAUDE.mdn1byn1kt/apitapInstructions file13117d agoApache-2.0A1,922Claude Code
qmax-mcp copilot-instructions.mdQuality-Max/qmax-mcpInstructions file44d agoMITA451GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot