adding-a-command
Creates a new CLI command following the Commander.js pattern in src/commands/. Handles…
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.
$ npx -y skills add caliber-ai-org/ai-setup --skill setup-caliber --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/setup-caliberContext preview
The summary Claude sees to decide when to auto-load this skill.
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.
name: setup-caliber description: 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.
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.
Run these checks in order. For each step, check the current state first, then only act if something is missing.
command -v caliber >/dev/null 2>&1 && caliber --version || echo "NOT_INSTALLED"
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"
grep -q "caliber" .git/hooks/pre-commit 2>/dev/null && echo "HOOK_ACTIVE" || echo "NO_HOOK"
$CALIBER hooks --install
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)"
Use the detected or user-selected agent list:
$CALIBER init --auto-approve --agent <comma-separated-agents>
For example: `$CALIBER init --auto-approve --agent claude,cursor` This generates CLAUDE.md, Cursor rules, AGENTS.md, skills, and sync infrastructure for the specified agents.
$CALIBER score --json --quiet 2>/dev/null | head -1
If yes:
$CALIBER refresh
Ask the user: "Are you setting up for yourself only, or for your team too?"
Check if session learning is enabled:
$CALIBER learn status 2>/dev/null | head -3
If yes:
$CALIBER learn install
Then tell the user: "You're all set! Here's what happens next:
Then show the summary (see below) and stop.
[ -f .github/workflows/caliber-sync.yml ] && echo "ACTION_EXISTS" || echo "NO_ACTION"
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:
Continuously sync your AI setups with one command. Codebase tailor suited agent skills, MCPs and config files for Claude Code, Cursor, and Codex.
Repo: caliber-ai-org/ai-setup
Creates a new CLI command following the Commander.js pattern in src/commands/. Handles…
Writes Vitest tests following project patterns: __tests__/ directories, vi.mock() for module…
Discovers and installs community skills from the public registry. Use when the user mentions…
Adds a new LLM provider implementing LLMProvider interface with call() and stream() methods.…
Saves user instructions as persistent learnings for future sessions. Use when the user says…
Add a new deterministic scoring check in src/scoring/checks/ that evaluates config quality.…