geiger
CLAUDE.md158 starsChanged 3 months agoMITView on GitHub
Read this first. It captures what isn't obvious from the code. (This file is public — project/business context lives elsewhere.) geiger — a Geiger counter for AI agents. One read-only command that inventories every AI agent, harness, MCP server, plugin, and AI extension on a machine and reports what each can touch. Published as geiger-scan on npm (npx geiger-scan), MIT, from github.com/Atomburstofficial/geiger. 1. Read-only. The only writes are the report files the user names (--json, --html). Never execute anything discovered…
The file
We split this CLAUDE.md into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 3
Read this first. It captures what isn't obvious from the code.
- Distinctive: line 18
No telemetry: No endpoint exists. Do not add one, "just for counts."
- Distinctive: line 91
Every new detector: fixture files + assertions in the fixture-home test.
- Very specific: line 99
Commit, push, then git tag -a vX.Y.Z -m "..." and push the tag.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.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
CLAUDE.md — working context for geiger
Read this first. It captures what isn't obvious from the code. (This file is public — project/business context lives elsewhere.)
What this is
geiger — a Geiger counter for AI agents. One read-only command that
inventories every AI agent, harness, MCP server, plugin, and AI extension on
a machine and reports what each can touch. Published as geiger-scan on npm
(npx geiger-scan), MIT, from github.com/Atomburstofficial/geiger.
Hard invariants (the product IS these — never trade them away)
- Read-only. The only writes are the report files the user names
(
--json,--html). Never execute anything discovered (no npm, no binaries, nothing). Reads configs and directories only. - No telemetry. No endpoint exists. Do not add one, "just for counts."
- Secrets by shape only. Report key name + file + shape, never any part
of a value.
redact()runs on every serialized output path as defense-in-depth, andtest/engine.test.jshas a REDACTION GUARANTEE test that enforces it. Any new output path must go throughredact(). - Zero runtime dependencies, no build step. The source people read is the code that runs — that readability is the trust model. Keep modules small; a reader should manage the whole thing in one sitting.
- Never crash. Detectors run inside try/catch in
engine.run(); failures becomediagnosticsentries, never swallowed, never fatal. File readers inutil/fsx.jsnever throw;readTextstrips a leading UTF-8 BOM (Windows tools write one by default — a BOM'd config once vanished from reports);parseJsonToleranthandles comments, trailing commas, and lone Windows backslashes (documented\t-ambiguity caveat). Parse errors are labeled by location only: V8's "Unexpected token" messages quote file text, which can be part of a credential. Every detector that reads a JSON config must turn a parse error intocommon.js#unparseableFinding, never skip the file. - Honest labels. Exposure labels (EXECUTES, HOLDS-SECRETS,
BROAD-FILESYSTEM, BROAD-WEB, NETWORK, UNKNOWN-ORIGIN) claim only what a
config proves. Partially-parseable formats (TOML, JetBrains XML) are
shape-scanned and marked
medium/lowconfidence rather than skipped or overclaimed. Limitations are stated in README, terminal footer, and HTML footer — keep them current.
Architecture
bin/geiger.js— CLI: flags--help --json <f> --html <f> --strict --home <dir> --path <dir>(repeatable)--diff <baseline.json>. With--diff,--strictgates on drift (new hot findings) only.src/engine.js—run()(detector loop),finding()normalizer,assessMcpServer()(ONE definition of what an MCP server entry means: wrapper-aware--split for policy agents, npx/docker/local-script origin tracing),actionsFor()(plain-language remediation).src/detectors/— one module per ecosystem, registered inindex.js. Adding an ecosystem = one module + one line + a fixture + an assertion.common.js#findingsFromMcpFile(file, detector, hostLabel, key)for any JSON config holding MCP servers (key varies:mcpServers,servers,context_servers,mcp).src/redact.js— shape regexes,classifyValue,scanEnvObject(key-name heuristic),scanText,redact().src/patterns.js— shape patterns for text geiger reads but never runs:RISKY_COMMANDS(pipe-to-shell, base64 exec, bare-IP endpoint, credential file read, history rewrite) andSTEERING_TEXT(instruction override, hide-from-user, exfiltration, approval bypass). A hit is a note, never a verdict; keep the lists short and keep a benign twin in the tests so a new pattern cannot silently start false-positiving.src/skill-scan.js—inspectSkill(dir)reads a skill's instruction file (SKILL.md and friends), folds YAML block-scalar descriptions (description: >— reading line one yields a useless>), and returns notes + shape-only secrets. The body is never copied into a report.src/detectors/git-hooks.js—.git/hooks(never*.sample),core.hooksPath, and[merge "x"] drivercommands.programsIn()reports the programs a hook invokes rather than its first line, because real hooks open with guard clauses: it skips comments, heredoc bodies, multi-linepython -c "..."payloads and redirections. Git fixtures cannot be checked in (git refuses any path containing a.gitcomponent) — build them in a temp dir inside the test.src/platform.js— all per-OS paths, honoringGEIGER_HOME/GEIGER_PLATFORMenv for tests. Detectors stay platform-agnostic.src/diff.js— baseline comparison; identity = detector|kind|name|origin; escalation (gained exposure/credential) = CHANGED, not remove+add.src/report/terminal.js+html.js— both render the drift section; both pipe everything throughredact().data/known-agents.json— community-updatable IDs (VS Code extensions, npm globals, browser-extension name hints).
Testing
npm test(barenode --test— passing a dir breaks on Windows).- Fixtures live in
test/fixtures/home1(a fake home dir; detectors read it viaGEIGER_HOME+GEIGER_PLATFORM=win32).emptyfixture must keep yielding zero findings/diagnostics. - Every new detector: fixture files + assertions in the fixture-home test.
- Dogfood after changes:
node bin/geiger.json the dev machine — output should be diagnostic-free.
Release process (fully automated — do NOT npm publish manually)
- Bump
versionin package.json, writedocs/release-notes-vX.Y.Z.md(H1 becomes the GitHub Release title, rest becomes the body). - Commit, push, then
git tag -a vX.Y.Z -m "..."and push the tag. .github/workflows/release.ymltests on a clean runner, publishes to npm via Trusted Publishing (OIDC — no tokens anywhere) with--provenance, and creates the GitHub Release. Registry propagation takes ~2–4 minutes; verify withnpm view geiger-scan versionand annpx geiger-scan@X.Y.Zsmoke run.docs/and.github/stay out of the npm tarball via the package.jsonfileswhitelist — keep it that way.
Conventions
- No AI-attribution trailers in commits (owner policy; history was rewritten once to remove them — don't reintroduce).
- Comment style: sparse, only for constraints the code can't show.
- Windows dev note: backslash-heavy content (fixtures, samples) goes through
editor tooling, not bash heredocs/inline
node -e— quoting mangles it. - Sample reports in
docs/(sample-report.html/.json/.png) are generated from the fixture home and sanitized to generic paths (C:\Users\alex) — regenerate + re-sanitize + re-screenshot together if report rendering changes. - The README coverage table has a mirror on the product page (atomburst.io/geiger, maintained in a separate repo) — flag coverage changes so the page gets synced.
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.

