brownfield-drift

brownfield-drift is a skill for Claude Code, Codex from wednesday-solutions/ai-agent-skills. It costs 57 tokens per session (628 once invoked), scanned A, original, MIT.

An architecture-checking tool that compares a codebase with the boundaries written in its PLAN.md file.

In plain words
What is it for?
Use it during pull-request reviews, after adding cross-service imports, or in regular health checks to report violating connections and suggest fixes.
Why use it?
It catches changes that connect modules or services in ways the project rules forbid, helping prevent architecture drift over time.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it during pull-request reviews, after adding cross-service imports, or in regular health checks to report violating connections and suggest fixes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wednesday-solutions/ai-agent-skills/brownfield-drift
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.

Any agent
npx skills add wednesday-solutions/ai-agent-skills --skill brownfield-drift
Clone the repo
git clone --depth 1 https://github.com/wednesday-solutions/ai-agent-skills

Made for: Claude Code, Codex.

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 brownfield-drift

README.md
[![agentmods](https://agentmods.dev/badge/skills/wednesday-solutions/ai-agent-skills/brownfield-drift/github.svg)](https://agentmods.dev/skills/wednesday-solutions/ai-agent-skills/brownfield-drift)
Your own site
<a href="https://agentmods.dev/skills/wednesday-solutions/ai-agent-skills/brownfield-drift"><img src="https://agentmods.dev/badge/skills/wednesday-solutions/ai-agent-skills/brownfield-drift/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 brownfield-drift

Your own site · 80×15
<a href="https://agentmods.dev/skills/wednesday-solutions/ai-agent-skills/brownfield-drift"><img src="https://agentmods.dev/badge/skills/wednesday-solutions/ai-agent-skills/brownfield-drift.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 628 The whole file, excluding the scripts and references it only reads on demand.
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.00057 $0.00628
Opus 5 $0.00028 $0.00314
Sonnet 5 $0.00011 $0.00126
Haiku 4.5 $0.00006 $0.00063

Measured 11d ago against content hash 23b5ceff50d4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

brownfield-drift 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 11d 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.

skills/brownfield-drift/SKILL.md · 74 lines

How it starts

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

When to use

  • Dev asks "are we following the architecture?" or "is this a valid change?"
  • PR touches files near module boundaries or service interfaces
  • Weekly architecture health check
  • Any cross-service import was just added

When NOT to use

  • "What does module X do?" → use brownfield-chat
  • "What breaks if I change X?" → use brownfield-chat
  • Graph coverage is low on a file → use brownfield-fix (it fills gaps before editing)
  • No PLAN.md exists — drift requires machine-readable boundaries in PLAN.md

What to do

  1. Run wednesday-skills drift via Bash tool
  2. Report violations with:
    • The specific edge that violates the rule
    • The commit that introduced it (when available)
    • The suggested fix per PLAN.md intent
  3. For PR reviews: run wednesday-skills drift --since <base-commit> to only report new violations
  4. For a single rule: wednesday-skills drift --rule <rule-name>

Adding constraints to PLAN.md

If the project has no constraints block, add one to PLAN.md:

{
  "boundaries": [
    {
      "rule": "frontend-never-imports-db",
      "description": "Frontend components must never import DB layer directly",
      "from": "src/app/**",
      "to": "src/lib/db/**",
      "type": "forbidden"
    },
    {
      "rule": "no-circular-deps",
      "description": "No circular dependencies anywhere",
      "scope": "**",
      "type": "no-cycle"
    }
  ]
}

Violation types

Type What it catches
forbidden Import from A → B that should never exist
ownership Logic pattern appearing outside its designated owner
no-direct-import Direct import between services that should use API
no-cycle Circular dependency between modules

Never

  • Auto-fix boundary violations — always ask the dev first
  • Flag existing violations on a PR that did not introduce them (use --since)
  • Run on projects without machine-readable PLAN.md constraints
  • Report the same violation twice in one review session

Read the full file on GitHub · 74 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. 11d ago First seen · 74 lines · 57 tokens per session scan A 23b5ceff50d4

Subscribe to this mod's changes

brownfield-drift is a skill published in the GitHub repository wednesday-solutions/ai-agent-skills (168 stars, last pushed 3mo ago), licensed MIT. It adds 57 tokens to every session and 628 once invoked, about $0.0003 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.