writers-pattern

writers-pattern is a skill for Claude Code, Codex from caliber-ai-org/ai-setup. It costs 111 tokens per session (3,775 once invoked), scanned A, original, MIT.

A pattern for adding a writer module that generates configuration files for a supported coding platform. A writer creates the required folders and files, formats them correctly, and reports which files it wrote.

In plain words
What is it for?
Use it when implementing a new platform writer under src/writers/, including its configuration interface, generated rules or skills, and integration with the main setup function.
Why use it?
It provides consistent rules for extending the project to another platform. It also prevents a writer from being added without connecting it to the setup process.

Skill for Claude CodeCodex

About the project

Caliber is a tool that generates and continuously updates AI context and configuration files for software repositories, including CLAUDE.md, AGENTS.md, and platform-specific rules. Development teams use it to keep coding agents aligned with the current codebase across tools such as Claude Code, Cursor, Codex, OpenCode, and GitHub Copilot. Its catalogue entries include skills, hooks, rules, instructions, and settings for configuring that workflow.

caliber-ai-org/ai-setup · 1,259 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/caliber-ai-org/ai-setup/writers-pattern
Any agent
npx skills add caliber-ai-org/ai-setup --skill writers-pattern
Clone the repo
git clone --depth 1 https://github.com/caliber-ai-org/ai-setup

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for writers-pattern

README.md
[![agentmods](https://agentmods.dev/badge/skills/caliber-ai-org/ai-setup/writers-pattern.svg)](https://agentmods.dev/skills/caliber-ai-org/ai-setup/writers-pattern)
Your own site
<a href="https://agentmods.dev/skills/caliber-ai-org/ai-setup/writers-pattern"><img src="https://agentmods.dev/badge/skills/caliber-ai-org/ai-setup/writers-pattern.svg" alt="Measured on agentmods" height="20"></a>
Per session 111 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,775 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00111 $0.03775
Opus 5 $0.00056 $0.01887
Sonnet 5 $0.00022 $0.00755
Haiku 4.5 $0.00011 $0.00378

Measured 5d ago against content hash ea18f96e4f9e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

writers-pattern scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/writers-pattern/SKILL.md · 268 lines

How it starts

The opening of the file, as written. The whole thing — 268 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 describes all content the writer accepts. The interface MUST include:

  • A main markdown/text file (e.g., claudeMd, cursorrules, agentsMd, instructions)
  • Optional nested arrays: rules, skills, mcpServers, instructionFiles, etc.
  • Each rule/skill/file has at minimum: name or filename, content, and for skills, description

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.

Read the full file on GitHub · 268 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 268 lines · 111 tokens per session scan A ea18f96e4f9e

Subscribe to this mod's changes

writers-pattern is a skill published in the GitHub repository caliber-ai-org/ai-setup (1,259 stars, last pushed 1mo ago), licensed MIT. It adds 111 tokens to every session and 3,775 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

bridge

Use when the user wants hyperflow's behavioral rules to apply outside the terminal CLI — in Claude Code Desktop, claude.ai web, or IDE extensions that don't load CLI plugins. Writes a managed doctrine block into the project's CLAUDE.md so autonomy + intent-routing + commit cadence + role separation + file-first rules…

jeremylongshore/tons-of-skills-marketplace · 126 tokens

prompt-optimization

Use this skill when the user wants to optimize, modify, or improve the system prompt of an AI agent. This includes requests like 'optimize the prompt', 'make the AI more focused on X', 'change the system prompt', 'improve the agent behavior', or 'modify how the AI responds'.

wecode-ai/Wegent · 62 tokens

fable-method

A step-by-step problem-solving loop (classify the ask, define done, gather evidence, decide, act surgically, verify by observation, report outcome-first). Use when the user says "/fable-method", "use the fable method", or "approach this like Fable", or proactively when starting any multi-step task that no…

Sahir619/fable-method · 105 tokens

fable-domain

Discuss a domain with the user, research it from real sources, then generate a trusted skill bundle for it - a step-by-step workflow with a flowchart, a domain adapter, a trap fixture, and a smoke eval. Use when the user says "/fable-domain ", "make a skill for ", "add a domain to the fable method", or "give a lesser…

Sahir619/fable-method · 115 tokens

Cursor Skill (.mdc) Authoring

Author effective Cursor rules in .cursor/rules/.mdc - YAML frontmatter (description, globs, alwaysApply), the four rule types, scoped QA rules, subagents, and structure that actually steers the model.

PramodDutta/qaskills · 55 tokens

fable-judge

Adversarial verification of finished work. Treats any "done" as a set of claims, then re-runs the claimed verifications, diffs what actually changed, detects weakened tests and false completion claims, and delivers an evidence-based verdict (VERIFIED / VERIFIED WITH CAVEATS / REFUTED). Use after any agent or model…

Sahir619/fable-method · 125 tokens