Borrowing it
Nothing to install: this file belongs to redscaresu/goldfinger. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/redscaresu/goldfinger/main/AGENTS.mdgit clone --depth 1 https://github.com/redscaresu/goldfingerWrote 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.
[](https://agentmods.dev/instructions/redscaresu/goldfinger/agents-md)<a href="https://agentmods.dev/instructions/redscaresu/goldfinger/agents-md"><img src="https://agentmods.dev/badge/instructions/redscaresu/goldfinger/agents-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01712 | $0.01712 |
| Opus 5 | $0.00856 | $0.00856 |
| Sonnet 5 | $0.00342 | $0.00342 |
| Haiku 4.5 | $0.00171 | $0.00171 |
Grade A, and why
goldfinger AGENTS.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.
How it starts
The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Guidance for AI agents working in this repository. (CLAUDE.md is a symlink to
this file, so Claude Code reads exactly the same content — one source of truth.)
Two audiences — don't confuse them
- Operating goldfinger (running the CLI, in this repo or elsewhere): run
goldfinger guidefor the operator playbook, or readcmd/guide.md. Do not rely on this file for usage. One convention worth knowing up front: when you're developing a fleet change,mirror --purpose <name>(optionally--branch <b>) into a fresh, timestamped~/goldfinger/<purpose>[-<branch>]-<stamp>snapshot to read and test against — each run gets its own pristine dir, goldfinger never deletes it, so you clean it up when done.mirrorprints that resolved workspace path as a bare line on stdout (banners/ghorg output go to stderr), so capture it rather than globbing for the stamped dir. One gotcha:--branchand--clone-depthare incompatible (a shallow clone only fetches each repo's default branch, so--branch dev --clone-depth 1would silently skipdevwherever it isn't the default) — goldfinger refuses the combo; omit--clone-depthwhen mirroring a non-default branch. Full recipe ingoldfinger guide. - Changing goldfinger's code (you are here): read
README.mdfirst for the product design and rationale, then follow the rules below.
What goldfinger is
An orchestration layer. It resolves a repo selection (org/user + topic), freezes it as a JSON lockfile, then delegates: ghorg mirrors the selection locally, multi-gitter applies changes and opens PRs. goldfinger owns the selection; it does not reimplement mirroring or PR-fanout.
Hard rules
- goldfinger never writes to GitHub and never runs
gititself. Discovery is read-only REST; mirroring is ghorg; commits/pushes/PRs are multi-gitter. Adding agitexec or a PR-create call means you're reinventing a delegated tool — stop. - A real (non-dry-run)
goldfinger applyopens PRs and must never happen on an agent's own initiative or by accident.applydefaults to dry-run; a real run additionally needs--dry-run=false --confirm. An agent may perform the real run only when the human has explicitly authorized this specific fleet change — and then must dry-run first, present the status digest, and prefer--draft. Absent explicit authorization, the real run is the human's to execute. applyrequires--signon every run (local= the operator's own GPG key via the git binary,github= GitHub's web-flow key via the API,none= unsigned) — there is no default. An agent must pass it explicitly and state which mode it used and that mode's trust model when presenting a dry-run or a real run; never silently pick one.- The selection lockfile is authoritative:
mirrorandapplyread it and must never re-run discovery — so "the repos I mirror" and "the repos I change" are provably the same set, which is the whole product. Themirrorreport is built from the lockfile alone (nogit, no re-discovery): branch presence is a fact recorded at selection time (select --branch-presence) and can drift, so a branch never checked reportsunknown— do not add code that guesses it. goldfinger scan(cmd/scan.go, cmd/scan_search.go) is the read counterpart toapply: it searches the clonesmirroralready put on disk and never touches GitHub. It reads the lockfile for its repo set (never re-discovery) and searches only those repos under the workspace — the same provable-same-set guarantee applied to reads, asserted by a test that a rogue on-disk clone outside the selection is ignored. Keep it purely local: no git, no network, no token — the search is Go stdlibregexp(RE2) over files read withos.ReadFile. A selected repo not on disk must reportscanned:falsewith a skip reason (never silently dropped); binary files and symlinks are skipped by design; a per-repo match cap or an over-size file skipped setstruncated:trueso a bounded scan never reads as exhaustive. Do not add a REST/code-search content scan here — reading via the mirror instead of the API is the point.- Tokens go to child tools via their env vars (
GHORG_GITHUB_TOKEN,GITHUB_TOKEN), never argv. Tests assert no token appears in argv. goldfinger mcp(cmd/mcp.go) serves goldfinger's read-and-plan surface over MCP on stdio as thin adapters over the existing report cores (no logic of its own). It must stay read-and-plan: there is deliberately noapplytool —apply_planreturns the digest-boundapplycommand for a human to run, andapply_planmust never callapply.Apply(a negative test asserts it succeeds fully offline, with no token and no child tool). Do not add a tool that opens PRs or runsgit. The StdioTransport owns the process's real stdin/stdout as the JSON-RPC channel, so no tool may write to them: delegate output is captured and token-redacted, never streamed. The go-sdk MCP dep was maintainer-approved for this (issue #58).- The machine surfaces are self-describing and must stay honest:
guide --jsonis the input catalogue (kept in sync with the validators by tests) andgoldfinger schemais the output contract — hand-authored JSON Schema for the lockfile and every payload, pinned to the Go structs by a golden file and a reflection test (properties= the struct's json fields;required= its non-omitempty fields). Change a payload's shape and you must regenerate the golden (go test ./cmd -run TestSchema -update) and keep the schema builder in step, or the tests fail — that coupling is deliberate, don't loosen it. - Flat packages (
cmd/,models/,client/,discovery/,selection/,mirror/,apply/); nointernal//pkg/. Tests alongside code, testify. - Go module deps are pinned (cobra, go-github, testify); adding one needs asking.
ghorg and multi-gitter are runtime CLI deps invoked via
exec, checked on PATH.
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.
- 6d ago First seen · 102 lines · 1,712 tokens per session scan A 628aa22c68ff
goldfinger AGENTS.md is an instructions file published in the GitHub repository redscaresu/goldfinger (9 stars, last pushed 11d ago), licensed Apache-2.0. It adds 1,712 tokens to every session, about $0.0086 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-31.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.