swe_guidelines: Instructions file for Claude Code

AGENTS.md

swe_guidelines AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from baristaze/swe_guidelines. It costs 2,421 tokens per session, scanned A, original, MIT.

Repository instructions for maintaining a software-architecture guideline, its review lenses, agent skills, documentation, and validation tools. They describe which files are authoritative and how generated files are updated.

In plain words
What is it for?
Use them when editing this guideline repository, regenerating review skills, checking conventions, or validating that its parts remain aligned.
Why use it?
They reduce accidental inconsistency between the main guideline, its derived review rules, and the skills that use them.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: ${CLAUDE_SKILL_DIR} variable, but also the file is AGENTS.md. Also seen: mentions .claude-plugin; mentions subagents; mentions Claude Code.

This is baristaze/swe_guidelines's own configuration. It tells Claude Code, Codex and OpenCode how to work on swe_guidelines 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 swe_guidelines configures →

Reuse

Borrowing it

Nothing to install: this file belongs to baristaze/swe_guidelines. 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/baristaze/swe_guidelines/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/baristaze/swe_guidelines

Made for: Claude Code, 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 swe_guidelines AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/baristaze/swe_guidelines/agents-md/github.svg)](https://agentmods.dev/instructions/baristaze/swe_guidelines/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/baristaze/swe_guidelines/agents-md"><img src="https://agentmods.dev/badge/instructions/baristaze/swe_guidelines/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 swe_guidelines AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/baristaze/swe_guidelines/agents-md"><img src="https://agentmods.dev/badge/instructions/baristaze/swe_guidelines/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,421 This file is loaded in full into every session.
When invoked 2,421 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.02421 $0.02421
Opus 5.5 $0.00968 $0.00968
Sonnet 5.5 $0.00484 $0.00484
Haiku 4.5 $0.00242 $0.00242

Measured 14d ago against content hash 432b18f44828, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

swe_guidelines 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 14d 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 · 175 lines

How it starts

The opening of the file, as written. The whole thing — 175 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Working in this repository

This repository holds one guideline (architecture.md), the scaffold that shows its shape (scaffold/), the lenses and the skills that hold its detail (lenses/, skills/), the static checker (checkers/), the benchmark harness (benchmark/), and the scripts that keep them consistent (scripts/, Makefile). Each script's docstring states what it holds. Read it before you change what it checks.

The ladder

The guideline tells the story and states every rule. A lens or a skill holds the checkable detail under a rule the guideline states. It is stricter than the story on purpose, never contrary to it, and it never adds a rule the guideline does not state. The checker and the gates are stricter still. When the guideline changes, every lens and skill that cites the changed text changes with it.

Writing

  • A person and an agent read architecture.md, the READMEs, and docs/. They tell the story and point at the detail: short sentences, one idea each, in the present tense, with no history.
  • Only agents read the lenses, the skills, and agents/. They may be exact, and they name the scaffold file whose shape to follow.
  • Detail goes where it is held: code to the scaffold, checkable detail to a lens, steps and edge cases to a skill. What only an agent needs on a person's page goes in a short agents-only block, opened by <!-- agents-only alone on its line; nothing inside may close it. Tags follow How to Read This, in architecture.md.

Layout

  • architecture.md is the source of truth. Its Contents block is generated (make gen-toc) and checked (make toc). Headings are unnumbered, and every cross-reference names a section by its title.
  • scaffold/acme_root/ is the domain-agnostic core of a system in the guideline's shape: a whole monorepo named acme, with its own gates. scaffold/new.py copies it under a project's name, and from a clean checkout commits the copy as its base, on the branch scaffold. scaffold/base.py commits the scaffold at a later ref onto that branch, fetched as one tarball, and arch-upgrade-scaffold merges it. With --layer, it commits the scaffold/ folder unchanged, for a repository whose own scaffold builds on this one. Both scripts use the standard library only, and tests/test_scaffold_new.py and tests/test_scaffold_base.py hold them. The repository's ruff and mypy read the two scripts alone; markdownlint, the links, and the leaks read the whole scaffold. In CI, a fresh copy runs its own gates in jobs side by side: scaffold-check its make check, with arch-check from checkers/, scaffold-integration its integration suite, and scaffold-release-before its release-before job.
  • lenses/<group>.md holds one group of lenses in the format lenses/README.md defines. make lenses holds the format, the citations, every identifier a lens quotes to the section it cites, and every scaffold path a Shape line names.
  • skills/arch-review-<group>/SKILL.md is generated from skills/_template/review.SKILL.md: edit the template or the lenses, and run make gen-skills. The other skills are hand-written. The six scaffold skills share skills/_shared/scaffold-conventions.md. Each names the files of the tree whose shape it follows, and arch-scaffold-new copies the scaffold with scaffold/new.py. skills/arch-new-aspect is the one skill that edits this repository: it adds an aspect to the guideline and cascades it.
  • scaffold/acme_root/.agents/skills/ holds the skills a new tree runs as its own: the operational skills, the audits, the ticket triage, and the compaction of its documents. They are not skills of this plugin. .agents/skills/ is the folder every agent that reads the Agent Skills standard shares; scaffold/acme_root/.claude/skills is a link to it, for Claude Code, and scaffold/new.py copies the link as a link. make leaks, make links, and make lint read the skills, and scripts/check_skills.py holds their frontmatter, their paths, the link, and their count bounds as a skill's.
  • agents/arch-reviewer.md is the Claude Code subagent arch-review-full fans out to; subagents have no open standard, so in another agent the skill starts a general subagent or runs the groups one after another. scripts/check_agents.py holds it to the review template and to its maxTurns. Every review skill repeats "Never edit, stage, or commit" on purpose.
  • .claude-plugin/ holds the plugin and marketplace manifests; the repository root is the plugin. plugin.json carries the one release version, and scripts/check_version.py holds every copy to it.
  • benchmark/ holds the harness that scores a subject against a rubric. A harness module imports only the standard library at import time, so its tests run with nothing installed. A run folder is checked in under benchmark/runs/<scenario>/ once run.py redact has scanned it, with its row added by hand; scripts/check_runs.py holds the rest. A browser run goes under benchmark/runs/browser-judge-swe/, text only and redacted, and arch-benchmark-browser writes its folder and its row when it runs in a checkout. make benchmark calls paid APIs and is not part of make check.
  • checkers/ holds arch-check, its own package (checkers/src/arch_check/, Python 3.11, standard library only). A rule is one module under rules/, and its id is the id of the lens it decides. lenses.py carries every lens id and severity, and tests/test_arch_check_framework.py holds it equal to lenses/*.md.
  • scripts/_common.py holds what the scripts share: the heading anchor rule, the one list of the repository's Markdown (markdown_files), the argument parser, and the fence rule (fenced_lines).
  • tests/ holds one pytest module per script, with a pass and a fail path per rule; make test runs them.

Read the full file on GitHub · 175 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. 14d ago Changed · +2 lines · +34 tokens per session 432b18f44828
  2. 1mo ago Changed · +2 lines · +30 tokens per session dff6951926af
  3. 1mo ago Changed · -69 lines · -1,235 tokens per session 160d873e3055
  4. 1mo ago Changed · +33 lines · +582 tokens per session 8731fe573fa0
  5. 1mo ago Changed · +11 lines · +175 tokens per session 92b58651633c
  6. 1mo ago Changed · +35 lines · +550 tokens per session ccb8b4819448
  7. 1mo ago Changed · +44 lines · +742 tokens per session 85d030ab22ba
  8. 1mo ago First seen · 117 lines · 1,543 tokens per session scan A 13273a2629e7

Subscribe to this mod's changes

swe_guidelines AGENTS.md is an instructions file published in the GitHub repository baristaze/swe_guidelines (94 stars, last pushed 5d ago), licensed MIT. It adds 2,421 tokens to every session, about $0.0097 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-09-20.

Related

swe_guidelines AGENTS.md compared with instructions from other repositories

swe_guidelines AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
swe_guidelines AGENTS.mdbaristaze/swe_guidelinesInstructions file945d agoMITA2,421Claude Code, Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file275k3d agoMITA4,313Codex, OpenCode