Skip to content

feat: Auto-generate commands/ from user-invocable skills during build #231

@yonatangross

Description

@yonatangross

Summary

Workaround for Claude Code bug where skills with user-invocable: true in skills/*/SKILL.md aren't discovered as slash commands. CC only looks for commands in commands/*.md.

Related CC Bug: anthropics/claude-code#20802

Problem

  • OrchestKit has 22 skills marked user-invocable: true in their SKILL.md frontmatter
  • These should be callable via /ork:skill-name
  • But CC doesn't discover them - it only looks in commands/ directory

Solution

Enhance the build script to auto-generate commands/*.md from skills with user-invocable: true:

# After copying skills, generate commands/
mkdir -p "$PLUGIN_DIR/commands"
for skill_md in "$PLUGIN_DIR/skills"/*/SKILL.md; do
    if grep -q "user-invocable: true" "$skill_md"; then
        skill_name=$(dirname "$skill_md" | xargs basename)
        # Generate command file with skill content
        generate_command "$skill_md" > "$PLUGIN_DIR/commands/$skill_name.md"
    fi
done

Benefits

  • Single source of truth stays in src/skills/
  • Each plugin auto-gets commands for its included skills
  • Consistent with existing multi-plugin architecture
  • Easy to remove when CC fixes the upstream bug

Tasks

  • Add generate_commands function to scripts/build-plugins.sh
  • Generate command files with proper frontmatter (description, allowed-tools)
  • Include skill content in command file
  • Test with all 34 plugins
  • Update CHANGELOG

Affected Files

  • scripts/build-plugins.sh
  • plugins/*/commands/*.md (generated)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions