$npx -y skills add AgriciDaniel/skill-forge --skill skill-forge-publishPackage and distribute Claude Code skills for sharing via GitHub, Claude.ai uploads, or team deployment. Creates install scripts, documentation, and .skill packages. Use when user says "publish skill", "share skill", "package skill", "distribute skill", or "release skill".
| 1 | # Skill Publishing & Distribution |
| 2 | |
| 3 | ## Process |
| 4 | |
| 5 | ### Step 1: Pre-Publish Validation |
| 6 | |
| 7 | Run the full review before publishing: |
| 8 | 1. Execute `/skill-forge review <path>` and ensure score >= 80/100 |
| 9 | 2. Fix any critical or high-priority issues |
| 10 | 3. Test with at least 5 trigger queries |
| 11 | 4. Verify all cross-references resolve |
| 12 | |
| 13 | ### Step 2: Create Install Script |
| 14 | |
| 15 | Generate `install.sh` that handles: |
| 16 | |
| 17 | ```bash |
| 18 | #!/usr/bin/env bash |
| 19 | # Install script for [skill-name] |
| 20 | # Usage: bash install.sh |
| 21 | |
| 22 | set -euo pipefail |
| 23 | |
| 24 | SKILL_DIR="$HOME/.claude/skills" |
| 25 | AGENT_DIR="$HOME/.claude/agents" |
| 26 | SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" |
| 27 | |
| 28 | echo "Installing [skill-name] skill..." |
| 29 | |
| 30 | # Create directories |
| 31 | mkdir -p "$SKILL_DIR" "$AGENT_DIR" |
| 32 | |
| 33 | # Copy main skill |
| 34 | cp -r "$SCRIPT_DIR/skill-name" "$SKILL_DIR/" |
| 35 | echo " Installed: skill-name" |
| 36 | |
| 37 | # Copy sub-skills |
| 38 | for skill in "$SCRIPT_DIR/skills"/skill-name-*/; do |
| 39 | if [ -d "$skill" ]; then |
| 40 | skill_basename=$(basename "$skill") |
| 41 | cp -r "$skill" "$SKILL_DIR/" |
| 42 | echo " Installed: $skill_basename" |
| 43 | fi |
| 44 | done |
| 45 | |
| 46 | # Copy agents (if any) |
| 47 | if [ -d "$SCRIPT_DIR/agents" ]; then |
| 48 | cp "$SCRIPT_DIR/agents"/*.md "$AGENT_DIR/" 2>/dev/null || true |
| 49 | echo " Installed agents" |
| 50 | fi |
| 51 | |
| 52 | echo "" |
| 53 | echo "Installation complete!" |
| 54 | echo "Test with: /skill-name" |
| 55 | ``` |
| 56 | |
| 57 | ### Step 3: Create README.md (repo-level, NOT inside skill folder) |
| 58 | |
| 59 | ```markdown |
| 60 | # [Skill Name] |
| 61 | |
| 62 | [1-2 sentence description focusing on outcomes, not features] |
| 63 | |
| 64 | ## What it does |
| 65 | |
| 66 | [Bullet list of key capabilities] |
| 67 | |
| 68 | ## Installation |
| 69 | |
| 70 | ### Claude Code |
| 71 | ``` |
| 72 | git clone https://github.com/[user]/[repo] |
| 73 | cd [repo] |
| 74 | bash install.sh |
| 75 | ``` |
| 76 | |
| 77 | ### Claude.ai |
| 78 | 1. Download the latest release (.zip) |
| 79 | 2. Go to Settings > Capabilities > Skills |
| 80 | 3. Click "Upload skill" |
| 81 | 4. Select the downloaded .zip file |
| 82 | |
| 83 | ## Commands |
| 84 | |
| 85 | | Command | Description | |
| 86 | |---------|-------------| |
| 87 | | `/skill-name` | [description] | |
| 88 | | `/skill-name cmd` | [description] | |
| 89 | |
| 90 | ## Examples |
| 91 | |
| 92 | ### [Example 1 title] |
| 93 | ``` |
| 94 | User: "[example input]" |
| 95 | ``` |
| 96 | [Description of what happens and expected output] |
| 97 | |
| 98 | ## Architecture |
| 99 | |
| 100 | ``` |
| 101 | [file tree diagram] |
| 102 | ``` |
| 103 | |
| 104 | ## License |
| 105 | |
| 106 | [License type] |
| 107 | ``` |
| 108 | |
| 109 | ### Step 4: Package for Distribution |
| 110 | |
| 111 | **For Claude.ai upload:** |
| 112 | Run `python scripts/package_skill.py <path> <output-dir>` to create a `.skill` zip file. |
| 113 | |
| 114 | **For GitHub:** |
| 115 | 1. Create repository with README.md at root |
| 116 | 2. Skill folder(s) at root level |
| 117 | 3. install.sh at root level |
| 118 | 4. Add LICENSE file |
| 119 | 5. Add .gitignore (exclude .tmp/, __pycache__/, *.pyc) |
| 120 | |
| 121 | **For team deployment (Claude.ai admin):** |
| 122 | - Skills can be deployed workspace-wide by admins |
| 123 | - Package as .skill zip and upload through admin console |
| 124 | |
| 125 | ### Step 5: Create .gitignore |
| 126 | |
| 127 | ``` |
| 128 | __pycache__/ |
| 129 | *.pyc |
| 130 | *.pyo |
| 131 | .tmp/ |
| 132 | *.egg-info/ |
| 133 | dist/ |
| 134 | build/ |
| 135 | .env |
| 136 | *.skill |
| 137 | ``` |
| 138 | |
| 139 | ### Step 6: Release Checklist |
| 140 | |
| 141 | - [ ] All files validated (score >= 80) |
| 142 | - [ ] install.sh tested on clean system |
| 143 | - [ ] README.md covers installation, usage, and examples |
| 144 | - [ ] LICENSE file included |
| 145 | - [ ] .gitignore configured |
| 146 | - [ ] No secrets or API keys in any file |
| 147 | - [ ] Test queries documented |
| 148 | - [ ] Version tagged (if using git) |
| 149 | |
| 150 | ### Step 7: Post-Publish |
| 151 | |
| 152 | After publishing: |
| 153 | 1. Test installation from scratch on a clean environment |
| 154 | 2. Run all trigger test queries |
| 155 | 3. Collect initial user feedback |
| 156 | 4. Plan first iteration based on feedback |
| 157 | 5. Set up issue templates for bug reports |
| 158 | |
| 159 | ## Distribution Channels |
| 160 | |
| 161 | | Channel | Best For | Format | |
| 162 | |---------|----------|--------| |
| 163 | | GitHub | Open source, community | Repository + install.sh | |
| 164 | | Claude.ai upload | Personal use | .skill zip | |
| 165 | | Team admin | Organization-wide | .skill zip via admin console | |
| 166 | | Claude Plugin Marketplace | Wide distribution | .claude-plugin/ manifest | |