apitap
Copilot instructions127 starsChanged 6 months agoApache-2.0View on GitHub
Supporting layers: - src/discovery/ runs framework detection, OpenAPI probing, and endpoint probes in parallel. - src/orchestration/browse.ts is the high-level pipeline (cache -> disk -> discover -> replay). - src/read/ provides peek/read text-mode extraction with site-specific decoders and generic fallback. - src/mcp.ts exposes MCP tools over the same core pipeline; external API responses are marked untrusted.
The file
We split this copilot-instructions.md into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Run CLI from source: npx tsx src/cli.ts <command> [args]
- Very specific: line 25
ESM + NodeNext rules are strict: use .js in TS imports (e.g.
- Very specific: line 26
CLI-first surface area: keep behavior exposed via src/cli.ts commands, and ensure machine-readable --json output remains consistent.
- Very specific: line 27
Website-fetch workflow priority: when data is needed from a site, prefer apitap show <domain> → apitap replay <domain> <endpoint-id>.
- Very specific: line 30
Test layout mirrors source layout: add/update tests under test/ matching src/ paths.
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Copilot Instructions for ApiTap
Build and test commands
- Install deps:
npm install - Full test suite:
npm test(Node test runner vianode --import tsx --test 'test/**/*.test.ts') - Single test file (example):
node --import tsx --test test/capture/filter.test.ts - Type check:
npm run typecheck - Lint: no dedicated lint script is configured in
package.json - Build:
npm run build - Run CLI from source:
npx tsx src/cli.ts <command> [args] - Install Chromium for browser-required flows (
capture/browse):npx playwright install chromium
High-level architecture
ApiTap has two primary execution paths that share skill-file artifacts:
- Capture path (browser required): Playwright/CDP capture in
src/capture/monitor.tsandsrc/capture/session.tscollects traffic,src/capture/filter.tsremoves noise, thensrc/skill/generator.tsdeduplicates bymethod + parameterizedPathand writes skill files throughsrc/skill/store.tsto~/.apitap/skills/<domain>.json. - Replay path (browser-free):
src/replay/engine.tsloads a skill file, substitutes params, injects credentials fromsrc/auth/manager.ts, applies SSRF/header protections fromsrc/skill/ssrf.ts, then executes requests with stdlibfetch().
Supporting layers:
src/discovery/runs framework detection, OpenAPI probing, and endpoint probes in parallel.src/orchestration/browse.tsis the high-level pipeline (cache -> disk -> discover -> replay).src/read/providespeek/readtext-mode extraction with site-specific decoders and generic fallback.src/mcp.tsexposes MCP tools over the same core pipeline; external API responses are marked untrusted.
Key repository conventions
- ESM + NodeNext rules are strict: use
.jsin TS imports (e.g.import { x } from './y.js'). - CLI-first surface area: keep behavior exposed via
src/cli.tscommands, and ensure machine-readable--jsonoutput remains consistent. - Website-fetch workflow priority: when data is needed from a site, prefer
apitap show <domain>→apitap replay <domain> <endpoint-id>; if no skill file exists, tryapitap read <url>before browser-basedcapture/browse. - Skill files are central artifacts: endpoint metadata belongs in skill JSON, but auth secrets must never be stored there; auth stays in encrypted storage.
- Security checks are part of normal flow: preserve SSRF validation, header filtering, DNS/redirect checks during import and replay paths.
- Test layout mirrors source layout: add/update tests under
test/matchingsrc/paths; use Node's built-innode:teststyle. - Dependency discipline: replay path should prefer stdlib
fetch; keep Playwright usage scoped to capture/auth browser flows.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

