Agent安装
- 作者仓库星标 0
- 作者更新于 实时读取
- 作者仓库 skills-registry
- 领域
- AI 智能
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 需要 · OpenAI / Anthropic / GitHub
- 兼容的系统
- Linux
- 底层运行要求
- Node.js >=20
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- 网络行为
- 允许外网请求
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: setup-caliber
description: Sets up Caliber for automatic AI agent context sync. Installs pre-commit hooks so CLAUDE.md, Cur…
category: AI 智能
runtime: Node.js
---
# setup-caliber 输出预览
## PART A: 任务判断
- 适用问题:提示词、Agent 工作流、模型评估或自动化推理。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Instructions / Step 1: Check if Caliber is installed / Step 2: Check if pre-commit hook is installed”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于提示词、Agent 工作流、模型评估或自动化推理,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Instructions / Step 1: Check if Caliber is installed / Step 2: Check if pre-commit hook is installed”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、会按任务需要访问外部网络、需要准备 OpenAI / Anthropic / GitHub API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件;会按任务需要访问外部网络;需要准备 OpenAI / Anthropic / GitHub API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/setup-caliber` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件。
先用一个小任务确认它会围绕“Instructions / Step 1: Check if Caliber is installed / Step 2: Check if pre-commit hook is installed”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: setup-caliber
description: Sets up Caliber for automatic AI agent context sync. Installs pre-commit hooks so CLAUDE.md, Cur…
category: AI 智能
source: tomevault-io/skills-registry
---
# setup-caliber
## 什么时候使用
- 把 AI / Agent方向的常用动作沉淀成 Agent 可调用的技能 适合处理AI Agent、提示词、模型评估与自动化推理,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查…
- 面向提示词、Agent 工作流、模型评估或自动化推理,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Instructions / Step 1: Check if Caliber is installed / Step 2: Check if pre-commit hook is installed」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件;会按任务需要访问外部网络;需要准备 OpenAI / Anthropic / GitHub API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "setup-caliber" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Instructions / Step 1: Check if Caliber is installed / Step 2: Check if pre-commit hook is installed
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> Node.js | 读取文件、写入/修改文件 | 会按任务需要访问外部网络
安全层 -> 需要准备 OpenAI / Anthropic / GitHub API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Setup Caliber
Dynamic onboarding for Caliber — automatic AI agent context sync. Run all diagnostic steps below on every invocation to determine what's already set up and what still needs to be done.
Instructions
Run these checks in order. For each step, check the current state first, then only act if something is missing.
Step 1: Check if Caliber is installed
command -v caliber >/dev/null 2>&1 && caliber --version || echo "NOT_INSTALLED"
If a version prints → Caliber is installed globally. Set
CALIBER="caliber"and move to Step 2.If NOT_INSTALLED → Install it globally (faster for daily use since the pre-commit hook runs on every commit):
npm install -g @rely-ai/caliberSet
CALIBER="caliber".If npm fails (permissions, no sudo, etc.), fall back to npx:
npx @rely-ai/caliber --version 2>/dev/null || echo "NO_NODE"- If npx works → Set
CALIBER="npx @rely-ai/caliber". This works but adds ~500ms per invocation. - If NO_NODE → Tell the user: "Caliber requires Node.js >= 20. Install Node first, then run /setup-caliber again." Stop here.
- If npx works → Set
Step 2: Check if pre-commit hook is installed
grep -q "caliber" .git/hooks/pre-commit 2>/dev/null && echo "HOOK_ACTIVE" || echo "NO_HOOK"
- If HOOK_ACTIVE → Tell the user: "Pre-commit hook is active — configs sync on every commit." Move to Step 3.
- If NO_HOOK → Tell the user: "I'll install the pre-commit hook so your agent configs sync automatically on every commit."
$CALIBER hooks --install
Step 3: Detect agents and check if configs exist
First, detect which coding agents are configured in this project:
AGENTS=""
[ -d .claude ] && AGENTS="claude"
[ -d .cursor ] && AGENTS="${AGENTS:+$AGENTS,}cursor"
[ -d .agents ] || [ -f AGENTS.md ] && AGENTS="${AGENTS:+$AGENTS,}codex"
[ -f .github/copilot-instructions.md ] && AGENTS="${AGENTS:+$AGENTS,}github-copilot"
echo "DETECTED_AGENTS=${AGENTS:-none}"
If no agents are detected, ask the user which coding agents they use (Claude Code, Cursor, Codex, GitHub Copilot). Build the agent list from their answer as a comma-separated string (e.g. "claude,cursor").
Then check if agent configs exist:
echo "CLAUDE_MD=$([ -f CLAUDE.md ] && echo exists || echo missing)"
echo "CURSOR_RULES=$([ -d .cursor/rules ] && ls .cursor/rules/*.mdc 2>/dev/null | wc -l | tr -d ' ' || echo 0)"
echo "AGENTS_MD=$([ -f AGENTS.md ] && echo exists || echo missing)"
echo "COPILOT=$([ -f .github/copilot-instructions.md ] && echo exists || echo missing)"
- If configs exist for the detected agents → Tell the user which configs are present. Move to Step 4.
- If configs are missing → Tell the user: "No agent configs found. I'll generate them now."
Use the detected or user-selected agent list:
For example:$CALIBER init --auto-approve --agent <comma-separated-agents>$CALIBER init --auto-approve --agent claude,cursorThis generates CLAUDE.md, Cursor rules, AGENTS.md, skills, and sync infrastructure for the specified agents.
Step 4: Check if configs are fresh
$CALIBER score --json --quiet 2>/dev/null | head -1
- If score is 80+ → Tell the user: "Your configs are in good shape (score: X/100)."
- If score is below 80 → Tell the user: "Your configs could be improved (score: X/100). Want me to run a refresh?"
If yes:
$CALIBER refresh
Step 5: Ask about team setup
Ask the user: "Are you setting up for yourself only, or for your team too?"
If solo → Continue with solo setup:
Check if session learning is enabled:
$CALIBER learn status 2>/dev/null | head -3- If learning is already enabled → note it in the summary.
- If not enabled → ask the user: "Caliber can learn from your coding sessions — when you correct a mistake or fix a pattern, it remembers for next time. Enable session learning?"
If yes:
$CALIBER learn install
Then tell the user: "You're all set! Here's what happens next:
- Every time you commit, Caliber syncs your agent configs automatically
- Your CLAUDE.md, Cursor rules, and AGENTS.md stay current with your code
- Run
$CALIBER skillsanytime to discover community skills for your stack"
Then show the summary (see below) and stop.
If team → Check if the GitHub Action already exists:
[ -f .github/workflows/caliber-sync.yml ] && echo "ACTION_EXISTS" || echo "NO_ACTION"If ACTION_EXISTS → Tell the user: "GitHub Action is already configured."
If NO_ACTION → Tell the user: "I'll create a GitHub Action that syncs configs nightly and on every PR." Write this file to
.github/workflows/caliber-sync.yml:name: Caliber Sync on: schedule: - cron: '0 3 * * 1-5' pull_request: types: [opened, synchronize] workflow_dispatch: jobs: sync: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: caliber-ai-org/ai-setup@v1 with: mode: sync auto-refresh: true comment: true github-token: ${{ secrets.GITHUB_TOKEN }} env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}Now determine which LLM provider the team uses. Check the local Caliber config:
$CALIBER config --show 2>/dev/null || echo "NO_CONFIG"Based on the provider, the GitHub Action needs the corresponding secret:
- anthropic →
ANTHROPIC_API_KEY - openai →
OPENAI_API_KEY - vertex →
VERTEX_PROJECT_IDandGOOGLE_APPLICATION_CREDENTIALS(service account JSON)
Update the workflow env block to match the provider. For example, if using OpenAI:
env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}Then check if the
ghCLI is available to set the secret:command -v gh >/dev/null 2>&1 && echo "GH_AVAILABLE" || echo "NO_GH"- If GH_AVAILABLE → Ask the user for their API key and set it:
(This prompts for the value securely via stdin)gh secret set ANTHROPIC_API_KEY - If NO_GH → Tell the user exactly what to do: "Go to your repo on GitHub → Settings → Secrets and variables → Actions → New repository secret. Name: ANTHROPIC_API_KEY (or OPENAI_API_KEY depending on provider) Value: your API key"
Finally, offer to commit and push the workflow file:
git add .github/workflows/caliber-sync.yml git commit -m "feat: add Caliber sync GitHub Action" git push- anthropic →
Summary
After completing all steps, show the user what's configured:
Caliber Setup Complete:
✓ Caliber installed (vX.X.X)
✓ Pre-commit hook — configs sync on every commit
✓ Agent configs — CLAUDE.md, Cursor rules, AGENTS.md
✓ Config score: X/100
✓ GitHub Action — nightly sync + PR checks (team only)
From now on, every commit keeps all your agent configs in sync automatically.
When to trigger
- When a developer first opens this project
- When the user asks about keeping agent configs up to date
- When the user asks "how do I set up Caliber" or "what is Caliber"
- When the user sees a message saying "Run /setup-caliber to get set up"
When NOT to trigger
- The user is in the middle of time-sensitive work
Source: caliber-ai-org/ai-setup — distributed by TomeVault.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核