From brewcode
Syncs KNOWLEDGE.jsonl or session learnings to project .claude/rules/ as best-practice.md and avoid.md. Use for updating rules, extracting learnings, organizing anti-patterns.
npx claudepluginhub kochetkov-ma/claude-brewcode --plugin brewcodeThis skill is limited to using the following tools:
> **TARGET:** Project `.claude/rules/` only. NEVER `~/.claude/rules/`
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
TARGET: Project
.claude/rules/only. NEVER~/.claude/rules/
Arguments: $ARGUMENTS
| Input | Mode |
|---|---|
list | List mode |
<path> <text> | Prompt mode |
<path-to-file> | File mode |
| (empty) | Session mode |
EXECUTE and STOP:
bash "${CLAUDE_SKILL_DIR}/scripts/rules.sh" list
Spawn bc-rules-organizer agent via Task tool.
| Mode | Preparation |
|---|---|
| file | Read KNOWLEDGE.jsonl; parse t:"❌" → avoid, t:"✅" → practice |
| prompt | Extract <path> (first arg), <prompt> (rest) |
| session | Extract 5 most impactful findings: errors, fixes, patterns. Format as ❌ or ✅ |
Update PROJECT .claude/rules/ — NEVER ~/.claude/rules/
Plugin templates: $BC_PLUGIN_ROOT/templates/rules/
Validation: bash "$BC_PLUGIN_ROOT/skills/rules/scripts/rules.sh" validate
Create missing: bash "$BC_PLUGIN_ROOT/skills/rules/scripts/rules.sh" create
Targets: avoid.md, best-practice.md, {prefix}-avoid.md, {prefix}-best-practice.md
MODE: {detected mode}
KNOWLEDGE: {prepared from table above}
DEDUP: 3-Check Protocol:
1. Within-file similarity (>70% skip, 40-70% merge)
2. Cross-file antonym (avoid↔best-practice — keep avoid only)
3. CLAUDE.md duplicate (skip if in CLAUDE.md; "CLAUDE.md" forbidden as Source)
BC_PLUGIN_ROOTinjected by pre-task.mjs hook.
Agent unavailable → error: bc-rules-organizer not available — install brewcode plugin
Forward agent report to user as-is.
| Condition | Action |
|---|---|
| Agent unavailable | Error + install instructions |
| No knowledge found | "No new rules extracted" |
| Plugin not found | STOP + install instructions |