Agent skill · AI & Agents

writers-pattern

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.

caliber-ai-org1,235★ · 1 repos on radarProfile →
claude-codecodexcursorMIT
Install
npx skills add caliber-ai-org/ai-setup --skill writers-pattern --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 15 KB
Bundled scripts: none
Path: skills/writers-pattern/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 1,235
Language: TypeScript

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Platform Writer Pattern ## Critical - **Every writer MUST**: 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`) - **Integration point**: Every writer MUST be imported and called in `src/writers/index.ts` within the `writeSetup()` function. Missing this step means the writer will never execute. - **Validation before Step 1**: Verify the platform name is unique (`ls src/writers/` shows no `<platform>/index.ts`). If it exists, you are modifying, not adding. ## Instructions ### Step 1: Define the Platform Config Interface 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 descr

What's inside
Steps it walks through
  1. Critical
  2. Instructions
  3. Step 1: Define the Platform Config Interface
  4. Step 2: Implement the Writer Export Function
  5. Step 3: Add Type Exports (if complex interface)
  6. Step 4: Import and Register in src/writers/index.ts
  7. Step 5: Add Tests
  8. Step 6: Update detectSyncedAgents() in src/commands/refresh.ts (Optional)
  9. Examples
  10. Example 1: Add a hypothetical "DevCode" platform writer
  11. Common Issues
More from ai-setup
All skills →
About this skill
What does the writers-pattern skill do?

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.

How do I install it?

Run `npx skills add caliber-ai-org/ai-setup --skill writers-pattern --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From caliber-ai-org/ai-setup, a repository with 1,235 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going