manage-rules

Generate rule recommendations and copy selected templates into .claude/rules/.

Updated Mar 8, 2026
One-click install
npx skills add https://github.com/aifuun/u-safe-archive --skill manage-rules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: manage-rules
Source: https://github.com/aifuun/u-safe-archive/tree/main/.claude/skills/manage-rules
Command: npx skills add https://github.com/aifuun/u-safe-archive --skill manage-rules

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Projects with many rule templates and profiles struggle to pick, preview, and apply the right set of technical rules for a given project profile. This skill automates detection of the active profile, analyzes template YAML frontmatter, and produces a transparent recommendation report so maintainers can review before applying changes.

Core Features & Use Cases

  • Profile detection and validation: auto-detects project profile from docs/project-profile.md or .claude/profiles/*.json and validates frontmatter.
  • Template analysis and filtering: scans .claude/guides/rules/templates/, extracts profiles/category/tags from YAML frontmatter, and filters by include/exclude patterns.
  • Framework-only protection: detects and excludes templates marked framework-only to avoid leaking framework maintenance rules into projects.
  • Preview and safe apply: generates a three-part recommendation report (.claude/rules-recommendation.md), supports dry-run preview and interactive confirmation, and copies matched templates into .claude/rules/ while preserving structure.
  • Use cases: project initialization, framework sync, manual rule regeneration, and CI scaffolding adjustments.

Quick Start

Run the manage-rules command to auto-detect your profile, generate the recommendation report, review the suggested rules, and confirm to copy the selected templates into .claude/rules/.

Frequently Asked Questions about manage-rules

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

FAQPage Schema
How do I generate rule recommendations for a project profile?

To generate rule recommendations, the tool auto-detects your project profile from docs/project-profile.md or .claude/profiles/*.json, analyzes template YAML frontmatter, and produces a recommendation report in .claude/rules-recommendation.md for review before applying.

What is the best way to filter .claude rule templates by framework markers?

The best way to filter .claude rule templates is by parsing YAML frontmatter to apply include/exclude patterns and detect framework-only markers, which excludes framework maintenance rules from leaking into standard project profiles.

Can I preview rule template changes before copying them into .claude/rules/?

Yes, you can preview rule template changes using the dry-run mode, which generates a three-part recommendation report for interactive confirmation before copying matched templates into .claude/rules/ while preserving the directory structure.

How does profile detection work for project initialization?

Profile detection for project initialization works by validating frontmatter and auto-detecting configuration from docs/project-profile.md or .claude/profiles/*.json to determine which rule templates apply to the active project.

Does the tool support CI scaffolding adjustments for rule synchronization?

Yes, the tool supports CI scaffolding adjustments by automating profile detection, template filtering, and rule generation, allowing automated synchronization of .claude rules during framework updates or project initialization.