Agent skill

Authoring Claude Md

by sammcj in sammcj/agentic-coding

Creating and maintaining CLAUDE.md project memory files and .claude/rules/ rule files that provide non-obvious codebase context.

Apache-2.0Auto-check passedAgent Workflows

Install Authoring Claude Md

skills CLI
$ npx skills add sammcj/agentic-coding --skill authoring-claude-md -a claude-code

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

GitHub CLI
$ gh skill install sammcj/agentic-coding authoring-claude-md --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/sammcj/agentic-coding.git skills-src && mkdir -p .claude/skills && cp -r skills-src/Skills/authoring-claude-md .claude/skills/authoring-claude-md && 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
authoring-claude-md
GitHub stars
162
Token cost
~2.6k tokens
SKILL.md length
1,106 words
Files
3
Skills in repo
64
Repo updated
First seen
Licence
Apache-2.0

At a glance

Creating and maintaining CLAUDE.md project memory files and .claude/rules/ rule files that provide non-obvious codebase context.

  • Works in 3 steps: Reword to be more concise → Remove generic advice → Ensure there's no duplicated content
  • Creating a new CLAUDE.md for a project
  • SKILL.md covers Purpose, Core Principles, Structure and When to Use .claude/rules/…, plus 10 more sections
  • Calls npm

What it does

Authoring Claude Md is an agent skill from sammcj/agentic-coding. Creating and maintaining CLAUDE.md project memory files and .claude/rules/ rule files that provide non-obvious codebase context. Use when (1) creating a new CLAUDE.md for a project, (2) adding architectural patterns or design decisions to existing CLAUDE.md, (3) capturing project-specific conventions that aren't obvious from code inspection, (4) organising instructions into path-scoped rule files.

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `CHANGELOG.md` and `CLAUDE.md`).

It sits in Agent Workflows, covering Agent instruction files, Architecture decision records and Agent memory. The repository describes itself as: Agentic Coding Rules, Templates etc... The licence is Apache-2.0.

When your agent uses it

  • Creating a new CLAUDE.md for a project
  • Adding architectural patterns
  • Design decisions to existing CLAUDE.md
  • Capturing project-specific conventions that arent obvious from code inspection

Example prompts

  • “/authoring-claude-md”

Workflow steps

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

  1. Reword to be more concise
  2. Remove generic advice
  3. Ensure there's no duplicated content

What it can do on your machine

Read from SKILL.md and the folder at commit 2f25ced. 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

    Shell commands in SKILL.md call:

    • npm

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

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    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

Authoring Claude Md loads about 2.6k tokens when it runs. Until then it costs about 105 tokens; SKILL.md has 1,106 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~105
When it runs · the whole SKILL.md, loaded when a task matches
~2.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 sammcj/agentic-coding at commit 2f25ced, republished under its Apache-2.0 licence (© sammcj). 1,106 words, ~2,574 tokens.

Download SKILL.mdSave it as .claude/skills/authoring-claude-md/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
authoring-claude-md
description
Creating and maintaining CLAUDE.md project memory files and .claude/rules/ rule files that provide non-obvious codebase context. Use when (1) creating a new CLAUDE.md for a project, (2) adding architectural patterns or design decisions to existing CLAUDE.md, (3) capturing project-specific conventions that aren't obvious from code inspection, (4) organising instructions into path-scoped rule files.

CLAUDE.md and Rules Authoring

Create effective CLAUDE.md files and .claude/rules/ rule files that serve as project-specific memory for AI coding agents.

Purpose

CLAUDE.md files and rule files provide AI agents with:

  • Non-obvious conventions, architectural patterns and gotchas
  • Confirmed solutions to recurring issues
  • Project-specific context not found in standard documentation
  • Path-scoped instructions that only load when relevant files are touched

Not for: obvious patterns, duplicating documentation, or generic coding advice.

Core Principles

  • Signal over noise: Every sentence must add non-obvious value. If an AI agent could infer it from reading the codebase, omit it.
  • Actionable context: Focus on "what to do" and "why it matters", not descriptions of what exists.
  • Solve real friction, not theoretical concerns: Add to CLAUDE.md based on actual problems encountered, not hypothetical scenarios. If you repeatedly explain the same thing to Claude, document it. If you haven't hit the problem yet, don't pre-emptively solve it.

Structure

Use headings for clear organisation. Common sections: Architecture, Conventions, Gotchas, Testing. Use 2-4 sections and only include what adds value.

When to Use .claude/rules/ Instead

For larger projects, break instructions into separate files under .claude/rules/. Each .md file covers one topic. Prefer rules over a single CLAUDE.md when:

  • Instructions are growing beyond 200 lines
  • Different rules apply to different parts of the codebase (frontend vs backend, API vs CLI)
  • Multiple team members maintain different sections
  • Some instructions only matter when working with specific file types
Rule File Basics
your-project/
├── .claude/
│   ├── CLAUDE.md           # Main project instructions
│   └── rules/
│       ├── code-style.md   # Always loaded
│       ├── testing.md      # Always loaded
│       └── security.md     # Always loaded

Files are discovered recursively, so subdirectories like frontend/ and backend/ work. Rules without paths frontmatter load at launch with the same priority as .claude/CLAUDE.md.

The same authoring principles apply to rule files: signal over noise, actionable context, no obvious information.

Path-Specific Rules

Scope rules to specific files using YAML frontmatter with the paths field. These only load when Claude reads files matching the glob patterns, reducing noise and saving context.

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

# API Development Rules

- All API endpoints must include input validation
- Use the standard error response format
- Include OpenAPI documentation comments

Rules without a paths field apply unconditionally. Path-scoped rules trigger on file read, not on every tool use.

User-Level Rules

Personal rules that apply across all your projects live at ~/.claude/rules/. These load before project rules, giving project rules higher priority.

~/.claude/rules/
├── preferences.md    # Personal coding preferences
└── workflows.md      # Preferred workflows
Rules vs Skills

Rules load every session (or when matching files are opened). For task-specific instructions that don't need constant context, use skills instead. Skills load only when invoked or when Claude determines they're relevant.

What to Include

Architectural decisions: Why microservices over monolith, event-driven patterns, state management

Non-obvious conventions:

  • "Use _internal suffix for private APIs not caught by linter"
  • "Date fields always UTC, formatting happens client-side"
  • "Avoid ORM for reports, use raw SQL in /queries"

Recurring issues:

  • "TypeError in auth: ensure verify() uses Buffer.from(secret, 'base64')"
  • "Cache race condition: acquire lock before checking status"

Project patterns: Error handling, logging, API versioning, migrations

What to Exclude

  • Line numbers: files change and references break. Use descriptive paths: "in src/auth/middleware.ts" not "line 42"
  • Obvious information: "We use React" (visible in package.json). LLMs are in-context learners and pick up patterns from codebase exploration.
  • Code style guidelines: formatting rules, naming conventions, or patterns that linters enforce. Use ESLint, Prettier, Black, golangci-lint or similar, and Claude Code Hooks to run formatters.
  • Generic advice: "Write good tests" adds no project-specific value.
  • Setup steps: belong in README unless highly non-standard.
  • Duplicate content: if it's in the README or existing docs, link to it rather than repeat it.
  • Task-specific minutiae: database schemas, API specifications, deployment procedures belong in their own docs. Link to them rather than duplicating.
  • Temporary notes: TODOs, one-off bug fixes, and temporary workarounds belong in code comments.
  • Verbose descriptions: keep entries terse, drop long explanations.
  • Kitchen sink entries: not every gotcha belongs here. Ask "Is this relevant across most coding sessions?" If no, it belongs in code comments or specific docs.
  • Formatting over-emphasis: don't bold the start of every sentence or bullet, reserve emphasis for warnings that truly warrant it.
Show full SKILL.md (474 more words)Show less

Conflict Audit

Before adding a line, check it against what else is already loaded: the user-level ~/.claude/CLAUDE.md, sibling rule files, and any skill covering the same ground. Instructions that clash ("leave documentation as appropriate" next to "never add comments") make the agent resolve the contradiction before it can start work, and it won't resolve it the same way every session.

Keep each topic in one place:

  • Already stated elsewhere: leave it there rather than restating it
  • Narrower than an existing rule: write it as an exception that names what it overrides ("repo-wide we run Prettier; /legacy keeps its existing formatting")
  • Genuinely at odds with a user-level or global rule: raise it with the user instead of silently overriding

Path-scoped rules refine the root CLAUDE.md for the files they match; they shouldn't reverse it.

Linking to Existing Documentation

Point to existing docs rather than duplicating content. Provide context about when to read them:

Good:

markdown
# Architecture
Event-driven architecture using AWS EventBridge.

- For database schema: see src/database/SCHEMA.md when working with data models
- For auth flows: see src/auth/README.md when working with authentication

Bad: Copying schema tables, pasting deployment steps, or duplicating API flows into CLAUDE.md

Writing Style

Be specific:

  • Bad: "Use caution with the authentication system"
  • Good: "Auth tokens expire after 1 hour. Background jobs must refresh tokens using refreshToken() in src/auth/refresh.ts"

Be concise:

  • Bad: "It's important to note that when working with our database layer, you should be aware that..."
  • Good: "Database queries: Use Prisma for CRUD, raw SQL for complex reports in /queries"

Use active voice:

  • Bad: "Migrations should be run before deployment"
  • Good: "Run migrations before deployment: npm run migrate:prod"

When to Update

Add to CLAUDE.md when:

  • Discovering a non-obvious pattern after codebase exploration or complex problem resolution
  • Solving an issue that took significant investigation that will be encountered again by other agents
  • Finding a gotcha that's not immediately clear from code

Don't add anything covered under What to Exclude (one-off fixes, temporary workarounds, info already in docs, verbose explanations).

Spelling Conventions

Always use Australian English spelling

Example Structure

markdown
# Architecture
Event-driven architecture using AWS EventBridge. Services communicate via events, not direct calls.

Auth: JWT tokens with refresh mechanism. See src/auth/README.md for detailed flows when working on authentication.
Database schema and relationships: see src/database/SCHEMA.md when working with data models.

# Conventions
- API routes: Plural nouns (`/users`, `/orders`), no verbs in paths
- Error codes: 4-digit format `ERRR-1001`, defined in src/errors/codes.ts
- Feature flags: Check in middleware, not in business logic
- Dates: Always UTC in database, format client-side via src/utils/dates.ts
- Documentation: Use DocBlocks for public functions, never use "smart" formatting markdown

# Gotchas

**Cache race conditions**: Always acquire lock before checking cache status

**Background job authentication**: Tokens expire after 1 hour. Refresh using
`refreshToken()` in src/auth/refresh.ts before making API calls.

# Testing

- Tests should never have external API calls or dependencies.
- Run `make test` before committing.

Token Budget

Aim for 1k-4k tokens for CLAUDE.md. Most projects fit in 100-300 lines. A single CLAUDE.md is fine for most projects - if exceeding budget, consider whether splitting into .claude/rules/ files would help (especially if some content only applies to specific file types). If exceeding:

  1. Reword to be more concise
  2. Remove generic advice
  3. Ensure there's no duplicated content

Estimate token count with wc -c CLAUDE.md, then divide the character count by roughly 4.

Review Checklist

Before finalising:

  • Nothing from What to Exclude slipped in (line numbers, code style, duplicated docs, temporary notes, verbose guidance)
  • Wording is concise and not duplicated
  • Sections only add non-obvious value
  • Simple formatting, no smart quotes, no em dashes, no excessive bolding
  • Information is unlikely to become stale quickly
  • Prefer positive rules with a substitute ("use semicolons or periods to separate clauses") over bare prohibitions ("never use em-dashes")
  • Focused on stable, long-term patterns
  • Content is tight, concise and actionable, not verbose or narrative driven

© sammcj, Apache-2.0. 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 2 other files in Skills/authoring-claude-md of sammcj/agentic-coding.

  • SKILL.md
  • CHANGELOG.md
  • CLAUDE.md

Open the folder on GitHubat commit 2f25ced

Compare with similar skills

Authoring Claude Md 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.

Authoring Claude Md compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Authoring Claude Md this skillsammcj/agentic-coding162—~2.6kAutomated safety check: PassApache-2.0
Rememberantonio-orionus/Arroxy397—~571Automated safety check: PassMIT
Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills21k—~1.9kAutomated safety check: PassMIT
SkillOpt Sleep Cyclemicrosoft/SkillOpt18k—~2.3kAutomated safety check: PassMIT
CLAUDE.md Improveranthropics/claude-plugins-official38k5 repos~1.5kAutomated safety check: PassApache-2.0
Context Engineeringabashev/vfs-s31069 repos~2.6kAutomated safety check: NotesApache-2.0

Similar skills

  • Remember

    antonio-orionus/Arroxy

    Persists a durable Arroxy lesson — a gotcha, user preference, workflow rule, or design decision — to the right tracked file (project memory, AGENTS.md, CONTEXT.md, dev-docs, or an ADR) so any coding…

    397 GitHub stars~571 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Neat-Freak Knowledge Closeout

    KKKKhazix/khazix-skills

    Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.

    21k GitHub stars~1.9k tokensUpdated 10 days ago
    Agent WorkflowsAuto-check passed
  • SkillOpt Sleep Cycle

    microsoft/SkillOpt

    Official

    Runs an on-demand or nightly sleep cycle that reviews past Claude Code sessions and proposes validated updates to CLAUDE.md and skills.

    18k GitHub stars~2.3k tokensUpdated 4 days ago
    Agent WorkflowsAuto-check passed
  • CLAUDE.md Improver

    anthropics/claude-plugins-official

    Official

    Finds every CLAUDE.md file in a repository, scores each against quality criteria, shows a report, then makes targeted updates after you approve.

    38k GitHub starsUsed in 5 repos~1.5k tokens
    Agent WorkflowsAuto-check passed
  • Context Engineering

    abashev/vfs-s3

    Optimizes agent context setup. An agent skill from abashev/vfs-s3.

    106 GitHub starsUsed in 9 repos~2.6k tokens
    Agent WorkflowsAuto-check: notes
  • Using LWC Memory and Graphs

    sickn33/agentic-awesome-skills

    Keeps project decisions, research and verified results available across coding-agent sessions through LWC memory, a document Wiki graph and a CodeGraph code index.

    47k GitHub starsUsed in 1 repo~2k tokens
    Agent WorkflowsAuto-check passed

More from sammcj/agentic-coding

All 64 skills in this repo
  • Yue2 Music

    sammcj/agentic-coding

    A skill your agent uses when generating songs with YuE2, covering a recording via SheetSage2 audio-to-ABC, editing a score or lyrics with melody preservation, or building a reproducible listening…

    162 GitHub stars~2.3k tokensUpdated 2 days ago
    Auto-check passed
  • Bento Slides

    sammcj/agentic-coding

    A skill your agent uses when creating or editing Bento (.bento.html) slide decks, including any request for a single-file HTML slide deck.

    162 GitHub stars~2.9k tokensUpdated 2 days ago
    Auto-check passed
  • Idrive Backup

    sammcj/agentic-coding

    A skill your agent uses whenever the user wants you to manage, discuss or diagnose iDrive Backup configuration on macOS

    162 GitHub stars~1.7k tokensUpdated 2 days ago
    Auto-check: notes
  • Piper Tts Training

    sammcj/agentic-coding

    Train custom TTS voices for Piper (ONNX format) using fine-tuning or from-scratch approaches.

    162 GitHub stars~1.4k tokensUpdated 2 days ago
    Auto-check passed
  • PPTX To Md

    sammcj/agentic-coding

    Convert a PPTX slide deck into per-slide markdown that preserves both the verbatim text and the meaning of embedded screenshots, diagrams and charts in their original layout positions.

    162 GitHub stars~1.8k tokensUpdated 2 days ago
    Auto-check passed
  • Skill Creator Primer

    sammcj/agentic-coding

    You MUST load this skill before the skill-creator skill AND before making ANY change to, or conducting a review of ANY Agent Skill.

    162 GitHub stars~9.8k tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about Authoring Claude Md

What does Authoring Claude Md do?

Creating and maintaining CLAUDE.md project memory files and .claude/rules/ rule files that provide non-obvious codebase context. Authoring Claude Md is an agent skill from sammcj/agentic-coding.claude/rules/ rule files that provide non-obvious codebase context.

When should I use Authoring Claude Md?

Authoring Claude Md fits situations like: creating a new CLAUDE.md for a project; adding architectural patterns; design decisions to existing CLAUDE.md; capturing project-specific conventions that arent obvious from code inspection.

How do I install Authoring Claude Md in Claude Code?

Run `npx skills add sammcj/agentic-coding --skill authoring-claude-md -a claude-code`. Or copy the skill folder (Skills/authoring-claude-md in sammcj/agentic-coding) into .claude/skills/authoring-claude-md in your project. Claude Code loads it when a task matches its description.

How do I install Authoring Claude Md in Codex?

Run `npx skills add sammcj/agentic-coding --skill authoring-claude-md -a codex`. Or copy the skill folder (Skills/authoring-claude-md in sammcj/agentic-coding) into .agents/skills/authoring-claude-md in your project. Codex loads it when a task matches its description.

Can I use Authoring Claude Md 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 sammcj/agentic-coding --skill authoring-claude-md -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/authoring-claude-md, .gemini/skills/authoring-claude-md, .github/skills/authoring-claude-md and .opencode/skills/authoring-claude-md in your project.

What does Authoring Claude Md need to run?

Going by SKILL.md and its folder, Authoring Claude Md needs the command-line tools its instructions call (npm).

Does Authoring Claude Md access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Authoring Claude Md 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 Authoring Claude Md use?

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

How many tokens does Authoring Claude Md use?

About 2.6k tokens (SKILL.md is roughly 10k 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 Authoring Claude Md?

Skills that share tags, products or a category with Authoring Claude Md: Remember (antonio-orionus/Arroxy, 397 stars), Neat-Freak Knowledge Closeout (KKKKhazix/khazix-skills, 21k stars), SkillOpt Sleep Cycle (microsoft/SkillOpt, 18k stars) and CLAUDE.md Improver (anthropics/claude-plugins-official, 38k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Authoring Claude Md?

sammcj (a GitHub user) maintains it in sammcj/agentic-coding, which has 162 GitHub stars. The repository holds 64 skills in this directory. The repository was last updated on October 9, 2026.

Source: sammcj/agentic-coding on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.