PLUGIN brewcode / Skills
On this page
Convention Setup
opus 7 lifecycle modes project scope user-invokedCaptures architecture, representative implementations, coding patterns, and testing conventions from your repository. It writes three project documents and a loading rule that tells agents which document to read before implementation or review.
Run it after semantic search and before teams-setup. Creating a team is not a prerequisite. The setup dashboard lists it in this position.
Quick reference
| Field | Value |
|---|---|
| Command | /brewcode:convention-setup |
| Default | install |
| Lifecycle | status · install · upgrade · enable · disable · uninstall · purge |
| Extraction | full · conventions · rules · paths |
| Input | Free-text brief, optional mode, and optional scoped paths |
When to use
- Establish shared coding and testing patterns before generating project agents.
- Refresh conventions after a major refactor with
upgrade. - Analyze selected modules with
paths. - Pause convention loading while keeping the documents and accepted rules.
Example
/brewcode:convention-setup install
The skill inspects status, analyzes the code, and proposes conventions and rules for review. It then writes three documents under .claude/convention/ and a loading rule at .claude/rules/convention.md. Details are under the spoiler below.
Modes
| Mode | Behavior |
|---|---|
status | Report state and loading-rule path without writing |
install (default) | Extract conventions, validate documents, create or refresh loading guidance |
upgrade | Repeat extraction against current evidence; preserve local wording and disabled state |
enable | Restore the parked loading rule without changing its body |
disable | Rename the loading rule to .claude/rules/convention.md.disabled |
uninstall | Remove the owned loading rule; keep convention documents |
purge | Remove the owned loading rule and the three owned documents |
A bare invocation chooses install, even on an existing project; use status to inspect.
Disabling loading has a narrow scope
Disable, uninstall, and purge touch only the owned loading rule and documents. Accepted coding rules, manual CLAUDE.md references, and unrelated files remain. Purge confirms the three document paths unless you asked for their deletion.
How it works, extraction modes, artifacts, helper #
Extraction modes
| Mode | Behavior |
|---|---|
full | Full extraction, accepted rules, validation, and loading guidance |
conventions | Generate the three documents and refresh the loader; skip rule extraction |
rules | Extract rules from existing documents (they must exist) |
paths src/payments,src/billing | Refresh scoped evidence, keep other layers |
Artifacts
| Artifact | Purpose |
|---|---|
.claude/convention/reference-patterns.md | Representative implementations, coding patterns, anti-patterns |
.claude/convention/testing-conventions.md | Test data, structure, and assertion patterns |
.claude/convention/project-architecture.md | Architecture, dependencies, and repository layout |
.claude/rules/convention.md | Loading guidance for the three documents |
All four carry provenance metadata that setup-status reads. Extra project rules depend on which proposals you accept.
Flow
- Resolve intent and report status
The skill prints its PLAN block and probes the installation. Read-only status asks no questions; ownership or live/disabled collisions stop the operation.
- Analyze active layers
Detect the stack, then analyze the applicable code and test layers with bounded agents.
- Select reference implementations
An architecture-capable agent or Plan agent resolves overlapping candidates. The chosen references anchor the three documents.
- Generate, compact, and review
Three document owners work independently. With brewtools installed, text optimization compacts the output; otherwise that step is skipped and reported.
- Organize accepted rules
Full extraction proposes avoid and best-practice rules, checks duplicates, and asks for acceptance. CLAUDE.md references are added only on request.
- Validate and install the loader
Validate the documents, then install or refresh the loading rule. Existing wording is kept; a disabled loader stays disabled.
The skill delegates one bounded layer or document per agent; the shared brief format is on the skills hub. Layers follow the detected stack.
scripts/convention.sh handles lifecycle checks, document validation, loader install, reversible
parking, and owned removal. It compares the loader and all three documents with the skill’s
current content version. A parked loader reports disabled even if documents need refresh;
incomplete artifacts report partial. It refuses to modify an unowned loader or purge unowned
documents, and reports a collision when both live and disabled loaders exist.
Upgrade refreshes owned loader metadata without changing the loader body or enabling a parked install.
Related
Brewcode overview
Full Setup
Setup Status
Rules
GitHub source
Update: /brewtools:plugin-update, /reload-plugins, then /brewcode:setup-status upgrade - FAQ