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

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions CLAUDE.md; installed under .agents/ (shared by several agents).

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { appendPreCommitBlock, appendLearningsBlock } from '../pre-commit-block.js';.

Good fit 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.

Compare 6 skills from other repositories ↓
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,309 stars · on GitHub · trycaliber.ai

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

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

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for writers-pattern

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Rogue Agent · line 80
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
How audits are shown
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.1 $0.00111 $0.03775
Opus 5.5 $0.00044 $0.01510
Sonnet 5.5 $0.00022 $0.00755
Haiku 4.5 $0.00011 $0.00378

Measured 1mo ago against content hash ea18f96e4f9e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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,309 stars, last pushed 29d ago), licensed MIT. It adds 111 tokens to every session and 3,775 once invoked, about $0.0004 per session on Opus 5.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

web-access

A method for handling difficult web tasks across search, page fetching, and a real browser. It covers sites that need login sessions, dynamic pages, anti-bot handling, or exploration before their structure is understood.

open-octo/octo-agent · 139 tokens

skill-creator

A skill for creating or improving reusable instructions for an agent. It covers capturing the intended workflow, writing a draft, testing it, and refining its trigger description.

open-octo/octo-agent · 123 tokens

packing-list

A travel-packing aid that builds a checklist from the destination's climate, trip type, length, transport, accommodation, and travelling group. It treats a city break, hike, business trip, and family holiday as different packing problems.

open-octo/octo-agent · 105 tokens

repo

Repository operating rules for verified Mythos edits.

thewaltero/mythos-router · 11 tokens

atomic-tdd

Test-first discipline. Auto-triggers on "let's implement X", "add feature Y", "fix bug Z", "write a test for", "implement", "build out", and similar pre-code-change phrases. Iron rule: failing test exists before production code. Skip only for pure docs/config changes with an explicit "skipped because:" note. Explicit…

damusix/atomic-claude · 142 tokens

ralphctl-idea-refinement

Ideation skill — refine a raw, unshaped idea into a sharp, buildable concept through divergent expansion (variation lenses like inversion, simplification, audience shift) followed by convergent stress-testing (user value, feasibility, differentiation), ending in a one-pager with explicit assumptions and a "Not Doing"…

lukas-grigis/ralphctl · 121 tokens