rule-making-skill

Analyze a directory and generate .claude/rules/ markdown files for Claude Code.

5|1|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/andersnygaard/ettsted2 --skill rule-making-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rule-making-skill
Source: https://github.com/andersnygaard/ettsted2/tree/main/.claude/skills/rule-making-skill
Command: npx skills add https://github.com/andersnygaard/ettsted2 --skill rule-making-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill analyzes a directory (e.g., frontend/, backend/, e2/) and generates focused .claude/rules/ markdown files to build a durable, domain-memory of code concerns, improving Claude's reasoning with grounded context.

Core Features & Use Cases

  • Directory Analysis: Detects which concerns exist by scanning the target directory for code patterns and CLAUDE.md alignment.
  • Domain Memory Mining: Pulls decisions and patterns from planning tasks (/.task-board/done/) to inform rule creation.
  • Rule Generation: Creates focused rule files under .claude/rules/ for detected concerns (auth.md, data.md, api.md, etc.).
  • Scalability: Generates rules only for concerns present, avoiding duplication.

Quick Start

Analyze a directory such as frontend/ to generate Claude rules. The tool will create or update .claude/rules/ files for detected concerns.

Frequently Asked Questions about rule-making-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Claude rules for my codebase?

Generate Claude rules by analyzing your directory with this Skill, which scans for code patterns and creates focused `.claude/rules/` markdown files for each detected concern, building domain memory that improves Claude's reasoning with grounded context.

What are `.claude/rules/` files and why do I need them?

`.claude/rules/` files are markdown documents that encode domain-specific knowledge and architectural decisions for code areas. They create durable domain memory, helping Claude understand codebase concerns like authentication, data handling, or APIs without re-analyzing the same patterns.

How does the Skill detect which rules to create?

The Skill scans your target directory for code patterns, reads root and local CLAUDE.md files to detect alignment, and mines planning board tasks to extract decisions. It generates rules only for concerns present, avoiding duplication across your codebase.

Can I use this Skill to set up domain memory for a specific part of my codebase?

Yes. Point the Skill at any directory (frontend/, backend/, e2/) to analyze that section and generate focused rule files for its concerns. This lets you build domain memory incrementally across different codebase regions.

What happens if I already have CLAUDE.md files in my directories?

The Skill reads existing root and target directory CLAUDE.md files to understand context and detect concerns. It uses this information to generate rules that align with your documented codebase architecture and decisions.

Do I need planning tasks to generate rules?

No. The Skill analyzes code patterns and CLAUDE.md alignment to generate rules. Planning board tasks from `/.task-board/done/` are optional—the Skill mines them when present to enrich decisions, but rules are generated from directory analysis alone.