Skills

Setup Caliber

Sets up Caliber for automatic AI agent context sync.

Install

npx skills add caliber-ai-org/ai-setup --skill setup-caliber -g -a claude-code -y
Category
AI and agents
Updated
1mo ago
License
MIT
Context cost
Mediumabout 1,862 tokens
Runs scripts
No, instructions only

What it does

Sets up Caliber for automatic AI agent context sync. Installs pre-commit hooks so CLAUDE.md, Cursor rules, and Copilot instructions update automatically on every commit. Use when Caliber hooks are not yet installed or when the user asks about keeping agent configs in sync.

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/caliber
    

    Set 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.

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}"
Read the whole SKILL.md on GitHub

More in AI and agents