goldfinger: Instructions file for Codex

AGENTS.md

goldfinger AGENTS.md is an instructions file for Codex, OpenCode from redscaresu/goldfinger. It costs 1,712 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for goldfinger, including separate guidance for operating the command-line tool and developing it.

In plain words
What is it for?
Use them when developing goldfinger, reading its operator guidance, mirroring repositories for testing, or preparing changes.
Why use it?
They help agents follow the project’s rules, avoid confusing its two audiences, and handle mirrored test workspaces and commits correctly.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

This is redscaresu/goldfinger's own configuration. It tells Codex and OpenCode how to work on goldfinger itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything goldfinger configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/redscaresu/goldfinger/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/redscaresu/goldfinger

Made for: Codex, OpenCode.

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 goldfinger AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/redscaresu/goldfinger/agents-md.svg)](https://agentmods.dev/instructions/redscaresu/goldfinger/agents-md)
Your own site
<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>
Per session 1,712 This file is loaded in full into every session.
When invoked 1,712 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.01712 $0.01712
Opus 5 $0.00856 $0.00856
Sonnet 5 $0.00342 $0.00342
Haiku 4.5 $0.00171 $0.00171

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

Security

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.

AGENTS.md · 102 lines

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 guide for the operator playbook, or read cmd/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. mirror prints 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: --branch and --clone-depth are incompatible (a shallow clone only fetches each repo's default branch, so --branch dev --clone-depth 1 would silently skip dev wherever it isn't the default) — goldfinger refuses the combo; omit --clone-depth when mirroring a non-default branch. Full recipe in goldfinger guide.
  • Changing goldfinger's code (you are here): read README.md first 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 git itself. Discovery is read-only REST; mirroring is ghorg; commits/pushes/PRs are multi-gitter. Adding a git exec or a PR-create call means you're reinventing a delegated tool — stop.
  • A real (non-dry-run) goldfinger apply opens PRs and must never happen on an agent's own initiative or by accident. apply defaults 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.
  • apply requires --sign on 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: mirror and apply read 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. The mirror report is built from the lockfile alone (no git, no re-discovery): branch presence is a fact recorded at selection time (select --branch-presence) and can drift, so a branch never checked reports unknown — do not add code that guesses it.
  • goldfinger scan (cmd/scan.go, cmd/scan_search.go) is the read counterpart to apply: it searches the clones mirror already 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 stdlib regexp (RE2) over files read with os.ReadFile. A selected repo not on disk must report scanned:false with 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 sets truncated:true so 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 no apply toolapply_plan returns the digest-bound apply command for a human to run, and apply_plan must never call apply.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 runs git. 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 --json is the input catalogue (kept in sync with the validators by tests) and goldfinger schema is 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/); no internal//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.

Read the full file on GitHub · 102 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 · 102 lines · 1,712 tokens per session scan A 628aa22c68ff

Subscribe to this mod's changes

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.

Related

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.

vercel/next.js · 7,296 tokens

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.

openai/codex · 5,182 tokens

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).

microsoft/vscode · 6,785 tokens

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).

microsoft/vscode · 5,001 tokens

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.

langchain-ai/langchain · 4,469 tokens

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.

github/spec-kit · 7,104 tokens