使用说明
现成的(ots)
现成的Claude Code资产的共享注册表。直接从您的终端浏览、搜索和安装代理、技能、CLAUDE.md模板、钩子和MCP配置。
快速开始
# Install ots
curl -fsSL https://raw.githubusercontent.com/XeldarAlz/off-the-shelf/main/install.sh | bash
# Browse assets interactively
ots
# Or install directly
ots install skills/quick-commit
分类
| 类别 | 路径 | 描述 |
|---|---|---|
| 代理商 | agents/ |
代理提示和配置 |
| 技能 | skills/ |
自定义斜线命令技能(.claude/commands/) |
| CLAUDE.md | claude-md/ |
项目模板文件 |
| 钩子 | hooks/ |
Claude Code的钩子配置 |
| MCP配置 | mcp-configs/ |
MCP服务器配置 |
命令参考
| 命令 | 描述 | 示例 |
|---|---|---|
ots / ots browse |
交互式fzf浏览器 | ots |
ots list [category] |
列出类别或项目 | ots list skills |
ots search <query> |
搜索所有类别 | ots search "review" |
ots info <cat/item> |
显示项目详细信息 | ots info agents/code-reviewer |
ots install <cat/item> |
将项目安装到当前目录 | ots install skills/quick-commit |
ots install <cat/item> --dry-run |
无需写入即可预览安装 | ots install agents/reviewer --dry-run |
ots uninstall <cat/item> |
删除以前安装的项目 | ots uninstall skills/quick-commit |
ots config |
配置注册表设置 | ots config |
ots update |
清除缓存并刷新 | ots update |
ots self-update |
将ots更新到最新版本 | ots self-update |
ots init [dir] |
创建新的注册表仓库结构 | ots init ./my-registry |
ots help |
显示帮助 | ots help |
ots version |
显示版本 | ots version |
命令别名
| 完整 | 别名 |
|---|---|
browse |
b |
list |
ls, l |
search |
s |
info |
i |
install |
in |
uninstall |
rm |
config |
cfg |
update |
u |
self-update |
selfupdate |
认证
对于私有注册表或为了避免GitHub API速率限制,请设置 GITHUB_TOKEN:
# Option 1: Export in your shell profile
export GITHUB_TOKEN="ghp_your_token_here"
# Option 2: Set per-command
GITHUB_TOKEN="ghp_..." ots browse
令牌需要 repo 私有存储库的范围,或者公共存储库根本没有范围(只是增加了速率限制)。
清单架构
每个注册表项都是一个目录,其中包含 manifest.json 以及一个或多个有效载荷文件。
{
"name": "Human-readable name",
"description": "What this item does",
"author": "github-username",
"tags": ["tag1", "tag2"],
"install": {
"source-file.md": ".claude/commands/target.md"
},
"postInstall": "Optional message shown after install"
}
| 字段 | 必填 | 描述 |
|---|---|---|
name |
是 | 显示名称 |
description |
是 | 简短描述 |
author |
是 | 作者的GitHub用户名 |
tags |
否 | 搜索标签数组 |
install |
是 | 地图 source -> destination 路径 |
postInstall |
否 | 安装后显示消息 |
这 install map定义了源文件(相对于项目目录)及其目标(相对于项目根目录)。在目的地前添加前缀 ~ 对于相对于的路径 $HOME.
需求
curl,jq,fzf- macOS或Linux(bash 3.2+)
- 可选:
GITHUB_TOKEN用于私人repos