Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

writing-claude-md

verified

Use when creating CLAUDE.md, improving existing CLAUDE.md, or setting up project configuration. Use when user says "create CLAUDE.md", "setup project", "add laws", "configure agent".

View on GitHub

Marketplace

rcc

wayne930242/Reflexive-Claude-Code

Plugin

rcc

Repository

wayne930242/Reflexive-Claude-Code
7stars

plugins/rcc/skills/writing-claude-md/SKILL.md

Last Verified

February 5, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/wayne930242/Reflexive-Claude-Code/blob/main/plugins/rcc/skills/writing-claude-md/SKILL.md -a claude-code --skill writing-claude-md

Installation paths:

Claude
.claude/skills/writing-claude-md/
Powered by add-skill CLI

Instructions

# Writing CLAUDE.md

## Overview

**Writing CLAUDE.md IS establishing a constitution for your project.**

The `<law>` block mechanism forces Claude to actively repeat constraints each response, preventing context drift over long conversations.

**Core principle:** Laws without Self-Reinforcing Display drift out of context. The display IS the enforcement.

**Violating the letter of the rules is violating the spirit of the rules.**

## Task Initialization (MANDATORY)

Before ANY action, create task list using TaskCreate:

```
TaskCreate for EACH task below:
- Subject: "[writing-claude-md] Task N: <action>"
- ActiveForm: "<doing action>"
```

**Tasks:**
1. Analyze current state
2. RED - Test without proper laws
3. GREEN - Write constitution
4. Add project content
5. Validate structure
6. REFACTOR - Quality review
7. Test with new session

Announce: "Created 7 tasks. Starting execution..."

**Execution rules:**
1. `TaskUpdate status="in_progress"` BEFORE starting each task
2. `TaskUpdate status="completed"` ONLY after verification passes
3. If task fails → stay in_progress, diagnose, retry
4. NEVER skip to next task until current is completed
5. At end, `TaskList` to confirm all completed

## TDD Mapping for CLAUDE.md

| TDD Phase | CLAUDE.md Creation | What You Do |
|-----------|-------------------|-------------|
| **RED** | Test without laws | Observe agent without proper `<law>` block |
| **Verify RED** | Document drift | Note where agent forgot constraints |
| **GREEN** | Write constitution | Create `<law>` block addressing drift |
| **Verify GREEN** | Test enforcement | Verify laws displayed every response |
| **REFACTOR** | Improve laws | Make laws more specific, verifiable |

## Task 1: Analyze Current State

**Goal:** Understand what exists and what's needed.

**If CLAUDE.md exists:**
1. Read current content
2. Check for `<law>` blocks
3. Identify missing or weak laws
4. Note project structure accuracy

**If no CLAUDE.md:** Document project basics (name, purpose

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
9831 chars