brewcode:rules

TARGET: Project .claude/rules/ only. NEVER ~/.claude/rules/

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "brewcode:rules" with this command: npx skills add kochetkov-ma/claude-brewcode/kochetkov-ma-claude-brewcode-brewcode-rules

TARGET: Project .claude/rules/ only. NEVER ~/.claude/rules/

Mode Detection

Arguments: $ARGUMENTS

Input Mode

list

List mode

<path> <text>

Prompt mode

<path-to-file>

File mode

(empty) Session mode

List Mode

EXECUTE and STOP:

bash "${CLAUDE_SKILL_DIR}/scripts/rules.sh" list

File / Prompt / Session Mode

Spawn bc-rules-organizer agent via Task tool.

Prepare Knowledge by Mode

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 ✅

Agent Prompt Template

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_ROOT injected by pre-task.mjs hook.

Fallback

Agent unavailable → error: bc-rules-organizer not available — install brewcode plugin

Output

Forward agent report to user as-is.

Error Handling

Condition Action

Agent unavailable Error + install instructions

No knowledge found "No new rules extracted"

Plugin not found STOP + install instructions

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

text-optimizer

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

memory-optimize

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

brewcode:install

No summary provided by upstream source.

Repository SourceNeeds Review