adding-a-command
Creates a new CLI command following the Commander.js pattern in src/commands/. Handles…
Add a new deterministic scoring check in src/scoring/checks/ that evaluates config quality. Follows the Check[] return pattern, uses point constants from src/scoring/constants.ts, and integrates via filterChecksForTarget() in src/scoring/index.ts. Use when user says 'add scoring
$ npx -y skills add caliber-ai-org/ai-setup --skill scoring-checks --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/scoring-checksContext preview
The summary Claude sees to decide when to auto-load this skill.
Add a new deterministic scoring check in src/scoring/checks/ that evaluates config quality. Follows the Check[] return pattern, uses point constants from src/scoring/constants.ts, and integrates via filterChecksForTarget() in src/scoring/index.ts. Use when user says 'add scoring
name: scoring-checks description: Add a new deterministic scoring check in src/scoring/checks/ that evaluates config quality. Follows the Check[] return pattern, uses point constants from src/scoring/constants.ts, and integrates via filterChecksForTarget() in src/scoring/index.ts. Use when user says 'add scoring check', 'new check', 'modify scoring criteria', or works in src/scoring/checks/. Do NOT use for display changes or refactoring scoring logic. paths: - src/scoring/checks/**/*.ts - src/scoring/constants.ts - src/scoring/index.ts
Add a new deterministic check that evaluates a single aspect of AI agent config quality. All checks must be filesystem-based with no network calls or LLM inference.
Verify before proceeding: Is your check measurable with a numeric point value?
Add constants below the appropriate category section (existence, quality, grounding, accuracy, freshness, bonus):
// In the appropriate CATEGORY section, e.g., Quality checks (25 pts):
export const POINTS_YOUR_CHECK_NAME = 4; // 1-12 pts typical
// If threshold-based, add a companion array:
export const YOUR_THRESHOLD_ARRAY = [
{ minValue: 10, points: 4 },
{ minValue: 5, points: 2 },
] as const;Check existing patterns: Token budgets use `TOKEN_BUDGET_THRESHOLDS`, code blocks use `CODE_BLOCK_THRESHOLDS`, concreteness uses `CONCRETENESS_THRESHOLDS`.
Verify: Review `CATEGORY_MAX` object to ensure your check fits within its category's point budget.
Choose the file based on category. Each file exports a `check<Name>(dir: string): Check[]` function:
Create the function following this structure:
import type { Check } from '../index.js';
import {
POINTS_YOUR_CHECK,
YOUR_THRESHOLD_ARRAY,
} from '../constants.js';
import { readFileOrNull } from '../utils.js'; // or other helpers
export function checkYourCategory(dir: string): Check[] {
const checks: Check[] = [];
// 1. Measure something concrete
const yourMetric = /* e.g., countFiles(), validatePaths(), etc. */;
const threshold = YOUR_THRESHOLD_ARRAY.find(t => yourMetric >= t.minValue);
const earnedPts = threshold?.points ?? 0;
checks.push({
id: 'your_unique_check_id',
name: 'Human-readable check name',
category: 'quality', // matches function context
maxPoints: POINTS_YOUR_CHECK,
earnedPoints: earnedPts,
passed: earnedPts >= Math.ceil(POINTS_YOUR_CHECK * 0.6), // or custom logic
detail: `${earnedPts}/${POINTS_YOUR_CHECK} points — ${yourMetric} items found`,
suggestion: earnedPts >= POINTS_YOUR_CHECK ? undefined : 'Action to improve',
fix: earnedPts >= POINTS_YOUR_CHECK ? undefined : {
action: 'verb_noun', // e.g., 'add_code_blocks', 'fix_references'
data: { currentValue: yourMetric, targetValue: 10 },
instruction: 'Specific, actionable guidance for the user.',
},
});
return checks;
}Verify ID uniqueness: Run `grep -r "'your_unique_check_id'" src/scoring/checks/` — should return only your new check.
If your check only applies to certain agents (Claude, Cursor, Codex, GitHub Copilot), register it in `src/scoring/constants.ts`:
// Add to the appropriate set: export const CLAUDE_ONLY_CHECKS = new Set([ 'claude_md_exists', 'your_new_check_id', // ← add here 'claude_rules_exist', ]);
Available sets (update exactly one if applicable):
Verify filtering: Examine `filterChecksForTarget()` in `src/scoring/index.ts` to ensure your category will work correctly for your target agents.
Import your function at the top:
import { checkYourCategory } from './checks/your-file.js';Add to `computeLocalScore()` inside the `allChecks` array initialization:
export function computeLocalScore(dir: string, targetAgent?: TargetA
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…
Sets up Caliber for automatic AI agent context sync. Installs pre-commit hooks so CLAUDE.md,…