share-a-library — Claude Code skill: publish your library
share-a-library — a skill that automates publishing a finished local library to GitHub and generates an install command for your teammates.
MIT 161 installs ★ 1,161 updated 2026-09-21
npx skills add MoizIbnYousaf/ai-agent-skills --skill share-a-library -a claude-codeWhat share-a-library does
When your library is ready to share, this skill handles the full workflow: regenerates documentation via npx ai-agent-skills build-docs, initializes a Git repository, commits your code, and creates a public GitHub repo. It then returns the exact install command that other developers can run immediately in their projects.
If your library defines a starter-pack collection, the skill will suggest an install command scoped to that collection—cleaner than installing everything at once. It also checks whether the repo already exists and avoids creating duplicates; if a remote is already set up, it just pushes your changes.
You need to be working inside a managed library workspace that has passed basic sanity checks. The skill won't stop at git init; it delivers a ready-to-share install command for your team.
What it helps with
- publish a library to GitHub in one go
- generate the correct install command for your team
- avoid duplicate repositories when re-publishing
- choose between a starter pack and full library installation
Example prompts for the agent
- Publish this library to GitHub and give me the command to share with my team
- Take my finished local library, push it to GitHub, and return the install command
- Share this library: publish to GitHub and tell me how to install it
How to install share-a-library
1Skills CLI (Vercel)
npx skills add MoizIbnYousaf/ai-agent-skills --skill share-a-library -a claude-code2Manually: put the files in place
~/.claude/skills/share-a-library/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/share-a-library/
1Skills CLI (Vercel)
npx skills add MoizIbnYousaf/ai-agent-skills --skill share-a-library -a codex2Manually: put the files in place
.agents/skills/share-a-library/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add MoizIbnYousaf/ai-agent-skills --skill share-a-library -a cursor2Manually: put the files in place
.cursor/skills/share-a-library/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install MoizIbnYousaf/ai-agent-skills skills/share-a-library2Manually: put the files in place
.github/skills/share-a-library/SKILL.md1Skills CLI (Vercel)
npx skills add MoizIbnYousaf/ai-agent-skills --skill share-a-library -a gemini-cli2Platform CLI
gemini skills install https://github.com/MoizIbnYousaf/ai-agent-skills --path skills/share-a-libraryManually: put the files in place
.devin/skills/share-a-library/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add MoizIbnYousaf/ai-agent-skills --skill share-a-library -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about share-a-library
How do I install share-a-library in Claude Code?
Run npx skills add MoizIbnYousaf/ai-agent-skills --skill share-a-library -a claude-code, then edit ~/.claude/skills/share-a-library/SKILL.md.
What does the share-a-library skill do?
It takes a finished local library, publishes it to GitHub, regenerates documentation, and returns an install command you can hand to your team.
Do I need to set up Git myself before using this skill?
No. The skill handles Git initialization, commits your code, and pushes to GitHub. If the repo already exists, it connects the remote and pushes your changes.
Source text
SKILL.md · MIT
--- name: share-a-library description: Use when a managed library is ready to publish to GitHub and hand to teammates as an install command. Run the GitHub publishing steps, then return the exact shareable install command. category: workflow version: 4.1.0 --- # Share A Library ## Goal Turn a finished local library into a real shared artifact with a repo URL and an install command another agent can use. ## Preconditions - You are already inside a managed library workspace. - The library has been sanity-checked. - `npx ai-agent-skills build-docs` has already run, or you run it now before publishing. ## Workflow 1. Regenerate docs if needed. ```bash npx ai-agent-skills build-docs ``` 2. Publish the workspace to GitHub. ```bash git init git add . git commit -m "Initialize skills library" gh repo create <owner>/<repo> --public --source=. --remote=origin --push ``` 3. Return the exact shareable install command. If the library has a `starter-pack` collection: ```bash npx ai-agent-skills install <owner>/<repo> --collection starter-pack -p ``` Otherwise: ```bash npx ai-agent-skills install <owner>/<repo> -p ``` ## Guardrails - Do not stop at `git init`. A shared library is not shared until the repo exists and the install command is ready. - If the repo already exists, connect the existing remote and push instead of creating a duplicate. - Prefer the collection install command when a curated starter pack exists. - Return the actual repo coordinates you used, not placeholders. ## Done Return: - the repo URL - whether you shared a collection or the whole library - the exact install command to hand to teammates
© MoizIbnYousaf · MIT · MoizIbnYousaf/ai-agent-skills