Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/step-security/dev-machine-guard/agents-mdgit clone --depth 1 https://github.com/step-security/dev-machine-guardWhat 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 | $0.11328 | $0.11328 |
| Opus 5 | $0.05664 | $0.05664 |
| Sonnet 5 | $0.02266 | $0.02266 |
| Haiku 4.5 | $0.01133 | $0.01133 |
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 yesterday.
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 — 770 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.
- yesterday 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 (175 stars, last pushed 7d ago), licensed Apache-2.0. It adds 11,328 tokens to every session, about $0.0566 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-30.
Other instructions, from other repositories
fastmcp CLAUDE.md
Claude Code instructions for PrefectHQ/fastmcp, covering fastmcp development guidelines, required development workflow, repository structure, core mcp objects and development rules.
aguara CLAUDE.md
Instructions for garagon/aguara, covering claude.md, project status, build & test commands, single package test and single test function.
registry CLAUDE.md
Claude Code instructions for modelcontextprotocol/registry, covering claude.md and important: publishing mcp servers.
everything-ai-coding AGENTS.md
Instructions for zgsm-ai/everything-ai-coding, covering agents.md, project context, do not commit openspec/, test files and commit conventions.
tailscale-mcp AGENTS.md
Instructions for HexSleeves/tailscale-mcp, covering skill routing and gbrain configuration (configured by /setup-gbrain).
daz-mcp-server CLAUDE.md
Instructions for bluemoonfoundry/daz-mcp-server, covering claude.md (project index), primary commands, skill modules (reference with @), architecture summary and render api (dazscriptserver native endpoints).