技能库
- 作者仓库星标 236
- 作者仓库 armory
- 领域
- 人工智能
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @Mathews-Tom · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 命令执行
- 网络行为
- 允许外网请求
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
# Package Library
Agent-native catalog and installer for all armory package types. Provides browsing, searching, installing, updating, syncing, and removing packages directly within an agent session.
## Variables
- **ARMORY_REPO**: `Mathews-Tom/armory`
- **ARMORY_BRANCH**: `main`
- **ARMORY_CATALOG_URL**: `https://raw.githubusercontent.com/{ARMORY_REPO}/{ARMORY_BRANCH}/manifest.yaml`
- **DEFAULT_INSTALL_DIR**: `~/.claude/`
- **CATALOG_CACHE_PATH**: `/tmp/armory-manifest.yaml`
- **CATALOG_CACHE_TTL**: `600` (seconds)
## Supported Package Types
| Type | Install Target | Method |
| ------- | ---------------------- | --------------- |
| skill | `~/.claude/skills/` | Copy directory |
| agent | `~/.claude/agents/` | Copy directory |
| hook | `~/.claude/hooks/` | Copy directory |
| rule | `~/.claude/rules/` | Body-only file |
| command | `~/.claude/commands/` | Body-only file |
| utility | `~/.claude/utilities/` | Copy + chmod +x |
| preset | `~/.claude/presets/` | Copy directory |
## Command Reference
| Command | Cookbook | Purpose |
| ----------------------------------- | ---------------------- | ------------------------------------------------------------------------ |
| `/library list` | `cookbook/list.md` | Show all packages with type, version, installed status, update available |
| `/library list --type <type>` | `cookbook/list.md` | Filter listing by package type (skill, agent, hook, rule, etc.) |
| `/library use <name>` | `cookbook/use.md` | Pull a package from armory (auto-detects type from manifest) |
| `/library search <keyword>` | `cookbook/search.md` | Keyword search across all package types, names, and descriptions |
| `/library search --category <name>` | `cookbook/search.md` | Filter search by category (development, review, security, etc.) |
| `/library sync` | `cookbook/sync.md` | Re-pull all installed packages that have updates |
| `/library info <name>` | `cookbook/info.md` | Show full detail for a package (type, version, tags, category) |
| `/library update` | `cookbook/update.md` | Check all installed packages for version bumps (dry-run sync) |
| `/library remove <name>` | `cookbook/remove.md` | Remove an installed package |
| `/library profiles` | `cookbook/profiles.md` | Show available install profiles with package counts |
## Cookbook Dispatch
User commands are routed to the corresponding cookbook file based on the subcommand. When a `/library` command is received, extract the subcommand (the first token after `/library`) and load the matching cookbook file from the `cookbook/` directory relative to this skill. The cookbook file contains the full execution procedure for that operation.
For example, `/library use commit-standards` dispatches to `cookbook/use.md` with `commit-standards` as the package name argument. `/library list --type agent` dispatches to `cookbook/list.md` with `--type agent` as the filter.
If the subcommand does not match any known cookbook, report the error and list the valid subcommands from the table above.
## Type Detection
When `/library use <name>` is called, determine the package type by searching all sections of the manifest (`packages.skills`, `packages.agents`, `packages.hooks`, etc.). The first section containing a matching `name` entry determines the type. Use the type to:
1. Resolve the correct source path: `{type_dir}/{name}/`
2. Determine the install target: `~/.claude/{install_subdir}/`
3. Choose the install method: directory copy or body-only extraction
## Behavioral Notes
- All bash operations must use absolute paths. Never `cd` into temp dirs.
- Fetch uses a 3-tier fallback chain: sparse checkout, then `gh api`, then `curl`. Attempt each in order; proceed to the next only on failure.
- Cache lives in `/tmp/` with a 10-minute TTL. A missing cache file is treated as expired (triggers a re-fetch), not as an error.
- The catalog is read from `manifest.yaml` on GitHub (at `ARMORY_CATALOG_URL`), not from a separate catalog file. This is the same manifest format used by the armory repository.
- All package type sections share the same entry format: `name`, `version`, `description`, `path`, `source`, plus optional `tags`, `category`, `difficulty`.
章节与文件索引
按说明文件中的顺序排列。
变量
支持的封装类型
命令参考
食谱派遣
类型检测
文件/命令 -> Mathews-Tom/armory · main · https://raw.githubusercontent.com/{ARMORY_REPO}/{ARMORY_BRANCH}/manifest.yaml · ~/.claude/ · /tmp/armory-manifest.yaml · 600 · ~/.claude/skills/ · ~/.claude/agents/
内容校验值 -> 3d9108808b53
当前原文的自动摘译,尚未人工审校。
支持的封装类型
类型·安装目标·方法技巧·
~/.claude/skills/·复制目录代理·~/.claude/agents/·复制目录挂钩·~/.claude/hooks/·复制目录规则·~/.claude/rules/·仅正文文件命令参考
命令 · 食谱 · 目的
/library list·cookbook/list.md· 显示所有包的类型、版本、安装状态、可用更新/library list --type <type>·cookbook/list.md· 按包类型过滤列表(技能、代理、钩子、规则等)/library use <name>·cookbook/use.md· 从军械库中提取包(从清单中自动检测类型)/library search <keyword>·cookbook/search.md· 跨所有包类型、名称和描述进行关键字搜索食谱派遣
用户命令根据子命令路由到相应的说明书文件。当收到
/library命令时,提取子命令(/library之后的第一个标记)并从与该技能相关的cookbook/目录中加载匹配的食谱文件。说明书文件包含该操作的完整执行过程。例如,/library use commit-standards分派到cookbook/use.md,并以commit-standards作为包名称参数。/library list --type agent分派到cookbook/list.md,并以--type agent作为过滤器。类型检测
当调用
/library use <name>时,通过搜索清单的所有部分(packages.skills,packages.agents,packages.hooks等)来确定包类型。包含匹配的name条目的第一部分确定类型。使用该类型可以: 解析正确的源路径:{type_dir}/{name}/确定安装目标:~/.claude/{install_subdir}/选择安装方法:目录复制或仅正文提取