Code Rule Generator
Analyzes a directory to automatically generate structured rule files for Claude's domain memory.
The source repository doesn't declare a license. Check its terms before reusing the code.
Key features
- Detects architectural concerns within a directory using a matrix of file and keyword patterns.
- Generates structured Markdown rule files to establish domain memory for specific code areas.
- Mines project history from task boards to extract key decisions, patterns, and gotchas.
- Follows a standardized format for rules, covering stack, structure, patterns, and commands.
- Provides context-specific scaffolding for running, testing, and extending a system.
Use cases
- Analyze a specific part of a codebase (e.g., `frontend/`) to create context-aware rules.
- Bootstrap Claude's understanding of a new project by establishing its domain memory.
- Systematically document established patterns and architectural decisions for a repository.
FAQ
What does the Code Rule Generator skill do?
This skill analyzes a specific directory in your codebase, detects architectural concerns like auth or data handling, and automatically generates structured Markdown files. These files create a 'domain memory' for Claude, providing it with deep, persistent context about that part of your project.
When should I use this skill?
Use this skill whenever you want to ground Claude in a specific part of your codebase. It's perfect for initial project setup or when starting work in a new area. For example, you can ask Claude to 'analyze the frontend/ and create rules' or 'set up domain memory for the backend'.
How does this skill improve my AI coding workflow?
It saves you from repeating context in every prompt. By creating a persistent domain memory, the skill ensures Claude understands your project's specific architecture, patterns, and gotchas from the start. This leads to more accurate, context-aware code generation, reviews, and suggestions.
What key features does the Code Rule Generator offer?
It offers several powerful features: automatic detection of architectural concerns using file and keyword patterns, mining project history from task boards to extract key decisions, and generating structured rule files covering a project's stack, structure, patterns, and commands.
Related skills
Knowledge Base Foundation
Establishes an authoritative hierarchy for understanding a codebase by prioritizing specifications, tests, and runtime code over general documentation.
Learning Documentation2312 ptsObsidian Vault Management
Reads, writes, and organizes notes within a personal Obsidian knowledge base for task logging and knowledge capture.
Learning Documentation312 ptsMemory Management
Manages Claude's static memory system (CLAUDE.md) by providing stable principles, organization patterns, and guidance for querying official documentation.
Learning Documentation112 pts