Writing Claude Md Files logo

Writing Claude Md Files

Organization
ed3dai
writing-claude-md-files

Use when creating or updating CLAUDE.md files for projects or subdirectories - covers top-level vs domain-level organization, capturing architectural intent and contracts, and mandatory freshness dates

Overview

Publishered3dai
Repositoryed3d-plugins
Skill namewriting-claude-md-files
Stars
249
Forks
33
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by ed3dai on GitHub. Read the source before you install it.

Installation

Install the Writing Claude Md Files AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ed3dai/ed3d-plugins.git /tmp/ed3d-plugins
mkdir -p .claude/skills
cp -r /tmp/ed3d-plugins/plugins/ed3d-extending-claude/skills/writing-claude-md-files .claude/skills/writing-claude-md-files
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Writing Claude Md Files in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Writing Claude Md Files on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Writing Claude Md Files is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Writing CLAUDE.md Files

REQUIRED BACKGROUND: Read ed3d-extending-claude:writing-claude-directives for foundational guidance on token efficiency, compliance techniques, and directive structure.

Core Principle

CLAUDE.md files bridge Claude's statelessness. They preserve context so humans don't re-explain architectural intent every session.

Key distinction:

  • Top-level: HOW to work in this codebase (commands, conventions)
  • Subdirectory: WHY this piece exists and what it PROMISES (contracts, intent)

File Hierarchy

Claude automatically reads CLAUDE.md files from current directory up to root:

project/
├── CLAUDE.md                    # Project-wide: tech stack, commands, conventions
└── src/
    └── domains/
        ├── auth/
        │   ├── CLAUDE.md        # Auth domain: purpose, contracts, invariants
        │   └── oauth2/
        │       └── CLAUDE.md    # OAuth2 subdomain (rare, only when needed)
        └── billing/
            └── CLAUDE.md        # Billing domain: purpose, contracts, invariants

Depth guideline: Typically one level (domain). Occasionally two (subdomain like auth/oauth2). Rarely more.

Top-Level CLAUDE.md

Focuses on project-wide WHAT and HOW.

What to Include

SectionPurpose
Tech StackFramework, language, key dependencies
CommandsBuild, test, run commands
Project StructureDirectory overview with purposes
ConventionsNaming, patterns used project-wide
BoundariesWhat Claude can/cannot edit

Template

markdown
# [Project Name]

Last verified: [DATE - use `date +%Y-%m-%d`]

## Tech Stack
- Language: TypeScript 5.x
- Framework: Next.js 14
- Database: PostgreSQL
- Testing: Vitest

## Commands
- `npm run dev` - Start dev server
- `npm run test` - Run tests
- `npm run build` - Production build

## Project Structure
- `src/domains/` - Domain modules (auth, billing, etc.)
- `src/shared/` - Cross-cutting utilities
- `src/infrastructure/` - External adapters (DB, APIs)

## Conventions
- Functional Core / Imperative Shell pattern
- Domain modules are self-contained
- See domain CLAUDE.md files for domain-specific guidance

## Boundaries
- Safe to edit: `src/`
- Never touch: `migrations/` (immutable), `*.lock` files

What NOT to Include

  • Code style rules (use linters)
  • Exhaustive command lists (reference package.json)
  • Content that belongs in domain-level files
  • Sensitive information (keys, credentials)

Subdirectory CLAUDE.md (Domain-Level)

Focuses on WHY and CONTRACTS. The code shows WHAT; these files explain intent.

What to Include

SectionPurpose
PurposeWHY this domain exists (not what it does)
ContractsWhat this domain PROMISES to others
DependenciesWhat it uses, what uses it, boundaries
Key DecisionsADR-lite: decisions and rationale
InvariantsThings that must ALWAYS be true
GotchasNon-obvious traps

Template

markdown
# [Domain Name]

Last verified: [DATE - use `date +%Y-%m-%d`]

## Purpose
[1-2 sentences: WHY this domain exists, what problem it solves]

## Contracts
- **Exposes**: [public interfaces - what callers can use]
- **Guarantees**: [promises this domain keeps]
- **Expects**: [what callers must provide]

## Dependencies
- **Uses**: [domains/services this depends on]
- **Used by**: [what depends on this domain]
- **Boundary**: [what should NOT be imported here]

## Key Decisions
- [Decision]: [Rationale]

## Invariants
- [Thing that must always be true]

## Key Files
- `index.ts` - Public exports
- `types.ts` - Domain types
- `service.ts` - Main service implementation

## Gotchas
- [Non-obvious thing that will bite you]

Example: Auth Domain

markdown
# Auth Domain

Last verified: 2025-12-17

## Purpose
Ensures user identity is verified exactly once at the system edge.
All downstream services trust the auth token without re-validating.

## Contracts
- **Exposes**: `validateToken(token) → User | null`, `createSession(credentials) → Token`
- **Guarantees**: Tokens expire after 24h. User objects always include roles.
- **Expects**: Valid JWT format. Database connection available.

## Dependencies
- **Uses**: Database (users table), Redis (session cache)
- **Used by**: All API routes, billing domain (user identity only)
- **Boundary**: Do NOT import from billing, notifications, or other domains

## Key Decisions
- JWT over session cookies: Stateless auth for horizontal scaling
- bcrypt cost 12: Legacy decision, migration to argon2 tracked in ADR-007

## Invariants
- Every user has exactly one primary email
- Deleted users are soft-deleted (is_deleted), never hard deleted
- User IDs are UUIDs, never sequential

## Key Files
- `service.ts` - AuthService implementation
- `tokens.ts` - JWT creation/validation
- `types.ts` - User, Token, Session types

## Gotchas
- Token validation returns null on invalid (doesn't throw)
- Never return raw password hashes in User objects

Freshness Dates: MANDATORY

Every CLAUDE.md MUST include a "Last verified" date.

CRITICAL: Use Bash to get the actual date. Do NOT hallucinate dates.

bash
date +%Y-%m-%d

Include in file:

markdown
Last verified: 2025-12-17

Why mandatory: Stale CLAUDE.md files are worse than none. The date signals when contracts were last confirmed accurate.

Referencing Files

You can reference key files in CLAUDE.md:

markdown
## Key Files
- `index.ts` - Public exports
- `service.ts` - Main implementation

Do NOT use @ syntax (e.g., @./service.ts). This force-loads files into context, burning tokens. Just name the files; Claude can read them when needed.

Heuristics: Top-Level vs Subdirectory

QuestionTop-levelSubdirectory
Applies project-wide?
New engineer needs on day 1?
About commands/conventions?
About WHY a component exists?
About contracts between parts?
Changes when the domain changes?

Rule of thumb:

  • Top-level = "How to work here"
  • Subdirectory = "Why this exists and what it promises"

When to Create Subdirectory CLAUDE.md

Create when:

  • Domain has non-obvious contracts with other parts
  • Architectural decisions affect how code should evolve
  • Invariants exist that aren't obvious from code
  • New sessions consistently need the same context re-explained

Don't create for:

  • Trivial utility folders
  • Implementation details that change frequently
  • Content better captured in code comments

Updating CLAUDE.md Files

When updating any CLAUDE.md:

  1. Update the freshness date using Bash date +%Y-%m-%d
  2. Verify contracts still hold - read the code, check invariants
  3. Remove stale content - better short and accurate than long and wrong
  4. Keep token-efficient - <300 lines top-level, <100 lines subdirectory

Common Mistakes

MistakeFix
Describing WHAT code doesFocus on WHY it exists, contracts it keeps
Missing freshness dateAlways include, always use Bash for real date
Using @ to reference filesJust name files, let Claude read on demand
Too much detailSubdirectory files should be <100 lines
Duplicating parent contentSubdirectory inherits parent; don't repeat
Stale contractsUpdate when domain changes; verify dates

Checklist

Top-level:

  • Tech stack listed
  • Key commands documented
  • Project structure overview
  • Freshness date (from date +%Y-%m-%d)

Subdirectory:

  • Purpose explains WHY (not what)
  • Contracts: exposes, guarantees, expects
  • Dependencies and boundaries clear
  • Key decisions with rationale
  • Invariants documented
  • Freshness date (from date +%Y-%m-%d)
  • Under 100 lines

Frequently asked questions

What does the Writing Claude Md Files AI skill do?

Use when creating or updating CLAUDE.md files for projects or subdirectories - covers top-level vs domain-level organization, capturing architectural intent and contracts, and mandatory freshness dates

Why use Writing Claude Md Files on TypingMind?

Because you install it once and use it with any model. Writing Claude Md Files is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Writing Claude Md Files in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ed3dai/ed3d-plugins/tree/main/plugins/ed3d-extending-claude/skills/writing-claude-md-files. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Writing Claude Md Files?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Writing Claude Md Files?

As many as you like. As long as a model supports skills, you can use Writing Claude Md Files with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Writing Claude Md Files AI skill free?

It is published on GitHub by ed3dai. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇