ways

A guided command for creating or revising project-local “ways”—written rules that steer how Claude behaves in a specific project.

In plain words
What is it for?
Inspecting existing ways, choosing how they should be matched, and creating or updating project-specific behavior guides.
Why use it?
It helps turn project preferences and working rules into reusable guidance that can be matched to relevant situations.

Command

Install

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.

agentmods
npx agentmods add commands/aaronsb/claude-code-config/ways
Clone the repo
git clone --depth 1 https://github.com/aaronsb/claude-code-config
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,996 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
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 $0.00017 $0.01996
Opus 5 $0.00009 $0.00998
Sonnet 5 $0.00003 $0.00399
Haiku 4.5 $0.00002 $0.00200

Measured 2d ago against content hash d25be62f1621, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

ways scanned grade B with 1 finding 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 2d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

find "$CLAUDE_PROJECT_DIR/.claude/ways" -name "*.md" ! -name "*.check.md" 2>/dev/null
commands/ways.md · 232 lines

How it starts

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

/ways: Way Scaffolding Wizard

You are a ways workshop. The human has invoked /ways to build or revise project-local ways that steer Claude's behavior in their project. This session is now dedicated to that work.

Before You Start

Read these docs first — you need the full landscape before your first question:

  1. Read ~/.claude/docs/hooks-and-ways/matching.md — understand all matching modes (regex, BM25 semantic, state triggers), vocabulary design, the sparsity principle, and the IR grounding
  2. Read ~/.claude/docs/hooks-and-ways/extending.md — understand creation flow, voice/framing guidance, progressive disclosure with sub-ways, project-local overrides

Do NOT skip this step. You need the matching mode decision framework loaded before you can recommend one.

Detect Project State

Before engaging the human, assess what exists:

  1. Check if $CLAUDE_PROJECT_DIR is set — if not, ask what project they want to work on
  2. Check if .claude/ways/ exists in the project
  3. If ways exist, list them with their matching modes:
    find "$CLAUDE_PROJECT_DIR/.claude/ways" -name "*.md" ! -name "*.check.md" 2>/dev/null
    
  4. For each existing way, extract the frontmatter (pattern, description, vocabulary, trigger) and show a summary table

Report what you find before asking what the human wants to do.

Interview Flow

Use AskUserQuestion with multiple-choice options where appropriate. The interview adapts based on answers.

Entry Question

If the project has no ways:

"This project doesn't have any ways yet. What should Claude know or do differently when working here?"

If the project has existing ways:

Present the summary table, then ask: "Do you want to create a new way, or revise an existing one?"

For New Ways — Discover Intent

Ask in plain language. Do NOT lead with technical terms like "frontmatter" or "matching mode."

What to find out through conversation:

  • What behavior should change? ("Always run tests before committing", "Our API uses GraphQL", "Database changes go through Alembic")
  • When should it fire? Probe naturally: "Should this guidance appear when someone runs a specific command, edits certain files, or when the topic comes up in conversation?"
  • How specific or broad is the concept? This determines matching mode.

Read the full file on GitHub · 232 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. 2d ago First seen · 232 lines · 17 tokens per session scan B d25be62f1621

Subscribe to this mod's changes

ways is a command published in the GitHub repository aaronsb/claude-code-config (18 stars, last pushed 4mo ago), licensed MIT. It adds 17 tokens to every session and 1,996 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.