brewcode:skills
Orchestrates Claude Code skill management — lists skills, improves existing skills, or creates new ones with activation optimization and triggers. Triggers: create skill, new skill, improve skill, fix skill activation, skill doesn't trigger, list skills, skill management, optimize skill.
What this skill does
# skills Skill
> **Skill Management:** List, improve, create skills with activation optimization.
<instructions>
## Parse Arguments
Extract mode and target from `$ARGUMENTS`:
| Pattern | Mode | Target |
|---------|------|--------|
| empty / `list` | list | none |
| `up <name\|path\|folder>` | up | skill name, path, or folder |
| `create <prompt\|spec-path>` | create | prompt or path to spec file |
| `<path\|name>` (not a mode) | **up** (default) | skill name, path, or folder |
**Smart Detection:** If first argument is NOT a mode keyword (`list`, `up`, `create`), treat entire input as target for `up` mode.
**Examples:**
- `/brewcode:skills` or `list` → `list`
- `/brewcode:skills up commit` → `up`, target=`commit`
- `/brewcode:skills create "semantic code search"` → `create`, target=prompt
- `/brewcode:skills commit` → `up`, target=`commit` **(shorthand)**
- `/brewcode:skills ~/.claude/skills/` → `up`, target=folder **(shorthand)**
---
## Mode: list
**EXECUTE** using Bash tool:
```bash
bash "${CLAUDE_SKILL_DIR}/scripts/list-skills.sh" && echo "✅ list" || echo "❌ list FAILED"
```
> **STOP if ❌** — verify skill base directory is resolved and scripts exist.
---
## Mode: create / up (Unified Flow)
Both `create` and `up` follow Phases 0-6. Differences noted per phase.
### Description Budget (DEFAULT)
Frontmatter `description`: <= 100 tokens (~400 chars). Lead sentence <= 160 chars, plain EN. Triggers: comma-list, EN only. At most 1 example. No RU/other languages unless user explicitly asks.
### Prerequisite (up only): Resolve Target
**EXECUTE** using Bash tool:
```bash
TARGET="$ARGUMENTS"
if [[ "$TARGET" == up\ * ]] || [[ "$TARGET" == "up" ]]; then
TARGET="${TARGET#up }"; TARGET="${TARGET#up}"
fi
TARGET="$(echo "$TARGET" | xargs)"
if [[ -z "$TARGET" ]]; then
echo "❌ No target. Usage: /brewcode:skills up <name|path|folder>"; exit 1
fi
if [[ -d "$TARGET" ]]; then
echo "TYPE: folder"; echo "PATH: $TARGET"
find "$TARGET" -name "SKILL.md" -type f 2>/dev/null | head -20
elif [[ -f "$TARGET" ]]; then
echo "TYPE: file"; echo "PATH: $TARGET"
elif [[ -f "$TARGET/SKILL.md" ]]; then
echo "TYPE: skill-dir"; echo "PATH: $TARGET/SKILL.md"
else
echo "TYPE: name"; echo "NAME: $TARGET"
for loc in ~/.claude/skills .claude/skills; do
[[ -f "$loc/$TARGET/SKILL.md" ]] && echo "FOUND: $loc/$TARGET/SKILL.md"
done
fi
```
> **STOP if ❌** — target must resolve to at least one SKILL.md.
### Phase 0: Discovery
Spawn 2-3 Explore agents in parallel (single message).
**create mode** — spawn in ONE message:
1. `Explore`: Research skill patterns in `$BC_PLUGIN_ROOT/skills/` and `~/.claude/skills/` — structure, naming, frontmatter, references, scripts.
2. `Explore`: Analyze target project structure for `{TOPIC}` — code, APIs, configs, tooling.
3. (Optional) `general-purpose`: Web research for `{TOPIC}` — best practices, similar tools. Use WebSearch/WebFetch.
**up mode** — spawn in ONE message:
1. `Explore`: Analyze skill at `{SKILL_PATH}` — SKILL.md, references/, scripts/, tests/, README.md. Report quality and gaps.
2. `Explore`: Compare `{SKILL_PATH}` against patterns in `$BC_PLUGIN_ROOT/skills/`. Output improvement recommendations.
### Phase 1: User Interaction
**Step 1: Check Conversation History** (create only)
Check if current conversation already contains workflow to capture. If yes: extract tools, steps, corrections, I/O formats for Phase 2.
**Step 2: Determine Input Type** (create only)
| Input | Action |
|-------|--------|
| Path to `.md` file | Read as spec |
| Text prompt | Use as research query |
**Step 3: Invocation Type** (AskUserQuestion)
```
header: "Invocation"
question: "Who will invoke this skill?"
options:
- label: "User only (slash command)"
description: "disable-model-invocation: true, simple description"
- label: "LLM auto-detect"
description: "Full trigger keyword optimization"
- label: "Both (default)"
description: "User slash command + LLM auto-detection"
```
Save as `INVOCATION_TYPE`.
**Step 4: Mode Switcher Detection** (create only)
**Keywords:** "mode", "toggle", "switch", "persistent", "from now on", "always do", "session behavior"
If detected — AskUserQuestion: "Create as Mode Switcher skill?" (Yes/No).
If Yes: set `IS_MODE_SWITCHER=true`, then ask scope (Project/Global/Session) via AskUserQuestion, save as `MODE_SCOPE`.
Validate BC_PLUGIN_DATA:
**EXECUTE** using Bash tool:
```bash
if [ -n "$BC_PLUGIN_DATA" ]; then echo "✅ BC_PLUGIN_DATA=$BC_PLUGIN_DATA"; else echo "❌ BC_PLUGIN_DATA not set"; fi
```
> **STOP if ❌** — BC_PLUGIN_DATA required for Mode Switcher.
**Step 5: Testing Depth** (AskUserQuestion)
```
header: "Testing Depth"
question: "How thoroughly should the skill be tested?"
options:
- label: "Quick (default)" — validate-skill.sh + 3-5 test prompts
- label: "Standard" — + unit tests + simple review (1 reviewer + verification)
- label: "Deep" — + quorum review (3 reviewers, threshold 2) + E2E tests
```
Save as `TESTING_DEPTH`.
**Step 6: Review Type** (AskUserQuestion, only if Standard or Deep)
```
header: "Review Type"
question: "What review approach?"
options:
- label: "Simple (default for Standard)" — 1 reviewer + 1 verification agent
- label: "Quorum (default for Deep)" — 3 reviewers parallel, threshold 2/3, DoubleCheck
```
Save as `REVIEW_TYPE`.
**Step 7: Plan Confirmation** (AskUserQuestion)
Output plan summary: Action (Create/Improve), skill path/name, files to create/modify, references used, testing approach, review type.
```
header: "Plan Confirmation"
question: "Proceed with this plan?"
options: [Proceed, Adjust ("Let me change something"), Cancel]
```
If Adjust — ask what to change, update, re-confirm. If Cancel — stop.
### Phase 2: Create/Improve (skill-creator agent)
Task(subagent_type="brewcode:skill-creator", model="opus", prompt="
{ACTION} skill based on research and user preferences.
Action: {create|improve}
Topic/Skill: {TOPIC or SKILL_PATH}
Invocation type: {INVOCATION_TYPE}
## Discovery Results
{EXPLORE_RESULTS}
## Requirements
- Follow skill-creator best practices
- Generate unit tests for scripts/ (Step 5.7)
- Generate README.md (Step 5.8)
- Invocation type pre-filled: {INVOCATION_TYPE} — skip asking
")
**Mode Switcher additions** (if `IS_MODE_SWITCHER=true`) — append:
- Single skill with argument parsing: on [mode-name], off, status
- State in `$BC_PLUGIN_DATA/modes.json` — structure: `.global`, `.projects["$PWD"]`, `.sessions["$SESSION_ID"]`
- Scope: `{MODE_SCOPE}`, resolution priority: session > project > global
- `disable-model-invocation: true`, mode instructions in `references/`
- Bash MUST validate: `if [ -z "$BC_PLUGIN_DATA" ]; then echo "❌"; exit 1; fi`
After creation (if Mode Switcher): AskUserQuestion — create mode file in `brewcode/modes/`? If yes: spawn `brewcode:hook-creator`.
**Folder target (multiple skills):** spawn parallel agents in ONE message, one per SKILL.md found.
### Phase 3: Validate (automatic)
Skill-creator Steps 5-5.8 run automatically (validate, unit tests, README). No orchestrator action needed.
### Phase 4: Review
**Skip if `TESTING_DEPTH` is Quick.**
Read review prompt: `${CLAUDE_SKILL_DIR}/references/review-prompt.md`
**Simple Review (`REVIEW_TYPE` = Simple):**
1. Task(subagent_type="brewcode:reviewer", model="opus", prompt="Review skill quality at: {SKILL_PATH}\n\n{REVIEW_PROMPT_CONTENT}")
2. If findings: Task(subagent_type="brewcode:reviewer", model="sonnet", prompt="Verify these review findings against actual code...\n\n{REVIEWER_FINDINGS}")
3. Confirmed findings: Task(subagent_type="brewcode:skill-creator", model="opus", prompt="Fix verified issues in skill at: {SKILL_PATH}\n\n{CONFIRMED_FINDINGS}")
**Quorum Review (`REVIEW_TYPE` = Quorum):**
1. Three in parallel (ONE message):
Task(subagent_type="brewcode:reviewer", model="opus", prompt="Review skill quality at: {SKILL_PATH}\n\n{REVIEW_PROMPT_CONTENT}")
Task(subagent_type="brewcode:reviewer", model="opus", Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.