generate-rules

Generate path-scoped CLAUDE rule files and update CLAUDE.md references.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/VinhHung1999/memory-system-plugin --skill generate-rules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generate-rules
Source: https://github.com/VinhHung1999/memory-system-plugin/tree/main/plugins/memory-system/skills/generate-rules
Command: npx skills add https://github.com/VinhHung1999/memory-system-plugin --skill generate-rules

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates generation of modular, path-scoped CLAUDE rules by analyzing a project's codebase and producing .claude/rules entries that keep instructions focused and context-light.

Core Features & Use Cases

  • Discover project structure and manifest files to identify domains and relevant rule scopes.
  • Verify existing CLAUDE.md/instructions and reorganize them into modular rule files while preserving universal principles.
  • Phase-driven workflow from discovery to writing rules and updating CLAUDE.md, suitable for onboarding new projects or refactoring large rule sets.

Quick Start

Run the rule-generation workflow on the current project to create path-scoped rule files under .claude/rules and update CLAUDE.md accordingly.

Frequently Asked Questions about generate-rules

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

FAQPage Schema
How do I generate path-scoped CLAUDE rules from my codebase?

To generate path-scoped CLAUDE rules, run the rule-generation workflow to read project manifests, inventory directories, and write modular .claude/rules/* frontmatter files with precise paths. It then updates CLAUDE.md to reference these new scoped instruction files.

What is the best way to split long instructions in CLAUDE.md across multiple projects?

Splitting long CLAUDE.md instructions involves reading existing rules and reorganizing them into modular rule files. This preserves universal principles while producing focused, context-light .claude/rules entries that keep project-specific instructions separated by directory paths.

Does this rule generation workflow work without external dependencies?

Yes, the rule generation workflow operates without external dependencies. It analyzes your project structure and manifest files directly to identify domains and relevant rule scopes, requiring only the existing codebase and CLAUDE.md file to execute.

How do I reorganize an existing CLAUDE.md file into modular rule files?

Reorganizing an existing CLAUDE.md file uses a phase-driven workflow from discovery to writing rules. It verifies current instructions, extracts them into path-scoped .claude/rules files, and updates CLAUDE.md references to maintain organized, context-light project guidance.

When do I need modular path-scoped rules for my project?

You need modular path-scoped rules when onboarding new projects or refactoring large rule sets. This approach keeps instructions focused and context-light by generating .claude/rules entries that apply precise directory paths to specific codebase domains.