/better-skills:better-skill-publishfrom better-skills
Package a agent skill into a complete GitHub repository ready for distribution via skills.sh. Generates README, LICENSE, plugin.json, marketplace.json, .gitignore, and the proper directory structure. Optionally initializes a git repo and creates a GitHub repository. This skill should be used when publishing a skill, packaging a skill for distribution, preparing a skill repo, or when the user says 'publish skill', 'package skill', 'release skill', '发布技能', '打包 skill'.
Ships in better-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Match user's language: Respond in the same language the user uses.
Package a agent skill into a complete, distributable GitHub repository. Generates all the surrounding files (README, LICENSE, plugin.json, marketplace.json) and optionally creates the GitHub repo.
publish.pyProgress:
Accept the skill location in multiple forms:
| Input | Detection | Action |
|---|---|---|
| Directory with SKILL.md | Direct path | Use as-is |
| SKILL.md file path | Path ends in SKILL.md | Use parent directory |
| Current directory | No input, cwd has SKILL.md | Auto-detect |
Check for better-skill-review availability:
{SKILL_DIR}/../better-skill-review/scripts/validate.py~/.agents/skills/better-skill-review/scripts/validate.pyIf found, suggest running validation:
python3 <validate.py path> run --path <skill-path>
If there are failures, recommend fixing them before proceeding. Warnings are acceptable.
If better-skill-review is not available, offer:
npx skills add psylch/better-skills@better-skill-review -g -yUse AskUserQuestion to gather:
GitHub owner/org — Default: try to infer from git config user.name or gh api user -q .login. Ask user to confirm or change.
Repository name — Default: <skill-name>-skill (e.g., cors-audit-skill). Suggest the convention but let user override.
Version — Default: 1.0.0. Use semver.
License — Default: MIT. Options: MIT, Apache-2.0, GPL-3.0.
Output directory — Where to create the repo. Default: parent directory of the skill.
python3 {SKILL_DIR}/scripts/publish.py generate \
--skill-path <path> \
--owner <owner> \
--repo <repo-name> \
--version <version> \
[--license mit|apache2|gpl3] \
[--output <dir>] \
[--force]
Where {SKILL_DIR} is the directory containing this SKILL.md file.
The script outputs JSON to stdout:
{
"status": "ok",
"output_dir": "/path/to/output",
"repo": "owner/repo-name",
"created": [".claude-plugin/plugin.json", "README.md", "LICENSE", ...],
"hint": "Repository files generated. Next: git init or gh repo create."
}
Present a completion report:
[Skill Publish] Complete!
Skill: <skill-name>
Repository: <owner>/<repo>
License: <license>
Output: <directory>
Files created:
• <list from JSON "created" field>
Next Steps:
→ A) Initialize git repo
→ B) Create GitHub repo and push
→ C) Done — handle git manually
Then let the user choose:
Option A: Initialize git repo
cd <output-dir>
git init
git add .
git commit -m "Initial commit"
Option B: Create GitHub repo and push
cd <output-dir>
git init
git add .
git commit -m "Initial commit"
gh repo create <owner>/<repo> --public --source . --push
Option C: Done — User will handle git themselves.
After creation, remind the user:
npx skills add ./ -g -y<repo-name>/
├── .claude-plugin/
│ ├── plugin.json
│ └── marketplace.json
├── skills/
│ └── <skill-name>/ # Copied from source
│ ├── SKILL.md
│ ├── scripts/
│ └── references/
├── README.md
├── README.zh.md
├── LICENSE
└── .gitignore
For details about skills.sh registry, versioning strategy, and publishing conventions, read references/distribution_guide.md.
references/distribution_guide.md (opens in a new tab)scripts/publish.py (opens in a new tab)templates/LICENSE_apache2.tmpl (opens in a new tab)templates/LICENSE_gpl3.tmpl (opens in a new tab)templates/LICENSE_mit.tmpl (opens in a new tab)templates/README.md.tmpl (opens in a new tab)templates/README.zh.md.tmpl (opens in a new tab)templates/gitignore.tmpl (opens in a new tab)templates/marketplace.json.tmpl (opens in a new tab)templates/plugin.json.tmpl (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/better-skill-creatorCreate new agent skills with best-practice templates. Guides through skill level selection (L0 pure prompt, L0+ with helper scripts, L1 with business scripts), environment strategy (stdlib/uv/venv), and generates ready-to-edit project files following runtime UX best practices. This skill should be used when creating a new skill, scaffolding a skill project, initializing skill templates, or when the user says 'help me build a skill', 'create a skill', '创建技能', '新建 skill'./better-skill-reviewReview an agent skill by combining automated linting with structured semantic analysis. Runs hard-rule validation, evaluates contextual findings, then performs deep review against best practices (description quality, workflow design, runtime robustness, script conventions, UX patterns). Produces actionable improvement suggestions with before/after examples. This skill should be used when reviewing a skill, validating skill structure, improving skill quality, checking skill conventions, or when the user says 'review skill', 'validate skill', 'check skill', 'improve skill', 'iterate on skill', '走查技能', '验证技能', '检查 skill', '改进技能', '优化 skill'.npx claudepluginhub psylch/better-skills --plugin better-skillsOther plugins' skills for the same job