sniff
AGENTS.md4 starsChanged 6 months agoApache-2.0View on GitHub
Instructions for AI agents and coding assistants working in, or invoking, this repository. Plain Markdown, no required fields (per the AGENTS.md convention: the agent simply parses the text below). Human-facing docs live in README.md; this file holds the extra context an agent needs. sniff is an autonomous QA scanner: point it at a running web app and it walks the app's real user flows in a real (headless) browser and reports what's actually broken, with proof. It is not a…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,691 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- sniff-fixSkill
- sniff-reportSkill
- sniffSkill
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Prefer the MCP sniff tool over the CLI when running inside an agent host (Claude Code, Cursor, VS Code/Copilot, Codex, Gemini CLI, …
- Very specific: line 16
mode: "run" / "discover"are legacy: prefer walk. run does a source+browser audit. - Very specific: line 28
When you see needsSetup: "playwright-browsers": call the sniff_install MCP tool with the same projects, then retry the original sniff call.
- Very specific: line 34
Every finding is a QaFinding (see src/crawl/types.ts).
- Distinctive: line 87
Keep authoring and verification as separate passes.
≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md 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
AGENTS.md: sniff
Instructions for AI agents and coding assistants working in, or invoking, this repository. Plain Markdown, no required fields (per the AGENTS.md convention: the agent simply parses the text below). Human-facing docs live in README.md; this file holds the extra context an agent needs.
What this repo is
sniff is an autonomous QA scanner: point it at a running web app and it walks the app's real user flows in a real (headless) browser and reports what's actually broken, with proof. It is not a static linter. npm package sniff-qa (binaries sniff and sniff-qa); ships as both a CLI and an MCP server (Claude Code plugin); Apache-2.0; Node >= 22; no API key required.
How an agent should USE sniff
Prefer the MCP sniff tool over the CLI when running inside an agent host (Claude Code, Cursor, VS Code/Copilot, Codex, Gemini CLI, Windsurf, Continue.dev). There is one unified sniff tool; pass { mode, rootDir, baseUrl? }.
mode: "walk"(RECOMMENDED, for a running app): drives a real browser, walks the app's user flows, and returns real bugs with reproduction proof. PassrootDir(absolute project path) and, optionally,baseUrl(the running app's URL). IfbaseUrlis omitted, sniff auto-detects the local dev server. If no app is running, it degrades to a source scan and tells you so via anotefield (start the dev server or passbaseUrlto get runtime bugs). Useful options:maxPages(default 25),mobile(default true, the 375px responsive pass),all(default false, includeuncertainfindings).mode: "scan"(source-only, no browser): passrootDironly. Finds placeholder/TODO/console.log/dead links/etc. by reading source. Works offline; no browser needed.mode: "report": load the last results forrootDir(format: "json" | "summary").mode: "run" / "discover"are legacy: preferwalk.rundoes a source+browser audit;discoverdoes scenario-based E2E.
Handling the Playwright setup gate
The first browser run needs a Chromium build (~165 MB). The MCP browser modes do not silently shell out to install it (the ~45s install can time out the stdio transport). Instead they return:
{ "needsSetup": "playwright-browsers", "projects": ["chromium"],
"installCommand": "npx playwright install chromium", "installSizeMb": 165,
"hint": "Run the sniff_install MCP tool with the same projects, or run the install command manually, then retry." }When you see needsSetup: "playwright-browsers": call the sniff_install MCP tool with the same projects, then retry the original sniff call. Do not report this as a failure; it is expected on first use. Disclose the one-time ~165 MB download to the user honestly.
The narrow tools (sniff_scan, sniff_run, sniff_discover, sniff_report, sniff_install) remain registered for back-compat and scoped capabilities, but new work should go through the unified sniff tool.
Finding output schema
Every finding is a QaFinding (see src/crawl/types.ts). A finding without reproduction proof is not a finding; the engine never emits one without at least a route and ordered steps.
interface QaFinding {
ruleId: string; // e.g. "route/broken-page"
issueClass: number; // 1–12, see the table below
title: string;
severity: Severity; // critical | high | medium | low | info
confidence: 'confirmed' | 'likely' | 'uncertain';
reproduction: {
url: string; // full URL observed
route: string; // normalized pathname (grouping/scoring)
steps: string[]; // ordered, human-readable actions
screenshotPath?: string; // screenshot captured at the finding
consoleExcerpt?: string[]; // relevant console errors/warnings
networkExcerpt?: string[]; // relevant failed/relevant network lines
};
suggestedFix: string;
needsOutOfBandVerification?: boolean; // true when the real outcome can only
// be confirmed outside the browser
}Confidence semantics: confirmed = deterministically reproduced with proof (HTTP 500, axe violation, measured overflow); likely = a strong heuristic fired but a benign explanation is conceivable; uncertain = worth a look but easily a false positive, suppressed by default, surfaced only with all: true / --all. Why false positives stay low: a first-party noise filter drops favicons/analytics/HMR/expected-auth/engine-aborts, axe-core (zero-false-positive by design) backs the accessibility findings, and a broken page is reported once rather than re-flagged.
The 12 issue classes (issueClass)
- Broken pages/routes (4xx/5xx, blank renders, crash screens)
- Broken links (internal + external)
- Console errors / uncaught exceptions / failed network requests during interaction
- Empty data + placeholder/fake data (lorem, TODO,
test@test.com) - Broken forms (dead submit button, validation that never fires)
- State-loss (fill a form, go back, it's wiped)
- Flow regressions / dead-ends
- Bad loading states (infinite spinner) + missing error states
- Broken async outcomes (submitted but no success feedback, flagged
needsOutOfBandVerification) - Responsive issues (overflow, tiny tap targets)
- Accessibility (missing alt/labels, contrast, via axe-core)
- Unclear/buried primary actions
What the agent should NOT do
- Do not claim a fix worked without re-running sniff. A fix is verified by re-running
mode: "walk"against the running app and confirming the finding is gone, not by reading the diff. - Do not treat
uncertainfindings as confirmed. They are hidden by default for a reason; only escalate them after independent verification, and never present them as proven defects. - Do not run against production without care.
walkdrives a real browser and submits forms / clicks buttons. Point it at a dev/staging server (or the auto-detected local dev server). Against any shared environment, get explicit user sign-off first; never run destructive flows against live data. - Do not invent findings, severities, or fixes. Report only what sniff produced, with its reproduction proof attached. Do not fabricate routes, steps, or screenshots.
Developing in this repo
- Build:
npm run build(tsup →dist/). Typecheck:npm run typecheck. - Test:
npx vitest run(full suite). Co-located*.test.tsfiles live next to the source they cover (e.g.src/mcp/server.test.ts,src/crawl/,src/discovery/). - Regression fixture & scorer (
sniff-tests/):planted-bugs/is a deliberately broken app (21 planted bugs across all 12 issue classes plus a clean control page at/clean);score-fixture.mjs(usingscore-lib.mjs) scores a sniff JSON report againstplanted-bugs/MANIFEST.jsonfor recall, precision proxy, and hard false positives on the clean page. The locked target is 21/21 found at 100% precision with 0 false positives.run-crawl.mjsdrives a crawl against the fixture;mcp-smoke.mjssmoke-tests the MCP server. - MCP surface lives in
src/mcp/(server.tsregisters tools;handlers.tsimplements them). The flow-walk engine is insrc/crawl/; the finding/report types are insrc/crawl/types.tsandsrc/core/types.ts. - Keep authoring and verification as separate passes. After any engine change, re-run the fixture scorer and the vitest suite; do not declare done until both pass.
10x marketplace
sniff is part of the 10x plugin marketplace (github.com/Aboudjem/10x). Install via:
claude plugin marketplace add Aboudjem/10x then claude plugin install sniff@10x.
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.

