Borrowing it
Nothing to install: this file belongs to step-security/dev-machine-guard. 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/step-security/dev-machine-guard/main/AGENTS.mdgit clone --depth 1 https://github.com/step-security/dev-machine-guardWrote 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/step-security/dev-machine-guard/agents-md)<a href="https://agentmods.dev/instructions/step-security/dev-machine-guard/agents-md"><img src="https://agentmods.dev/badge/instructions/step-security/dev-machine-guard/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/step-security/dev-machine-guard/agents-md"><img src="https://agentmods.dev/badge/instructions/step-security/dev-machine-guard/agents-md.svg" alt="Reviewed on agentmods" width="80" 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.11386 | $0.11386 |
| Opus 5.5 | $0.04554 | $0.04554 |
| Sonnet 5.5 | $0.02277 | $0.02277 |
| Haiku 4.5 | $0.01139 | $0.01139 |
Grade A, and why
dev-machine-guard 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 1mo 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 — 774 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Dev Machine Guard — Coding Guidelines
These guidelines describe how this codebase is already written, distilled into rules so future work stays consistent. They are descriptive, not aspirational: every rule below is the dominant existing pattern, with a canonical file you can copy from.
Audience: humans and AI agents making changes in this repo.
How to use this doc. Before adding a detector, a model field, a CLI flag, a scheduler tweak, or any platform-specific code, find the matching section and follow the pattern. When in doubt, open the cited "canonical" file and mirror it. Prefer consistency with the surrounding code over personal preference.
Scope. This documents current conventions. It does not propose refactors. Genuinely additive improvement ideas surfaced during analysis are quarantined in §17 and are explicitly not things to apply as part of adopting this doc.
See also: CONTRIBUTING.md · adding-detections.md · SCAN_COVERAGE.md
0. Prime directives
The ten rules that matter most. The rest of the doc expands on these.
- All OS interaction goes through
executor.Executor. Never callos/exec, and avoid rawos.*file/env access, in detector/scheduler/business logic. This is the seam that makes everything mockable and timeout-bounded. (§2.1, §7.1) - A scan never aborts because one part failed. Inventory detectors return values, not errors, and skip on failure. Only the top-level orchestrator returns an error. (§6.1)
- Detection is data-driven. Add an entry to a spec table; don't add control flow. (§3.1)
- Cross-platform code splits by build tag, not by sprinkling
runtime.GOOS— when the code wouldn't compile on the other OS. Otherwise branch at runtime onmodel.Platform*constants. (§2) - Every external command has an explicit timeout via
RunWithTimeout/RunInDir. Build commands from fixed argv; never interpolate untrusted input into a shell string. (§7) - Raw secret values never get serialized. Tag them
json:"-"; emit a pre-redactedDisplayvalue plus aSHA256fingerprint, and redact in the detector. (§10) modelis the single source of truth for every wire/output shape. Explicitsnake_caseJSON tags; optional object →*T,omitempty; collection → bare slice (always[]). (§9)- Logs go to stderr via
progress.Logger; results go to stdout. Pick the level by audience:Warnfor "something expected was skipped",Debugfor diagnostics. (§6.5) - Concurrency is the exception. Default to sequential code. When you must parallelize, bound it
(
min(NumCPU, 8)) with stdlibsynconly. (§8) - It must pass the gates:
gofmt,go vet,go mod tidy(no drift),golangci-lint,go test -race,make smoke, andgosec— on aCGO_ENABLED=0cross-compile to linux/darwin/windows. (§16)
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.
- 1mo ago Changed · +4 lines · +58 tokens per session 288de26fa16f
- 1mo ago First seen · 770 lines · 11,328 tokens per session scan A b279d5b29230
dev-machine-guard AGENTS.md is an instructions file published in the GitHub repository step-security/dev-machine-guard (196 stars, last pushed yesterday), licensed Apache-2.0. It adds 11,386 tokens to every session, about $0.0455 per session on Opus 5.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-30.
Other instructions, from other repositories
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).
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.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
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.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deno copilot-instructions.md
Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.