Get the FREE Ultimate OpenClaw Setup Guide →

brewcode:skills

npx machina-cli add skill kochetkov-ma/claude-brewcode/skills --openclaw
Files (1)
SKILL.md
6.8 KB

skills Skill

Skill Management: List, improve, create skills with activation optimization.

<instructions>

Phase 1: Parse Arguments

Extract mode and target from $ARGUMENTS:

PatternModeTarget
emptylistnone
listlistnone
up <name|path|folder>upskill name, path, or folder
create <prompt|spec-path>createprompt 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:skillslist
  • /brewcode:skills listlist
  • /brewcode:skills up commitup, target=commit
  • /brewcode:skills up ~/.claude/skills/up, target=folder (all skills)
  • /brewcode:skills create "semantic code search"create, target=prompt
  • /brewcode:skills create ./spec.mdcreate, target=spec file
  • /brewcode:skills commitup, target=commit (shorthand)
  • /brewcode:skills brewcode/skills/setupup, target=path (shorthand)
  • /brewcode:skills ~/.claude/skills/up, target=folder (shorthand)

Mode: list

List all skills (global, project, plugin).

EXECUTE using Bash tool:

bash "scripts/list-skills.sh" && echo "✅ list" || echo "❌ list FAILED"

STOP if ❌ — verify skill base directory is resolved and scripts exist.


Mode: up

Improve skill(s) via skill-creator agent.

Step 1: Resolve Target

Target TypeResolution
Skill name (commit)Search in global/project/plugin skills
Path (~/.claude/skills/commit/SKILL.md)Use directly
Folder (~/.claude/skills/)Find all */SKILL.md in folder

EXECUTE using Bash tool — resolve target:

TARGET="$ARGUMENTS"
# Remove "up " prefix if present (explicit mode), else use as-is (shorthand)
if [[ "$TARGET" == up\ * ]] || [[ "$TARGET" == "up" ]]; then
  TARGET="${TARGET#up }"
  TARGET="${TARGET#up}"
fi
TARGET="$(echo "$TARGET" | xargs)"  # trim

if [[ -z "$TARGET" ]]; then
  echo "❌ No target specified. Usage: /brewcode:skills up <name|path|folder>"
  echo "Shorthand: /brewcode:skills <name|path|folder>"
  exit 1
fi

# Check if it's a path
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
  # Search by name
  echo "TYPE: name"
  echo "NAME: $TARGET"
  # Search locations
  for loc in ~/.claude/skills .claude/skills; do
    if [[ -f "$loc/$TARGET/SKILL.md" ]]; then
      echo "FOUND: $loc/$TARGET/SKILL.md"
    fi
  done
fi

Step 2: Spawn skill-creator Agent(s)

Single skill: Spawn one agent.

Task tool:
  subagent_type: "brewcode:skill-creator"
  prompt: |
    Improve this skill's activation rate and quality.

    Skill path: {SKILL_PATH}

    Tasks:
    1. Read current SKILL.md
    2. Analyze description for trigger keywords
    3. Check body for imperative form, clear instructions
    4. Apply skill-creator best practices
    5. Update SKILL.md with improvements

    Focus on:
    - Description has "Use when:", "Trigger keywords:", "Triggers -"
    - No summary in description (only triggers!)
    - Third-person voice
    - Imperative form in body
    - <500 lines
  model: opus

Multiple skills (folder): Spawn agents in parallel (single message).

# For each SKILL.md found, spawn in ONE Task call block:
Task tool:
  subagent_type: "brewcode:skill-creator"
  prompt: "Improve skill: {SKILL_PATH_1}..."

Task tool:
  subagent_type: "brewcode:skill-creator"
  prompt: "Improve skill: {SKILL_PATH_2}..."

# etc.

CRITICAL: Spawn ALL agents in a single message for parallel execution.


Mode: create

Research topic, then create skill via skill-creator.

Step 1: Determine Input Type

InputAction
Path to .md fileRead as spec
Text promptUse as research query

Step 2: Clarify Invocation Type

Use AskUserQuestion before spawning any agents:

header: "Invocation"
question: "Who will invoke this skill?"
options:
  - label: "User only (slash command)"
    description: "Only via /skill-name — sets disable-model-invocation: true, simple description"
  - label: "LLM auto-detect"
    description: "Claude picks it up from context — full trigger keyword optimization"
  - label: "Both (default)"
    description: "User slash command + LLM auto-detection"

Save answer as INVOCATION_TYPE for use in Step 4.


Step 3: Parallel Research

Spawn two agents in parallel (single message):

Task tool:
  subagent_type: "Explore"
  prompt: |
    Research codebase for: {TOPIC}

    Find:
    - Related existing skills
    - Patterns and conventions
    - Similar implementations
    - Relevant file structures

    Output: Summary of findings for skill creation.

Task tool:
  subagent_type: "general-purpose"
  prompt: |
    Web research for: {TOPIC}

    Search for:
    - Best practices for this type of skill
    - Similar tools/implementations
    - Common patterns and conventions

    Use WebSearch and WebFetch tools.
    Output: Summary of external knowledge for skill creation.

Step 4: Create Skill

After research completes, spawn skill-creator:

Task tool:
  subagent_type: "brewcode:skill-creator"
  prompt: |
    Create new skill based on research.

    Topic: {TOPIC}
    Invocation type: {INVOCATION_TYPE}

    ## Codebase Research
    {EXPLORE_RESULTS}

    ## Web Research
    {WEB_RESULTS}

    ## Requirements
    - Location: .claude/skills/{skill-name}/ (project) or ~/.claude/skills/{skill-name}/ (global)
    - Follow skill-creator best practices
    - Optimized description for 84% activation
    - Include README.md
  model: opus
</instructions>

Output Format

# skills [{MODE}]

## Detection

| Field | Value |
|-------|-------|
| Arguments | `$ARGUMENTS` |
| Mode | `[detected mode]` |
| Target | `[target or none]` |

## Results

[Mode-specific output]

## Skills Summary

| Location | Count | Skills |
|----------|-------|--------|
| Global (~/.claude/skills/) | N | skill1, skill2 |
| Project (.claude/skills/) | N | skill3 |
| Plugins | N | plugin:skill1 |

## Next Steps

- [recommendations based on mode]

Source

git clone https://github.com/kochetkov-ma/claude-brewcode/blob/main/brewcode/skills/skills/SKILL.mdView on GitHub

Overview

brewcode:skills is a skill management tool that lists, improves, and creates skills with activation optimization. It supports global, project, and plugin skill bases and relies on a skill-creator agent to boost activation rate and clarity by updating SKILL.md.

How This Skill Works

Users switch modes (list, up, create) to operate. For up, the tool resolves the target (name, path, or folder) via a Bash-based resolver, then launches a skill-creator agent that reads the existing SKILL.md, analyzes triggers and imperative form, and rewrites the file to improve activation cues and standardize voice.

When to Use It

  • Audit all skills across global, project, and plugin bases.
  • Improve activation rate and clarity of a single skill via up.
  • Create a new skill from a prompt or spec file via create.
  • Improve multiple skills inside a folder in parallel.
  • Standardize triggers and voice across skills with guided improvements.

Quick Start

  1. Step 1: List current skills with /brewcode:skills list.
  2. Step 2: Improve a skill with /brewcode:skills up <name|path|folder>.
  3. Step 3: Create a new skill from a spec or prompt with /brewcode:skills create <prompt|spec-path>.

Best Practices

  • Run list first to establish baseline before improvements.
  • Target a single skill or a folder to keep changes focused.
  • Ensure SKILL.md includes clear trigger keywords and activation cues.
  • Use third-person voice and imperative mood in the body as required.
  • Keep SKILL.md under 500 lines and follow skill-creator guidance.

Example Use Cases

  • List all skills to audit availability.
  • Improve the activation rate of the commit skill with an up operation.
  • Improve all skills under ~/.claude/skills/ by running up on the folder.
  • Create a new skill from a spec file via create spec.md.
  • Create a new skill from a user prompt via create semantic code search.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers