dev-machine-guard: Instructions file for Codex

AGENTS.md

dev-machine-guard AGENTS.md is an instructions file for Codex, OpenCode from step-security/dev-machine-guard. It costs 11,386 tokens per session, scanned A, original, Apache-2.0.

A set of coding rules for the Dev Machine Guard codebase, covering where code belongs and how it should interact with operating-system features.

In plain words
What is it for?
Use it before adding detectors, data fields, command-line options, schedulers, or platform-specific code.
Why use it?
It helps developers and coding agents follow the repository’s existing patterns instead of introducing inconsistent implementations.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths.

This is step-security/dev-machine-guard's own configuration. It tells Codex and OpenCode how to work on dev-machine-guard 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 dev-machine-guard configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/alice/Documents.

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/step-security/dev-machine-guard/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/step-security/dev-machine-guard

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 dev-machine-guard AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/step-security/dev-machine-guard/agents-md/github.svg)](https://agentmods.dev/instructions/step-security/dev-machine-guard/agents-md)
Your own site
<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.

agentmods 80×15 button for dev-machine-guard AGENTS.md

Your own site · 80×15
<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>
Per session 11,386 This file is loaded in full into every session.
When invoked 11,386 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.11386 $0.11386
Opus 5.5 $0.04554 $0.04554
Sonnet 5.5 $0.02277 $0.02277
Haiku 4.5 $0.01139 $0.01139

Measured 1mo ago against content hash 288de26fa16f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

AGENTS.md · 774 lines

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.

  1. All OS interaction goes through executor.Executor. Never call os/exec, and avoid raw os.* file/env access, in detector/scheduler/business logic. This is the seam that makes everything mockable and timeout-bounded. (§2.1, §7.1)
  2. 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)
  3. Detection is data-driven. Add an entry to a spec table; don't add control flow. (§3.1)
  4. 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 on model.Platform* constants. (§2)
  5. Every external command has an explicit timeout via RunWithTimeout/RunInDir. Build commands from fixed argv; never interpolate untrusted input into a shell string. (§7)
  6. Raw secret values never get serialized. Tag them json:"-"; emit a pre-redacted Display value plus a SHA256 fingerprint, and redact in the detector. (§10)
  7. model is the single source of truth for every wire/output shape. Explicit snake_case JSON tags; optional object → *T,omitempty; collection → bare slice (always []). (§9)
  8. Logs go to stderr via progress.Logger; results go to stdout. Pick the level by audience: Warn for "something expected was skipped", Debug for diagnostics. (§6.5)
  9. Concurrency is the exception. Default to sequential code. When you must parallelize, bound it (min(NumCPU, 8)) with stdlib sync only. (§8)
  10. It must pass the gates: gofmt, go vet, go mod tidy (no drift), golangci-lint, go test -race, make smoke, and gosec — on a CGO_ENABLED=0 cross-compile to linux/darwin/windows. (§16)

Read the full file on GitHub · 774 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. 1mo ago Changed · +4 lines · +58 tokens per session 288de26fa16f
  2. 1mo ago First seen · 770 lines · 11,328 tokens per session scan A b279d5b29230

Subscribe to this mod's changes

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.

Related

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

microsoft/vscode · 9,715 tokens

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,786 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, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 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,680 tokens

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

microsoft/vscode · 2,731 tokens

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.

denoland/deno · 3,077 tokens