/skills:rules-create-global [prd-path] [architecture-path] (greenfield; brownfield: blank + prime first, or pass a codebase-analysis)from Cole's AI Skills
Generates a project's root CLAUDE.md and .claude/ directory from a PRD, architecture spec, or codebase analysis. Replaces /init with customizable rules.
Ships in Cole's AI Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill takes up to two optional paths and uses them to pick your lane. Read whatever was passed and classify each by its content:
$path1: the first path, if any.$path2: the second path, if any.| A passed path that is... | Lane | Use it as |
|---|---|---|
a PRD (intent, what/why, from plan-create-prd) | greenfield | product context (the "what this is"), NOT the source of technical rules |
an architecture / spec doc (the how, from plan-architecture) | greenfield | the technical decisions your rules derive from (may be the same file as the PRD, if the architecture was folded in as an ## Architecture section) |
a codebase-analysis doc (a large-repo /prime-codebase + subagent fan-out) | brownfield | the source of "what is" |
Pick the lane from what you were given:
$path2, or $path1 if that is where they live).Brownfield, not primed yet? If no path was passed and this conversation has not been primed on the code, run
/prime-codebasefirst (or offer to) so you derive from real files, then continue. Never invent rules from nothing.
Your global rules — CLAUDE.md (Claude-native) or AGENTS.md (the open cross-tool standard) — are the
always-on steering document, read on every task. Four kinds of content earn that always-on slot:
It's all composition. Rules, references, and skills are just markdown the agent loads when it needs them — so
any of the above can live always-on or in an on-demand references/ doc or in a skill; you choose where each
piece lives. Everything not needed every task loads on demand, or belongs in a per-task plan — not here.
Global rules encode technical truth — so you derive them from technical decisions, never from a product spec:
| You have... | Derive rules from... | "Truth" is... |
|---|---|---|
| Greenfield, a new project, mostly a scaffold | your architecture decisions (the technical "how" you settled with the AI), passed as $path2 | what should be |
| Brownfield, an existing codebase with no AI Layer | your primed codebase (/prime-codebase), or a codebase-analysis doc passed as a path for a large repo | what is |
Greenfield note: your rules come from your architecture decisions (the spec), not the PRD. The flow: discuss what you're building with the AI and capture it as a PRD (
plan-create-prd), then settle the architecture withplan-architecture(stack, patterns, directory structure, conventions). Those decisions are what this skill derives rules from. A PRD captures the product (what/why): useful context, but technical rules don't live there.
Brownfield note: this skill does not explore the codebase for you. Prime first: run
/prime-codebaseso the structure, key files, and conventions are loaded into this conversation, then run this skill with no path. (Large repo? Optionally fan out a few built-in subagents to explore areas in parallel, aggregate a shortcodebase-analysis.md, and pass that path instead.) This skill packages the derive → extract → seams → prune → check steps, not the exploration.
Before you run this — protect any existing rules. If the project already has a
CLAUDE.md/AGENTS.md, copy or rename it first (e.g.CLAUDE.md.bak) so this skill doesn't overwrite something you want to keep. Even better, feed it in as input — point the skill at it ("read my existingCLAUDE.mdfirst") so the derivation builds on what's already there instead of starting from scratch.
First, which rules file does this project use? Detect it, then read the matching guidance (don't rely on a snapshot):
CLAUDE.md (Claude Code's native file) → Anthropic memory + best practices:
https://code.claude.com/docs/en/memory · https://code.claude.com/docs/en/best-practicesAGENTS.md (the open cross-tool standard, read by dozens of agents) → the AGENTS.md spec: https://agents.mdAGENTS.md and CLAUDE.md is a single line —
@AGENTS.md — so Claude Code auto-loads AGENTS.md and there's one source of truth. In that case, write to AGENTS.md.CLAUDE.md for a Claude-Code-only project; AGENTS.md if the team is multi-tool.Content + structure are ~90% identical either way — everything below is "your rules file," not one vendor's. Use the structure laid out below (it works as an AGENTS.md just as well).
.claude/references/<topic>.md on Claude Code; anywhere your tool looks — e.g. .agent/ — it's just markdown) or a skill.z.infer", not "type safety is critical".$path2 (or $path1, if that is where the
architecture lives): stack, patterns, directory structure, conventions, security choices, plus any scaffold
files. (A PRD passed as $path1 is product context: read it for what you're building and why, not for the
technical rules.) No path passed but the workspace is a fresh scaffold? Ask for the architecture doc, or settle
the decisions now with plan-architecture first./prime-codebase);
or, if a codebase-analysis.md path was passed, read that (with its file:line citations). Spot-check the actual
code either way. Not primed and no path passed? Run /prime-codebase first.CLAUDE.mdFill the template's sections, sourced from the input:
Pull recurring, task-type-specific patterns out into .claude/references/<topic>.md stubs (a paragraph
each, not full docs). Test: does it recur every time you touch that area? → guide. One-off → leave in the
source doc.
Add a short "where new code goes" section — the interfaces/folders where new work plugs in. This is what makes the agent extend the codebase instead of bolting on. (Greenfield: the seams are designed from the architecture, not discovered.)
First draft is always too big. Delete generic advice, restated defaults, and anything that can't point to its evidence. Apply the per-line test: would removing this cause a mistake? If not, cut it.
CLAUDE.md and why.CLAUDE.md is a map + ground rules, not documentation or a PRD/analysis copy..claude/references/, not always-on.CLAUDE.md as the project grows and after major model releases, and run
/rules-check-drift before merges so the map never drifts.plan-architecture (and after plan-create-prd, if
you wrote a PRD for the product); pass those paths in as $path1 (PRD) and $path2 (architecture). Brownfield: run after
/prime-codebase, or after a large-repo fan-out produces a codebase-analysis.md you pass in.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub coleam00/skills --plugin skills40 skills in this plugin
/ablate-ai-layerMeasure whether a repository's AI instructions still earn their place, by running the same real task many times with the layer intact and with it stripped, then grading every rule against what actually changed. Runs both arms itself in throwaway git worktrees and never touches the working tree. Agent-agnostic across CLAUDE.md, AGENTS.md, .claude/, .agents/, .cursor/rules, .clinerules, .windsurfrules and copilot-instructions. Use when the user wants to prune, audit, clean up, shrink or "delete" their CLAUDE.md, AGENTS.md, cursor rules, agent instructions or AI layer; when they ask whether their rules are still needed, whether their context is bloated, or what to cut; or when they mention ablating, ablation, or testing their agent without its instructions./agent-browserBrowser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.Other plugins' skills for the same job