rule-loader

Select rule files by matching extensions, directories, and keywords against RULES_INDEX.md.

7|1|Updated Oct 31, 2025
One-click install
npx skills add https://github.com/sfc-gh-myoung/ai_coding_rules --skill rule-loader
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rule-loader
Source: https://github.com/sfc-gh-myoung/ai_coding_rules/tree/main/skills/rule-loader
Command: npx skills add https://github.com/sfc-gh-myoung/ai_coding_rules --skill rule-loader

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Rule Loader determines which rule files to load for a given user request by evaluating file extensions, directory references, and keywords against RULES_INDEX.md. It coordinates foundation loading, domain matching, activity matching, and dependency resolution while enforcing token budgets across phases.

Core Features & Use Cases

  • Foundation loading: always load 000-global-core.md before any other rule.
  • Domain and activity matching: map file extensions and keywords to domain rules and activity rules to form a loading plan.
  • Dependency resolution: ensure prerequisites are loaded before dependents according to Depends metadata.
  • Token budget management: track total tokens and defer low-priority rules when budgets are exceeded.
  • Debugging and auditing: output a clear Rules Loaded log with reasons for each loaded or deferred rule.

Quick Start

Use the rule-loader skill in your agent conversation.

Frequently Asked Questions about rule-loader

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

FAQPage Schema
How do I load AI rules dynamically based on file extensions and keywords?

Rule loading for AI agents evaluates file extensions, directory references, and keywords against a rules index to determine which rule files to load. It coordinates foundation, domain, and activity matching to form a deterministic loading plan for each request.

What is the best way to manage token budgets when loading multiple AI rule files?

Token budget management tracks total tokens across loading phases and defers low-priority rules when budgets are exceeded. This ensures the AI agent stays within context limits while prioritizing critical domain and activity rules over optional ones.

How does dependency resolution work when loading AI rules with prerequisites?

Dependency resolution ensures prerequisite rules are loaded before dependent rules by evaluating Depends metadata. This coordinates the loading sequence across foundation, domain, and activity phases to maintain rule chain integrity.

Can I debug why a specific AI rule file was loaded or deferred?

Yes, the rule loader provides deterministic debugging outputs that log reasons for each loaded or deferred rule. You can audit dependency chains, budget decisions, and the complete rules loaded log to troubleshoot configuration issues.

Do I need a global core rule file loaded before domain-specific AI rules?

Yes, foundation loading always loads the global core rule file before any other rules. This establishes baseline instructions and configurations that domain and activity rules depend on for proper context and behavior.