smart-rules

Analyze user prompts to load relevant rule documents from smart-rules.yaml.

3|Updated Dec 22, 2025
One-click install
npx skills add https://github.com/CANTAGESTUDIO/CosmicAtlasPacker --skill smart-rules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: smart-rules
Source: https://github.com/CANTAGESTUDIO/CosmicAtlasPacker/tree/main/.claude/skills/smart-rules
Command: npx skills add https://github.com/CANTAGESTUDIO/CosmicAtlasPacker --skill smart-rules

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill analyzes user prompts and efficiently loads only the most relevant rule documents, reducing context switching and streamlining task planning.

Core Features & Use Cases

  • Auto-initialization: scans project docs and auto-generates config file on first invocation
  • Config-based: category-document mapping defined in project-specific smart-rules.yaml
  • Efficient loading: loads only what's needed
  • Dual invocation: auto-execute before tasks or manual /smart-rules command
  • Post-TodoWrite trigger: analyzes todo content and loads relevant rules after TodoWrite

Quick Start

Run the init command to scan the project and generate smart-rules.yaml, then run the default load to fetch relevant documents.

Frequently Asked Questions about smart-rules

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

FAQPage Schema
How do I automatically load only relevant rule documents for my project tasks?

Smart-rules analyzes your prompts to load only matching rule documents based on keywords and categories. It reduces context by selecting relevant rules from your project's smart-rules.yaml configuration, eliminating manual document hunting during automation workflows.

How do I set up smart-rules for my project?

Run the init command to scan your project documents and auto-generate smart-rules.yaml with category-document mappings. The Skill then uses this config to intelligently load rules on subsequent invocations, requiring no manual setup of individual rules.

Can smart-rules work with my existing automation workflow?

Yes. Smart-rules integrates with prompt-automation workflows through auto-execution before tasks, manual `/smart-rules` commands, and post-TodoWrite triggers. It loads relevant rules during feature requests, bug fixes, and refactor planning without disrupting existing processes.

What happens if smart-rules loads too many documents?

Smart-rules enforces a max_documents cap and deduplicates loaded rules to keep context lean. You can define exclusions for specific categories and files in smart-rules.yaml to further control which documents are considered for loading.

How does smart-rules determine which rules match my current task?

Smart-rules extracts keywords from your prompt and matches them against category mappings in smart-rules.yaml. It supports composite categories and returns clear reporting of which documents were loaded, showing the matching logic for transparency.