share-a-library

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

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.
将已完成的本地库转换为具备仓库URL和可供其他Agent使用的安装命令的真实共享产物。

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.
  • 你已处于托管库工作区内。
  • 该库已通过完整性检查。
  • npx ai-agent-skills build-docs
    已执行完毕,或者你在发布前先运行该命令。

Workflow

工作流程

  1. Regenerate docs if needed.
bash
npx ai-agent-skills build-docs
  1. 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
  1. 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
  1. 若需要则重新生成文档。
bash
npx ai-agent-skills build-docs
  1. 将工作区发布到GitHub。
bash
git init
git add .
git commit -m "Initialize skills library"
gh repo create <owner>/<repo> --public --source=. --remote=origin --push
  1. 返回可直接分享的精确安装命令。
如果库包含
starter-pack
集合:
bash
npx ai-agent-skills install <owner>/<repo> --collection starter-pack -p
否则:
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.
  • 不要停留在
    git init
    步骤。只有当仓库创建完成且安装命令就绪时,共享库才算完成共享。
  • 如果仓库已存在,请连接现有远程仓库并推送,不要创建重复仓库。
  • 当存在精心整理的入门包时,优先使用集合安装命令。
  • 返回你使用的实际仓库坐标,不要使用占位符。

Done

完成

Return:
  • the repo URL
  • whether you shared a collection or the whole library
  • the exact install command to hand to teammates
返回:
  • 仓库URL
  • 你分享的是集合还是整个库
  • 可交付给团队成员的精确安装命令