share-a-library

$npx mdskill add MoizIbnYousaf/Ai-Agent-Skills/share-a-library

Publishes a managed library to GitHub and returns the install command.

  • Solves sharing a local library with teammates via GitHub.
  • Depends on git, GitHub CLI, and npx ai-agent-skills.
  • Decides install command based on existence of starter-pack collection.
  • Returns a ready-to-use npx install command with repo coordinates.

SKILL.md

.github/skills/share-a-libraryView on GitHub ↗
---
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

More from MoizIbnYousaf/Ai-Agent-Skills

SkillDescription
ask-questions-if-underspecifiedClarify requirements before implementing. Do not use automatically, only when invoked explicitly.
audit-library-healthUse when checking the overall health of a skills library. Run doctor, validate, check for stale skills, and verify generated docs are in sync.
backend-developmentBackend API design, database architecture, microservices patterns, and test-driven development. Use for designing APIs, database schemas, or backend system architecture.
browse-and-evaluateUse when exploring the ai-agent-skills catalog to find, compare, and evaluate skills before installing. Always use --fields to limit output size and --dry-run before committing to an install.
build-workspace-docsUse when regenerating README.md and WORK_AREAS.md in a managed library workspace. Always dry-run first to preview changes.
code-documentationWriting effective code documentation - API docs, README files, inline comments, and technical guides. Use for documenting codebases, APIs, or writing developer guides.
curate-a-team-libraryUse when building a managed team skills library for a real stack. Map work to shelves, browse before curating, write meaningful `whyHere` notes, and create a starter pack once the first pass is solid.
install-from-remote-libraryUse when installing skills from a shared ai-agent-skills library repo. Inspect with `--list` first, prefer `--collection`, and preview with `--dry-run` before installing.
llm-application-devBuilding applications with Large Language Models - prompt engineering, RAG patterns, and LLM integration. Use for AI-powered features, chatbots, or LLM-based automation.
migrate-skills-between-librariesUse when moving skills between library workspaces or upgrading from a personal library to a team library. Export from one workspace, import into another.