adding-a-command
Creates a new CLI command following the Commander.js pattern in src/commands/. Handles command registration in src/cli.ts,…
Add a new platform writer module in src/writers/ that generates and writes agent config files for a supported platform. Each writer exports a function that accepts a config interface, creates directories (rules/, skills/, mcp configs), writes files with proper formatting and
Claude Code
$ npx -y skills add caliber-ai-org/ai-setup --skill writers-pattern --agent claude-code
Codex
$ npx skills add caliber-ai-org/ai-setup --skill writers-pattern -a codex -y
Cursor
$ npx skills add caliber-ai-org/ai-setup --skill writers-pattern -a cursor -y
Gemini CLI
$ npx skills add caliber-ai-org/ai-setup --skill writers-pattern -a gemini-cli -y
GitHub Copilot
$ npx skills add caliber-ai-org/ai-setup --skill writers-pattern -a github-copilot -y
OpenCode
$ npx skills add caliber-ai-org/ai-setup --skill writers-pattern -a opencode -y
Windsurf
$ npx skills add caliber-ai-org/ai-setup --skill writers-pattern -a windsurf -y
name: writers-pattern description: Add a new platform writer module in src/writers/ that generates and writes agent config files for a supported platform. Each writer exports a function that accepts a config interface, creates directories (rules/, skills/, mcp configs), writes files with proper formatting and frontmatter, and returns string[] of written file paths. Use when adding platform support for a new agent, integrating a new code AI tool, or extending caliber to support new targets. Do NOT use for modifying existing writers, refactoring scoring logic, or changing how writers are invoked. paths: - src/writers/*/index.ts - src/writers/__tests__/*.test.ts - src/writers/index.ts
1. Export a single named function: `write<Platform>Config(config: <PlatformConfig>): string[]` 2. Accept a platform-specific config interface defining what content to write 3. Return `string[]` of all written file paths (used by manifest and progress display) 4. Create parent directories with `fs.mkdirSync(dir, { recursive: true })` before writing files 5. Wrap skill frontmatter exactly as shown in Step 4 (YAML between `---` markers) 6. NOT modify files outside the intended platform directories (e.g., Claude writer only touches `.claude/`, `CLAUDE.md`, `.mcp.json`)
Verify the platform name is unique (see Critical). Create `src/writers/<platform>/index.ts`.
At the top of the file, define a config interface that describes all content the writer accepts. The interface MUST include:
Example (matching GitHub Copilot pattern already in codebase):
interface CopilotConfig {
instructions: string; // Main content
instructionFiles?: Array<{ filename: string; content: string }>;
}**Validation**: Confirm the interface property names match platform conventions (e.g., Claude uses `claudeMd`, Cursor uses `cursorrules`). Check existing writers: `src/writers/claude/index.ts` line 9, `src/writers/cursor/index.ts` line 9, `src/writers/codex/index.ts` line 5.
Export a function named `write<Platform>Config(config: <PlatformConfig>): string[]` that:
1. Initialize an empty `written: string[] = []` array to track all written paths. 2. For the **main config file** (e.g., `CLAUDE.md` for Claude, `.cursorrules` for Cursor):
3. For **rules** (if applicable): Platform convention determines directory.
const preCommitRule = getCursorPreCommitRule();
const learningsRule = getCursorLearningsRule();
const syncRule = getCursorSyncRule();
const allRules = [...(config.rules || []), preCommitRule, learningsRule, syncRule];4. For **skills**: Write with YAML frontmatter.
---
name: <skill.name>
description: <skill.description>
paths:
- <optional path pattern 1>
- <optional path pattern 2>
---
<skill.content>5. For **MCP Servers** (if applicable): Write/merge JSON at platform-specific path.
Continuously sync your AI setups with one command. Codebase tailor suited agent skills, MCPs and config files for Claude Code, Cursor, and Codex.
Creates a new CLI command following the Commander.js pattern in src/commands/. Handles command registration in src/cli.ts,…
Writes Vitest tests following project patterns: __tests__/ directories, vi.mock() for module mocking with vi.hoisted() for…
Discovers and installs community skills from the public registry. Use when the user mentions a technology, framework, or task…
Adds a new LLM provider implementing LLMProvider interface with call() and stream() methods. Integrates with provider factory in…
Saves user instructions as persistent learnings for future sessions. Use when the user says 'remember this', 'always do X', 'from…
Add a new deterministic scoring check in src/scoring/checks/ that evaluates config quality. Follows the Check[] return pattern,…
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
Design and build AI agents for any domain. Use when users: (1) ask to "create an agent", "build an assistant", or "design an AI…