refactor(dev): restructure Claude commands/skills directories
All checks were successful
CI / check (push) Successful in 3m16s
All checks were successful
CI / check (push) Successful in 3m16s
Correct terminology mismatch: - Rename skills/ to commands/ (these are user-invokable commands) - Create new skills/ for reference materials - Move bd_workflow.md to skills/ (it's reference material) - Add micro-skills and formulas directories - Update default.nix to install both commands and skills Commands → ~/.claude/commands/ (invokable as /command-name) Skills → ~/.claude/commands/skills/ (reference materials) Formulas → ~/.beads/formulas/ (workflow templates) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -90,8 +90,8 @@ in
|
||||
fi
|
||||
done
|
||||
|
||||
# Copy local skills from this repo (with retry for race conditions with running Claude)
|
||||
for file in ${./skills}/*.md; do
|
||||
# Copy local commands from this repo (with retry for race conditions with running Claude)
|
||||
for file in ${./commands}/*.md; do
|
||||
if [ -f "$file" ]; then
|
||||
filename=$(basename "$file" .md)
|
||||
dest="$HOME/.claude/commands/''${filename}.md"
|
||||
@@ -104,11 +104,36 @@ in
|
||||
fi
|
||||
done
|
||||
|
||||
$DRY_RUN_CMD echo "Claude Code humanlayer commands and agents installed successfully${
|
||||
if cfg.allowArbitraryClaudeCodeModelSelection
|
||||
then " (model specifications preserved)"
|
||||
else " (model selection removed)"
|
||||
} + local skills"
|
||||
# Copy local skills (reference materials) to skills subdirectory
|
||||
mkdir -p ~/.claude/commands/skills
|
||||
for file in ${./skills}/*.md; do
|
||||
if [ -f "$file" ]; then
|
||||
filename=$(basename "$file" .md)
|
||||
dest="$HOME/.claude/commands/skills/''${filename}.md"
|
||||
rm -f "$dest" 2>/dev/null || true
|
||||
if ! cp "$file" "$dest" 2>/dev/null; then
|
||||
sleep 0.5
|
||||
cp "$file" "$dest" || echo "Warning: Failed to copy $filename.md to skills"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Copy micro-skills (compact reusable knowledge referenced by formulas)
|
||||
for file in ${./skills/micro}/*.md; do
|
||||
if [ -f "$file" ]; then
|
||||
cp "$file" "$HOME/.claude/commands/skills/$(basename "$file")"
|
||||
fi
|
||||
done
|
||||
|
||||
# Install beads formulas to user-level formula directory
|
||||
mkdir -p ~/.beads/formulas
|
||||
for file in ${./formulas}/*.formula.toml; do
|
||||
if [ -f "$file" ]; then
|
||||
cp "$file" "$HOME/.beads/formulas/$(basename "$file")"
|
||||
fi
|
||||
done
|
||||
|
||||
$DRY_RUN_CMD echo "Claude Code plugins installed: humanlayer commands/agents + local commands + local skills + formulas"
|
||||
'';
|
||||
|
||||
# Set up beads Claude Code integration (hooks for SessionStart/PreCompact)
|
||||
|
||||
Reference in New Issue
Block a user