Loading...
Loading...
Expert guide for managing Claude Code global skills and commands. Use when creating new skills, symlinking to projects, updating existing skills, or organizing the centralized skill repository.
npx skill4agent add delphine-l/claude_global claude-skill-management$CLAUDE_METADATA$CLAUDE_METADATAecho $CLAUDE_METADATA
# Should output your claude_data directory path~/.zshrc~/.bashrcexport CLAUDE_METADATA="$HOME/path/to/claude_data" # Adjust to your actual pathsource ~/.zshrc # or source ~/.bashrcls -la $CLAUDE_METADATA/
# Should show:
# ├── skills/ # Global skills
# ├── commands/ # Global commands
# ├── README.md
# └── QUICK_REFERENCE.mdmkdir -p $CLAUDE_METADATA/{skills,commands}
cd $CLAUDE_METADATA~/.zshrc~/.bashrcecho 'export CLAUDE_METADATA="$HOME/path/to/claude_data" # Adjust to your actual path' >> ~/.zshrc
source ~/.zshrcecho $CLAUDE_METADATA
# Should output your claude_data directory path# Create README and QUICK_REFERENCE
# (use templates from claude-skill-management skill)cd $CLAUDE_METADATA
git init
git add .
git commit -m "Initial centralized skill repository"mkdir -p $CLAUDE_METADATA/skills/my-first-skill
# Create SKILL.md with frontmattercd ~/Workdir/my-project
mkdir -p .claude/skills
ln -s $CLAUDE_METADATA/skills/my-first-skill .claude/skills/$HOMEsource ~/.zshrcecho $CLAUDE_METADATAmkdir -p $CLAUDE_METADATA/skills/your-skill-namekebab-casegalaxy-tool-wrappingpython-testingdocker-workflowscat > $CLAUDE_METADATA/skills/your-skill-name/SKILL.md << 'EOF'
---
name: your-skill-name
description: Brief description that helps Claude decide when to activate this skill (1-2 sentences)
---
# Your Skill Name
Detailed instructions for Claude when this skill is activated.
## When to Use This Skill
- Specific use case 1
- Specific use case 2
- Specific use case 3
## Core Concepts
### Concept 1
Explanation and examples...
### Concept 2
Explanation and examples...
## Best Practices
- Practice 1
- Practice 2
## Common Issues and Solutions
### Issue 1
**Problem:** Description
**Solution:** How to fix it
## Examples
### Example 1: Task Name
Description and code examples...
EOFnamedescriptionversion1.0.0dependencies# Add detailed reference documentation
cat > $CLAUDE_METADATA/skills/your-skill-name/reference.md << 'EOF'
# Reference Documentation
Detailed technical information, API references, etc.
EOF
# Add examples directory
mkdir -p $CLAUDE_METADATA/skills/your-skill-name/examples
# Add templates directory
mkdir -p $CLAUDE_METADATA/skills/your-skill-name/templates# Create a test project
mkdir -p /tmp/test-skill-project/.claude/skills
# Symlink the new skill
ln -s $CLAUDE_METADATA/skills/your-skill-name /tmp/test-skill-project/.claude/skills/your-skill-name
# Start Claude Code in test project
cd /tmp/test-skill-project
# Tell Claude: "Use the your-skill-name skill to [test task]"# Use existing category
ls $CLAUDE_METADATA/commands/
# Or create new category
mkdir -p $CLAUDE_METADATA/commands/your-categoryvgp-pipeline/git-workflows/testing/deployment/cat > $CLAUDE_METADATA/commands/your-category/command-name.md << 'EOF'
---
name: command-name
description: Brief description shown in /help
---
Your command prompt here. This will be expanded when the user types /command-name.
You can include:
- Multi-line instructions
- Variable references: {{variable_name}}
- Markdown formatting
- Code blocks
Example:
Check the status of all workflows for species {{species_name}}.
Show me which workflows are complete, running, or failed.
EOFkebab-casecheck-statusdebug-failedupdate-skillsdeploy-productiondeploy# Symlink to test project
ln -s $CLAUDE_METADATA/commands/your-category/command-name.md /tmp/test-project/.claude/commands/
# Start Claude Code and test
# Type: /command-nameln -s $CLAUDE_METADATA/skills/token-efficiency .claude/skills/token-efficiency--quietln -s $CLAUDE_METADATA/skills/claude-collaboration .claude/skills/claude-collaborationln -s $CLAUDE_METADATA/skills/galaxy-automation .claude/skills/galaxy-automationmkdir -p .claude/commands
# Symlink ALL global commands (always include)
ln -s $CLAUDE_METADATA/commands/global/*.md .claude/commands/
/update-skills/list-skills/setup-project/sync-skills/cleanup-project# Navigate to your new project
cd ~/Workdir/your-new-project/
# Create .claude directories
mkdir -p .claude/skills .claude/commands
# Symlink essential global skills
ln -s $CLAUDE_METADATA/skills/token-efficiency .claude/skills/token-efficiency
ln -s $CLAUDE_METADATA/skills/claude-collaboration .claude/skills/claude-collaboration
ln -s $CLAUDE_METADATA/skills/python-environment-management .claude/skills/python-environment-management
# Symlink ALL global commands (always include)
ln -s $CLAUDE_METADATA/commands/global/*.md .claude/commands/
# Add project-specific skills as needed
# For Galaxy projects:
# ln -s $CLAUDE_METADATA/skills/galaxy-automation .claude/skills/galaxy-automation
# Verify
ls -la .claude/skills/
ls -la .claude/commands/Set up this new project with Claude Code. Symlink the essential global skills
(token-efficiency, claude-collaboration, and python-environment-management) and global commands
from $CLAUDE_METADATA/skills/ and ALL global commands from $CLAUDE_METADATA/commands/global/, then show me
other available skills I might want to add./setup-projectSet up Claude Code for this project. Show me available skills in $CLAUDE_METADATA and let me choose which ones to symlink.# Navigate to your project
cd ~/Workdir/your-project/
# Create directories if needed
mkdir -p .claude/skills .claude/commands
# Symlink specific skill
ln -s $CLAUDE_METADATA/skills/skill-name .claude/skills/skill-name
# Symlink all commands from a category
ln -s $CLAUDE_METADATA/commands/category/*.md .claude/commands/
# Symlink specific command
ln -s $CLAUDE_METADATA/commands/category/command-name.md .claude/commands/command-name.md# Link every skill (use cautiously)
for skill in $CLAUDE_METADATA/skills/*; do
ln -s "$skill" .claude/skills/$(basename "$skill")
done
# Link all commands from all categories
for category in $CLAUDE_METADATA/commands/*; do
ln -s "$category"/*.md .claude/commands/
done# Check what's linked
ls -la .claude/skills/
ls -la .claude/commands/
# Verify targets exist
ls -L .claude/skills/ # Follows symlinks# Edit the skill file
nano $CLAUDE_METADATA/skills/skill-name/SKILL.md
# Or use Claude
# Tell Claude: "Update the skill-name skill to add [new information]"# If you have the update-skills command linked
/update-skills
# Claude will:
# 1. Review your session
# 2. Suggest skill updates
# 3. Ask for approval
# 4. Apply changesReview today's session and suggest updates to relevant skills in $CLAUDE_METADATA.# Update skill in central location
vim $CLAUDE_METADATA/skills/vgp-pipeline/SKILL.md
# ALL projects with symlinks immediately see the update! 🎉
# No need to update each project individuallyCheck what skills and commands are available in $CLAUDE_METADATA and compare with what's currently symlinked in this project. Show me what's new or missing, and let me choose which ones to add.$CLAUDE_METADATA# List available skills
ls $CLAUDE_METADATA/skills/
# List what you have
ls .claude/skills/
# Add missing ones
ln -s $CLAUDE_METADATA/skills/new-skill .claude/skills/new-skill$CLAUDE_METADATA/skills/
├── vgp-pipeline/ # VGP workflows
├── galaxy-tool-wrapping/ # Galaxy development
├── python-testing/ # Python test patterns
├── docker-workflows/ # Docker/containers
└── bioinformatics-common/ # General bioinformatics$CLAUDE_METADATA/commands/
├── vgp-pipeline/ # VGP-specific commands
│ ├── check-status.md
│ └── debug-failed.md
├── git-workflows/ # Git commands
│ └── review-commits.md
└── deployment/ # Deployment commands
└── deploy-production.mddomain-subdomaintechnology-purposegalaxy-tool-wrappingvgp-pipelinepython-testingverb-nounverb-targetcheck-statusdebug-failedupdate-skillsSKILL.mdreference.mdexamples/cd $CLAUDE_METADATA
git init
git add .
git commit -m "Initial commit: centralized skills and commands"# After updating skills
cd $CLAUDE_METADATA
git status # See what changed
git diff # Review changes
# Commit updates
git add skills/skill-name/SKILL.md
git commit -m "Add troubleshooting section for XYZ issue"
# Optional: Push to remote for team sharing
git push origin main# Create GitHub/GitLab repo
git remote add origin git@github.com:your-team/claude-metadata.git
git push -u origin maingit clone git@github.com:your-team/claude-metadata.git ~/path/to/claude_data
export CLAUDE_METADATA="$HOME/path/to/claude_data" # Adjust to your actual pathcd $CLAUDE_METADATA
git pull # All projects with symlinks auto-update!git commit -m "Add token optimization for VGP log files (96% savings)"
git commit -m "Document WF8 failure pattern when Hi-C R2 missing"
git commit -m "Create galaxy-tool-wrapping skill for tool development"git commit -m "update"
git commit -m "changes"
git commit -m "fix stuff"ls -la .claude/skills/
# Should show: skill-name -> $CLAUDE_METADATA/skills/skill-namels -L .claude/skills/skill-name
# Should show: SKILL.mdhead -10 .claude/skills/skill-name/SKILL.md
# Should have:
# ---
# name: skill-name
# description: ...
# ---ls -la .claude/commands/command-name.mdhead -5 .claude/commands/command-name.md
# Should have:
# ---
# name: command-name
# description: ...
# ---# Check current value
echo $CLAUDE_METADATA
# If empty, add to shell config
echo 'export CLAUDE_METADATA="$HOME/path/to/claude_data" # Adjust to your actual path' >> ~/.zshrc
source ~/.zshrc
# Verify
echo $CLAUDE_METADATAls -la .claude/skills/skill-name# Remove broken symlink
rm .claude/skills/skill-name
# Recreate with correct path
ln -s $CLAUDE_METADATA/skills/skill-name .claude/skills/skill-name
# Verify
ls -L .claude/skills/skill-name$CLAUDE_METADATA# Check if it's a symlink
ls -la .claude/skills/skill-name
# Should show -> pointing to $CLAUDE_METADATA# Find all copies
find ~/Workdir -name "SKILL.md" -path "*/skill-name/*"
# Should only show one in $CLAUDE_METADATAgalaxy-tool-wrapping/SKILL.mdvgp-pipeline/SKILL.mdeverything/SKILL.mddescription: Expert in Galaxy tool wrapper development, XML schemas, and Planemo testing
description: VGP genome assembly pipeline orchestration, debugging, and workflow managementdescription: Helps with stuff
description: Development skill## Use --quiet Mode for Status Checks
**Why:** Status checks with verbose output produce 15K tokens, but only 2K
with --quiet mode. Over a typical workflow (10 checks), this saves 130K tokens
(87% reduction).
**When to override:** User explicitly requests detailed output, or debugging
requires full logs.# Always use git
cd $CLAUDE_METADATA
git add .
git commit -m "Descriptive message"
# Never work without version control
# You'll want to undo changes eventually!# Use git for team collaboration
git push origin main
# Team members stay updated
cd $CLAUDE_METADATA && git pullln -s $CLAUDE_METADATA/skills/my-skill .claude/skills/my-skillcp -r $CLAUDE_METADATA/skills/my-skill .claude/skills/my-skill# Template with placeholders
TEMPLATE='
MAIN_FILE="__MAIN_FILE__"
BACKUP_DIR="__BACKUP_BASE_DIR__"
DAYS="__DAYS_TO_KEEP__"
'
# Substitute with actual values
echo "$TEMPLATE" | \
sed "s|__MAIN_FILE__|$ACTUAL_FILE|g" | \
sed "s|__BACKUP_BASE_DIR__|$ACTUAL_DIR|g" | \
sed "s|__DAYS_TO_KEEP__|$ACTUAL_DAYS|g" \
> final_script.sh# Store template in file
cat > template.sh << 'EOF'
MAIN_FILE="__MAIN_FILE__"
BACKUP_DIR="__BACKUP_BASE_DIR__"
EOF
# Generate from template
sed "s|__MAIN_FILE__|data.csv|g" template.sh > backup.shmkdir -p $CLAUDE_METADATA/skills/skill-name
cat > $CLAUDE_METADATA/skills/skill-name/SKILL.md << 'EOF'
---
name: skill-name
description: Brief description
---
# Content here
EOFln -s $CLAUDE_METADATA/skills/skill-name .claude/skills/skill-name# Edit directly
vim $CLAUDE_METADATA/skills/skill-name/SKILL.md
# Or tell Claude
"Update the skill-name skill to add [information]"# Tell Claude
"Check what skills are available in $CLAUDE_METADATA and show me what's new"ls $CLAUDE_METADATA/skills/ls $CLAUDE_METADATA/commands/*/echo $CLAUDE_METADATA
ls -la .claude/skills/
ls -la .claude/commands/# Quick setup for new project
cd ~/Workdir/new-project
mkdir -p .claude/skills .claude/commands
# Always symlink these essential skills
ln -s $CLAUDE_METADATA/skills/token-efficiency .claude/skills/token-efficiency
ln -s $CLAUDE_METADATA/skills/claude-collaboration .claude/skills/claude-collaboration
# Always symlink these useful commands
ln -s $CLAUDE_METADATA/commands/global/*.md .claude/commands/
# Verify
ls -la .claude/skills/
ls -la .claude/commands/mkdir -p $CLAUDE_METADATA/skills/docker-workflows
# Create SKILL.md with frontmattermkdir -p /tmp/test/.claude/skills
ln -s $CLAUDE_METADATA/skills/docker-workflows /tmp/test/.claude/skills/
# Start Claude Code, test the skillcd ~/Workdir/real-project
ln -s $CLAUDE_METADATA/skills/docker-workflows .claude/skills/cd $CLAUDE_METADATA
git add skills/docker-workflows/
git commit -m "Add docker-workflows skill"
git push$CLAUDE_METADATA/skills/vgp-pipeline/SKILL.mdgit diffgit commit -m "Add WF8 troubleshooting pattern"git pushcd ~/Workdir/new-project
mkdir -p .claude/skills .claude/commands# Always include these
ln -s $CLAUDE_METADATA/skills/token-efficiency .claude/skills/token-efficiency
ln -s $CLAUDE_METADATA/skills/claude-collaboration .claude/skills/claude-collaboration
ln -s $CLAUDE_METADATA/skills/python-environment-management .claude/skills/python-environment-management# Always include for all projects
ln -s $CLAUDE_METADATA/commands/global/*.md .claude/commands/# For Galaxy projects:
ln -s $CLAUDE_METADATA/skills/galaxy-automation .claude/skills/galaxy-automation/setup-projectI've set up the essential skills and commands. Show me other available skills in
$CLAUDE_METADATA that might be relevant for [describe your project type]./list-skillsgit add .claude/
git commit -m "Add Claude Code configuration
Essential global skills and commands:
- token-efficiency (token optimization)
- claude-collaboration (team best practices)
- galaxy-automation (BioBlend & Planemo)
- Global commands: /update-skills, /list-skills, /setup-project
[Additional project-specific skills if added]"$CLAUDE_METADATA/update-skills# List all markdown files
find $CLAUDE_METADATA -name "*.md" -type f | sort
# Compare similar files
diff file1.md file2.md
# Search for overlapping content
grep -r "specific topic" $CLAUDE_METADATAskills/*/SKILL.mdcommands/category/cd $CLAUDE_METADATA
mkdir -p .backup-$(date +%Y%m%d-%H%M%S)
cp -r files-to-modify .backup-$(date +%Y%m%d-%H%M%S)/skills/skill-name/reference.md## Supporting Documentation
This skill includes detailed reference documentation:
- **reference.md** - Comprehensive guide
- **troubleshooting.md** - Common issues and solutionstree -L 3 $CLAUDE_METADATA
# Should show clean, logical organization$CLAUDE_METADATA# Essential global skills (always)
ln -s $CLAUDE_METADATA/skills/token-efficiency .claude/skills/token-efficiency
ln -s $CLAUDE_METADATA/skills/claude-collaboration .claude/skills/claude-collaboration
ln -s $CLAUDE_METADATA/skills/python-environment-management .claude/skills/python-environment-management
# ALL global commands (always include for management)
ln -s $CLAUDE_METADATA/commands/global/*.md .claude/commands/
# Project-specific skills (add as needed)
# For Galaxy projects:
# ln -s $CLAUDE_METADATA/skills/galaxy-automation .claude/skills/galaxy-automation/update-skills/list-skills/setup-project/sync-skills/cleanup-project