apitap CLAUDE.md

apitap CLAUDE.md is an instructions file for Claude Code from n1byn1kt/apitap. It costs 1,683 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.

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 instructions/n1byn1kt/apitap/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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,683 This file is loaded in full into every session.
When invoked 1,683 The same file — it is already loaded in full.
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.1 $0.01683 $0.01683
Opus 5 $0.00842 $0.00842
Sonnet 5 $0.00337 $0.00337
Haiku 4.5 $0.00168 $0.00168

Measured 6d ago against content hash b40a23a03e8d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

apitap CLAUDE.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 6d 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.

CLAUDE.md · 82 lines

How it starts

The opening of the file, as written. The whole thing — 82 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 with fetch() — 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 fetch):

Skill file → replay/engine.ts → fetch() → 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 fetch(). Auth comes from AuthManager, never from the skill file itself.
  • 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 · 82 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. 6d 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 (125 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 1,683 tokens to every session, about $0.0084 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-30.

Related

Other instructions, from other repositories

browserkit AGENTS.md

AGENTS.md instructions for browserkit-dev/browserkit, covering agents.md — workspace memory, project: browserkit, browser lifecycle, browser control and design process preferences.

browserkit-dev/browserkit · 4,572 tokens

moli AGENTS.md

AGENTS.md instructions for lexmount/moli: Before committing changes that modify Rust source code or Rust build metadata (such as Cargo.toml, Cargo.lock, or rust-toolchain), run all of the following from the repository root and ensure they pass.

lexmount/moli · 105 tokens

flyto-core AGENTS.md

AGENTS.md instructions for flytohub/flyto-core, covering flyto-core agent rules, flyto2 project memory contract, flyto2 frontend quality gate and repo notes.

flytohub/flyto-core · 1,121 tokens

web-developer-mcp CLAUDE.md

Instructions for Artmann/web-developer-mcp, covering claude instructions for webdev mcp server, development guidelines, code style & organization, project structure and browser management.

Artmann/web-developer-mcp · 1,161 tokens

fanqie-publisher-skill AGENTS.md

Instructions for amm10090/fanqie-publisher-skill, covering fanqie-publisher-skill — codex cli agent adapter, read first, prerequisites, entry points and utf-8 / unicode safeguards.

amm10090/fanqie-publisher-skill · 1,287 tokens

fanqie-publisher-skill CLAUDE.md

Instructions for amm10090/fanqie-publisher-skill, covering fanqie-publisher-skill — claude code adapter, read first, entry points, prerequisites and utf-8 / unicode safeguards.

amm10090/fanqie-publisher-skill · 1,107 tokens