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,835 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,835 This file is loaded in full into every session.
When invoked 2,835 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.02835 $0.02835
Opus 5.5 $0.01134 $0.01134
Sonnet 5 $0.00567 $0.00567
Haiku 4.5 $0.00283 $0.00283

Measured today against content hash ccb8b4819448, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-23, 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 today.

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 · 196 lines

How it starts

The opening of the file, as written. The whole thing — 196 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), a lens catalog derived from it (lenses/), Claude Code skills that apply the lenses (skills/), and the checkers that keep the three consistent (scripts/, Makefile).

Layout

  • architecture.md is the source of truth. Every rule in a lens or a skill restates a sentence in it; nothing adds a rule the guideline does not state.
  • lenses/<group>.md holds one group of lenses in the format lenses/README.md defines. Ids are <PREFIX>-NN; every lens cites Section title or Section title, Subsection, by title and never by number.
  • skills/arch-review-<group>/SKILL.md is generated from skills/_template/review.SKILL.md; edit the template and run make gen-skills. The other skills are hand-written. The six scaffold skills share skills/_shared/scaffold-conventions.md; the other hand-written skills do not. skills/_shared/ops-skills/ holds the nine project-local operational skills as flat templates, one file each, with acme for the product; arch-scaffold-new copies them into a new tree, and make leaks, make links, and make lint hold them. They are not skills of this plugin, but a new tree runs them as skills, so scripts/check_skills.py reads their frontmatter and nothing else. It holds the same flat key: value lines a skill's frontmatter has. The name equals the file name. The description is one double-quoted string of at most 1024 characters, outside the plugin's description budget. allowed-tools is comma-separated, with no bare Bash, and each Bash entry is the Bash(cmd:*) prefix form or an exact Bash(make <target>). skills/arch-new-aspect is the one skill that edits this repository itself: it incorporates a new aspect into the guideline and cascades it through the lenses, skills, and docs, and names the release level.
  • agents/arch-reviewer.md is the subagent arch-review-full fans out to. Its procedure and report shape mirror the review template, and scripts/check_agents.py holds the two together: the four decision words, the report block, and the count of procedure steps must agree. The sentence "Never edit, stage, or commit" is repeated in every review skill on purpose.
  • .claude-plugin/ holds the plugin and marketplace manifests. The repository root is the plugin. plugin.json carries the one release version. scripts/check_version.py holds every copy to it: the marketplace manifest, the changelog's latest release heading, the pinned tags in README.md, docs/adopting.md, and checkers/README.md, and the arch-check package's version in checkers/pyproject.toml and checkers/src/arch_check/__init__.py.
  • benchmark/ holds the harness that measures a subject against a rubric (.github/workflows/benchmark.yml runs every scenario on demand, never on push): run.py with its inline dependencies, the harness/ modules, the scenarios, the result schema, and serve.py. Every harness module imports the standard library only at import time, so the tests at tests/test_benchmark_*.py run with nothing installed; the provider clients, pyyaml, jsonschema, and websockets are imported inside the functions that use them. A run writes into benchmark/runs/, which git ignores: the repository is the manual, a run is a measurement. make benchmark runs the smoke scenario and is not part of make check, because a run calls paid APIs.
  • checkers/ holds arch-check, the static checker that decides the mechanical lenses. It is its own Python package (checkers/src/arch_check/, Python 3.11, standard library only). A rule's id is the id of the lens it decides, and a rule is one module under rules/; checkers/README.md says how to add one. checkers/src/arch_check/lenses.py carries every lens id and severity, and tests/test_arch_check_framework.py holds it equal to lenses/*.md. The tests are tests/test_arch_check_*.py, on trees built with tests/arch_check_fixtures.py; they skip on Python 3.10.
  • scripts/_common.py holds what the scripts share, the heading anchor rule above all: the generator that writes anchors and the checker that resolves them use the same function. It also holds the one list of the repository's Markdown (markdown_files), which every script that scans Markdown reads, and the argument parser every script uses, and the one fence rule (fenced_lines) every script that skips code blocks uses.
  • scripts/check_lenses.py also holds every identifier a lens quotes to the section the lens cites: a backticked name the guideline uses must appear in that section. CROSS_REFERENCES lists the few deliberate exceptions. tests/ holds one pytest module per script, each on a small fixture tree, with a pass and a fail path per rule; make test runs them.

Read the full file on GitHub · 196 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. today Changed · +35 lines · +550 tokens per session ccb8b4819448
  2. yesterday Changed · +44 lines · +742 tokens per session 85d030ab22ba
  3. 2d 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 (86 stars, last pushed today), licensed MIT. It adds 2,835 tokens to every session, about $0.0113 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

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,406 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, repository design references, quickstart — add a new integration in 5 steps and integration architecture.

github/spec-kit · 7,326 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 · 6,923 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,153 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

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