Agent skill

Claude Md Writer

by serejaris in serejaris/personal-corp-os

A skill your agent uses when creating or refactoring CLAUDE.md files - enforces best practices for size, structure, and content organization

MITAuto-check passedAgent Workflows

Install Claude Md Writer

skills CLI
$ npx skills add serejaris/personal-corp-os --skill claude-md-writer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install serejaris/personal-corp-os claude-md-writer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/serejaris/personal-corp-os.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/claude-md-writer .claude/skills/claude-md-writer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
claude-md-writer
GitHub stars
229
Token cost
~1.6k tokens
SKILL.md length
481 words
Files
4 (incl. assets)
Skills in repo
36
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when creating or refactoring CLAUDE.md files - enforces best practices for size, structure, and content organization

  • Works in 5 steps: Run /init for base CLAUDE.md → Review and trim generated content → Identify critical rules — what breaks if… → …
  • Refactoring CLAUDE.md files - enforces best practices for size
  • SKILL.md covers Golden Rules, Memory Hierarchy, 3-Tier Documentation System and Structure Template, plus 10 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Claude Md Writer is an agent skill from serejaris/personal-corp-os. Use when creating or refactoring CLAUDE.md files - enforces best practices for size, structure, and content organization

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including assets (for example `README.md` and `README.ru.md`).

It sits in Agent Workflows, covering Agent instruction files and Refactoring. The repository describes itself as: Personal Corp OS — управление личной компанией через AI-агентов: задачи вне головы, отделы вместо памяти, недельное ретро. Открытые скиллы для Claude Code и Codex. The licence is MIT.

When your agent uses it

  • Refactoring CLAUDE.md files - enforces best practices for size
  • Content organization

Example prompts

  • “/claude-md-writer”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Run /init for base CLAUDE.md
  2. Review and trim generated content
  3. Identify critical rules — what breaks if ignored?
  4. Create .claude/rules/ for domain-specific docs
  5. Keep main file < 100 lines

What it can do on your machine

Read from SKILL.md and the folder at commit 95e36c3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown and yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Claude Md Writer loads about 1.6k tokens when it runs. Until then it costs about 34 tokens; SKILL.md has 481 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~34
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from serejaris/personal-corp-os at commit 95e36c3, republished under its MIT licence (© serejaris). 481 words, ~1,616 tokens.

Download SKILL.mdSave it as .claude/skills/claude-md-writer/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
claude-md-writer
description
Use when creating or refactoring CLAUDE.md files - enforces best practices for size, structure, and content organization

CLAUDE.md Writer

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

Golden Rules

RuleWhy
CLAUDE.md < 200 linesLoads on EVERY request, costs tokens
Rules files < 500 lines eachOfficial recommendation per file
Critical rules FIRSTTop = highest priority
Modular rules → .claude/rules/Conditional loading, organized
Use paths: frontmatterLoad rules only for matching files
No linting rulesUse ESLint/Prettier/Biome instead
Pointers over copiesFiles change, references stay valid

Memory Hierarchy

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

PriorityTypeLocation
HighestEnterprise/Library/Application Support/ClaudeCode/CLAUDE.md
↓Project./CLAUDE.md or ./.claude/CLAUDE.md
↓Rules./.claude/rules/*.md (conditional)
↓User~/.claude/CLAUDE.md
LowestLocal./CLAUDE.local.md (gitignored)

Use /memory command to see currently loaded files.

3-Tier Documentation System

Official recommendation for large projects:

TierLocationLoadsTarget
1. FoundationCLAUDE.mdAlways< 200 lines
2. Component.claude/rules/{component}/When working in component< 500 lines
3. FeatureCo-located with codeWhen working on featureAs 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

markdown
# 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

Conditional Rules (Path-Specific)

Use YAML frontmatter for file-type-specific rules:

markdown
---
paths: "src/api/**/*.ts"
---

# API Rules

- All endpoints must validate input
- Use standard error format
Glob Patterns
PatternMatches
**/*.tsAll .ts files anywhere
src/**/*All files under src/
*.mdMarkdown in project root
src/components/*.tsxComponents in specific dir
Combining Patterns
yaml
# Multiple extensions
paths: "src/**/*.{ts,tsx}"

# Multiple directories
paths: "{src,lib}/**/*.ts, tests/**/*.test.ts"

Note: Wrap patterns in quotes for YAML safety.

Rules with paths: only load when working with matching files → saves tokens.

Workflow: New Project

  1. Run /init for base CLAUDE.md
  2. Review and trim generated content
  3. Identify critical rules — what breaks if ignored?
  4. Create .claude/rules/ for domain-specific docs
  5. Keep main file < 100 lines

Workflow: Refactor Existing

  1. Count lines — if > 300, must split
  2. Find task-specific content — SQL, debugging, deploy → extract
  3. Create .claude/rules/:
    • database.md - queries, schema, connection
    • deploy.md - deployment process
    • messaging.md - integrations (Telegram, etc.)
  4. Use @file references — don't duplicate
  5. Keep in CLAUDE.md — only what applies to EVERY task
Show full SKILL.md (191 more words)Show less

What Goes Where

ContentLocation
Project descriptionCLAUDE.md
Critical constraintsCLAUDE.md (top!)
Quick start (3 commands)CLAUDE.md
Architecture overviewCLAUDE.md
Key patterns (1-liners)CLAUDE.md
SQL queries/schema.claude/rules/database.md
Deployment steps.claude/rules/deploy.md
API documentation.claude/rules/api.md
Git workflow.claude/rules/git.md
Personal preferencesCLAUDE.local.md (gitignored)
Code style rules.eslintrc / biome.json (NOT docs)

Import Syntax

Reference files instead of duplicating:

markdown
@README.md
@docs/architecture.md
@~/.claude/snippets/common.md
  • Relative: @docs/file.md
  • Absolute: @~/path/file.md
  • Max depth: 5 hops

CLAUDE.local.md

Personal project settings (auto-gitignored):

markdown
# My Local Settings

- Prefer verbose output
- Run tests after every change
- My worktree location: .trees/

Common Mistakes

MistakeFix
500+ linesSplit into .claude/rules/
SQL examples inline→ rules/database.md
"Run prettier" rulesUse tool config files
Full API docs→ rules/api.md
Deployment instructions→ rules/deploy.md
Code in CLAUDE.mdUse @file:line references
Negative rules onlyAdd alternatives: "Don't X; use Y instead"

Quality Checklist

Before finishing:

  • CLAUDE.md < 200 lines?
  • Each rules file < 500 lines?
  • Critical rules at top?
  • No task-specific content in main file?
  • No code style rules (use ESLint/Prettier)?
  • .claude/rules/ for domain-specific docs?
  • Subdirectories for components (frontend/, backend/)?
  • paths: frontmatter for conditional loading?
  • @ references instead of duplication?
  • CLAUDE.local.md for personal prefs?

Useful Commands

CommandPurpose
/initGenerate initial CLAUDE.md
/memoryView loaded memory files

Sources

Official:

  • code.claude.com/docs/en/memory (Memory management, paths, globs)
  • anthropic.com/engineering/claude-code-best-practices
  • claude.com/blog/using-claude-md-files

Community:

  • thedocumentation.org/claude-code-development-kit (3-Tier System)
  • claudefa.st/blog/guide/mechanics/rules-directory
  • humanlayer.dev/blog/writing-a-good-claude-md

Updated: Jan 2026

© serejaris, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (assets) in skills/claude-md-writer of serejaris/personal-corp-os.

  • SKILL.md
  • README.md
  • README.ru.md
  • assets/illustration.png

Open the folder on GitHubat commit 95e36c3

Compare with similar skills

Claude Md Writer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Claude Md Writer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Claude Md Writer this skillserejaris/personal-corp-os229—~1.6kAutomated safety check: PassMIT
Docslatitude-dev/latitude-llm4.7k—~2.5kAutomated safety check: PassMIT
Steadyagent WorkflowKhalilzhang0825/boring-is-all-you-need172—~1kAutomated safety check: PassMIT
Update Docspeterkrueck/Claude-Code-Development-Kit1.4k—~2.7kAutomated safety check: PassMIT
Refresh AgentsUniClipboard/UniClipboard1.9k—~837Automated safety check: PassAGPL-3.0
Refactor Memoryvinta/hal-9000138—~887Automated safety check: PassMIT

Similar skills

  • Docs

    latitude-dev/latitude-llm

    Review the current conversation context and git changes, then persist durable repository knowledge into dev-docs/.md by domain and into AGENTS.md for cross-cutting repo rules.

    4.7k GitHub stars~2.5k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check passed
  • Steadyagent Workflow

    Khalilzhang0825/boring-is-all-you-need

    Local-first Codex workflow for planning, debugging, reviewing, refactoring, improving AGENTS.md, building skills, publishing agent harness repositories, or running complex multi-step coding tasks…

    172 GitHub stars~1k tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check passed
  • Update Docs

    peterkrueck/Claude-Code-Development-Kit

    Update project documentation after code changes. An agent skill from peterkrueck/Claude-Code-Development-Kit.

    1.4k GitHub stars~2.7k tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check passed
  • Refresh Agents

    UniClipboard/UniClipboard

    Refresh fact-based sections of crates/AGENTS.md (STRUCTURE, WHERE TO LOOK, COMPLEXITY HOTSPOTS, KNOWN BROKEN) from current codebase state.

    1.9k GitHub stars~837 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Refactor Memory

    vinta/hal-9000

    A skill your agent uses when refactoring Claude Code or Codex memories to remove stale or derivable entries, resolve contradictions, promote standing instructions, or reorganize recall.

    138 GitHub stars~887 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Mcaf Solid Maintainability

    managedcode/Storage

    Apply SOLID, SRP, cohesion, composition-over-inheritance, and small-file discipline to code changes.

    138 GitHub stars~1.1k tokensUpdated 4 days ago
    Agent WorkflowsAuto-check passed

More from serejaris/personal-corp-os

All 36 skills in this repo
  • Weekly Planning

    serejaris/personal-corp-os

    A skill your agent uses when the user is transitioning from a completed retro into a weekly plan, choosing weekly outcomes, scheduling a full ISO week, or asking for "план на неделю", "weekly…

    229 GitHub stars~2.4k tokensUpdated 3 days ago
    Auto-check passed
  • Gh Issues

    serejaris/personal-corp-os

    A skill your agent uses when creating, searching, updating, or managing GitHub issues via CLI.

    229 GitHub stars~1.8k tokensUpdated 3 days ago
    Auto-check passed
  • Product Data Audit

    serejaris/personal-corp-os

    A skill your agent uses when auditing a product, business, or project ecosystem — analyzing data sources, decision loops, bottlenecks, and implementation contours.

    229 GitHub stars~1.3k tokensUpdated 3 days ago
    Auto-check passed
  • Tg Bot Ops

    serejaris/personal-corp-os

    A skill your agent uses when operating, debugging, deploying, or monitoring a Telegram bot or Telegram-to-agent gateway.

    229 GitHub stars~1.6k tokensUpdated 3 days ago
    Auto-check: notes
  • Audit Agent Rules

    serejaris/personal-corp-os

    Audits the agent rules in the current folder (AGENTS.md, nested AGENTS.md files) and the skill descriptions the agent sees at start, then reports what to cut, move or rewrite and edits only after…

    229 GitHub stars~2.3k tokensUpdated 3 days ago
    Auto-check passed
  • Make Landing

    serejaris/personal-corp-os

    Создаёт несколько вариантов дизайна 2D-поверхности (лендинг, герой, обложка, слайды): свой визуальный референс и автор на вариант, полный design.md с UTC/SHA-256 до кода, проверка в браузере…

    229 GitHub stars~2.1k tokensUpdated 3 days ago
    Auto-check passed

Questions about Claude Md Writer

What does Claude Md Writer do?

A skill your agent uses when creating or refactoring CLAUDE.md files - enforces best practices for size, structure, and content organization. Claude Md Writer is an agent skill from serejaris/personal-corp-os.

When should I use Claude Md Writer?

Claude Md Writer fits situations like: refactoring CLAUDE.md files - enforces best practices for size; content organization.

How do I install Claude Md Writer in Claude Code?

Run `npx skills add serejaris/personal-corp-os --skill claude-md-writer -a claude-code`. Or copy the skill folder (skills/claude-md-writer in serejaris/personal-corp-os) into .claude/skills/claude-md-writer in your project. Claude Code loads it when a task matches its description.

How do I install Claude Md Writer in Codex?

Run `npx skills add serejaris/personal-corp-os --skill claude-md-writer -a codex`. Or copy the skill folder (skills/claude-md-writer in serejaris/personal-corp-os) into .agents/skills/claude-md-writer in your project. Codex loads it when a task matches its description.

Can I use Claude Md Writer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add serejaris/personal-corp-os --skill claude-md-writer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/claude-md-writer, .gemini/skills/claude-md-writer, .github/skills/claude-md-writer and .opencode/skills/claude-md-writer in your project.

What does Claude Md Writer need to run?

SKILL.md names no scripts, command-line tools or credentials: Claude Md Writer is instructions for the agent only.

Does Claude Md Writer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Claude Md Writer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Claude Md Writer use?

Claude Md Writer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Claude Md Writer use?

About 1.6k tokens (SKILL.md is roughly 6.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Claude Md Writer?

Skills that share tags, products or a category with Claude Md Writer: Docs (latitude-dev/latitude-llm, 4.7k stars), Steadyagent Workflow (Khalilzhang0825/boring-is-all-you-need, 172 stars), Update Docs (peterkrueck/Claude-Code-Development-Kit, 1.4k stars) and Refresh Agents (UniClipboard/UniClipboard, 1.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Claude Md Writer?

serejaris (a GitHub user) maintains it in serejaris/personal-corp-os, which has 229 GitHub stars. The repository holds 36 skills in this directory. The repository was last updated on October 7, 2026.

Source: serejaris/personal-corp-os on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.