claude-md-writer

claude-md-writer is a skill for Claude Code from serejaris/personal-corp-os. It costs 30 tokens per session (1,741 once invoked), scanned A, original, MIT.

A guide for creating or reorganizing `CLAUDE.md` files, which are instruction files that Claude Code reads while working in a project. It covers file size, rule priority, conditional rules, and how to organize documentation.

In plain words
What is it for?
Writing or refactoring `CLAUDE.md`, splitting rules into `.claude/rules/`, setting path-based instructions, and organizing project memory.
Why use it?
It helps keep always-loaded instructions short and focused while placing detailed rules where they apply. This makes project guidance easier for the coding agent to use and maintain.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Part of the personal-corp-os plugin — 33 skills shipped together

Good fit Writing or refactoring CLAUDE.md, splitting rules into .claude/rules/, setting path-based instructions, and organizing project memory.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/serejaris/personal-corp-os/claude-md-writer
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.

Any agent
npx skills add serejaris/personal-corp-os --skill claude-md-writer
Clone the repo
git clone --depth 1 https://github.com/serejaris/personal-corp-os

Made for: Claude Code.

Or install personal-corp-os, the plugin that ships this one along with the rest of its 33 skills.

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 claude-md-writer

README.md
[![agentmods](https://agentmods.dev/badge/skills/serejaris/personal-corp-os/claude-md-writer/github.svg)](https://agentmods.dev/skills/serejaris/personal-corp-os/claude-md-writer)
Your own site
<a href="https://agentmods.dev/skills/serejaris/personal-corp-os/claude-md-writer"><img src="https://agentmods.dev/badge/skills/serejaris/personal-corp-os/claude-md-writer/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 claude-md-writer

Your own site · 80×15
<a href="https://agentmods.dev/skills/serejaris/personal-corp-os/claude-md-writer"><img src="https://agentmods.dev/badge/skills/serejaris/personal-corp-os/claude-md-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,741 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 pass 7 Sept 2026
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.00030 $0.01741
Opus 5 $0.00015 $0.00870
Sonnet 5 $0.00006 $0.00348
Haiku 4.5 $0.00003 $0.00174

Measured 12d ago against content hash 42b8bf886347, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

claude-md-writer 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 12d 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.

skills/claude-md-writer/SKILL.md · 245 lines

How it starts

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

CLAUDE.md Writer

Creates and refactors CLAUDE.md files following official Anthropic best practices (2025).

Golden Rules

Rule Why
CLAUDE.md < 200 lines Loads on EVERY request, costs tokens
Rules files < 500 lines each Official recommendation per file
Critical rules FIRST Top = highest priority
Modular rules → .claude/rules/ Conditional loading, organized
Use paths: frontmatter Load rules only for matching files
No linting rules Use ESLint/Prettier/Biome instead
Pointers over copies Files change, references stay valid

Memory Hierarchy

Claude Code loads memory in this order (higher = higher priority):

Priority Type Location
Highest Enterprise /Library/Application Support/ClaudeCode/CLAUDE.md
Project ./CLAUDE.md or ./.claude/CLAUDE.md
Rules ./.claude/rules/*.md (conditional)
User ~/.claude/CLAUDE.md
Lowest Local ./CLAUDE.local.md (gitignored)

Use /memory command to see currently loaded files.

3-Tier Documentation System

Official recommendation for large projects:

Tier Location Loads Target
1. Foundation CLAUDE.md Always < 200 lines
2. Component .claude/rules/{component}/ When working in component < 500 lines
3. Feature Co-located with code When working on feature As needed

Example structure:

.claude/
├── CLAUDE.md                 # Tier 1: always loaded
└── rules/
    ├── database.md           # Tier 2: SQL, migrations
    ├── api.md                # Tier 2: API patterns
    └── frontend/             # Tier 2: subdirectory
        ├── components.md     # paths: src/**/*.tsx
        ├── layout.md         # paths: src/pages/**/*.tsx
        └── tokens.md         # paths: **/*.tsx

Structure Template

# Project Name

One-line description.

## Commands

- `npm run dev` - Development
- `npm run build` - Production
- `npm run test` - Tests

## Architecture

| Path | Purpose |
|------|---------|
| `lib/` | Core logic |
| `app/api/` | API routes |

## Key Patterns

**Pattern Name**: One-line explanation.

## Database (if applicable)

| Table | Key Fields |
|-------|------------|

## Modular Docs

See `.claude/rules/` for:
- `database.md` - queries, schema
- `deploy.md` - deployment

## Tech Stack

One line: Next.js 15, PostgreSQL, TypeScript

Read the full file on GitHub · 245 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago First seen · 245 lines · 30 tokens per session scan A 42b8bf886347

Subscribe to this mod's changes

claude-md-writer is a skill published in the GitHub repository serejaris/personal-corp-os (225 stars, last pushed 16d ago), licensed MIT. It adds 30 tokens to every session and 1,741 once invoked, about $0.0002 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

manuscript-review

Pre-publication manuscript audit producing a section-level refactoring report with citation hygiene and submission-readiness checks. Triggers on: "review my paper", "check before submission", "is this ready to submit", "pre-pub checklist", "refactor my paper", "check my references", "does the abstract work".

Mathews-Tom/armory · 70 tokens

figure-rhetoric

Evaluate whether figures and plots in a manuscript effectively communicate the claims they support. Audits chart-type fit, axis design, visual hierarchy, data density, caption interpretation, perceptual accuracy, and narrative arc across 8 dimensions. Triggers on: "do my figures work", "check my plots", "are my graphs…

Mathews-Tom/armory · 123 tokens

humanize

Detects and removes AI-generated writing patterns while preserving meaning and facts. Triggers on: "humanize text", "make this sound human", "remove AI patterns", "rewrite to sound natural", "make this less AI", "de-slop this", "not sound like ChatGPT", "human pass".

Mathews-Tom/armory · 66 tokens

manuscript-provenance

Computational provenance audit verifying every number, table, and figure in a manuscript derives from code, not manual entry. Triggers on: "check provenance", "verify reproducibility", "audit my pipeline", "are my numbers from code", "provenance audit". Companion to manuscript-review (prose audit).

Mathews-Tom/armory · 70 tokens

code-refiner

Deep code simplification and refactoring preserving behavior across Python, Go, TypeScript, Rust. Targets complexity, anti-patterns, readability debt. Triggers on: "simplify this code", "refactor for clarity", "reduce complexity", "make this more readable", "tech debt cleanup", "too much nesting".

Mathews-Tom/armory · 69 tokens

competitive-analyzer

Competitive landscape analysis: Porter's Five Forces, competitor discovery, feature/pricing matrices, positioning maps, moat assessment via WebSearch. Triggers on: "competitive analysis", "competitor comparison", "competitive landscape", "Porter's Five Forces", "market positioning", "moat assessment", "defensibility…

Mathews-Tom/armory · 68 tokens