manage-rule-system

Creates and updates rule files in .agents/rules/ with cross-tool frontmatter for Claude Code, Copilot, Cursor, and Codex.

Updated Jul 23, 2026
One-click install
npx skills add https://github.com/generic-automation-and-it/smooth-ai-stockanalysis --skill manage-rule-system-generic-automation-and-it
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: manage-rule-system
Source: https://github.com/generic-automation-and-it/smooth-ai-stockanalysis/tree/main/.agents/skills/manage-rule-system
Command: npx skills add https://github.com/generic-automation-and-it/smooth-ai-stockanalysis --skill manage-rule-system-generic-automation-and-it

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Maintaining AI coding-agent rule files that work consistently across Claude Code, GitHub Copilot, Cursor, and OpenAI Codex is error-prone because each tool reads rules from different paths and uses different frontmatter fields. This Skill enforces a single convention so every rule file stays compatible with all four tools. ## Core Features & Use Cases - Cross-tool frontmatter authoring: Generates the correct description, globs, paths, applyTo, and alwaysApply fields so one rule file scopes properly in every supported tool. - Directory and category conventions: Decides whether a rule belongs flat in .agents/rules/ or in a category subfolder (created when 2+ rules share a topic), and keeps the symlink chain (.agents/rules → .github/instructions/) intact. - On-demand context injection: Ships a scripts/inject-context.sh hook script that injects the convention into the session once per prompt, deduped by session id. - Use Case: When you ask an agent to add a new backend logging rule, it creates .agents/rules/backend/logging.instructions.md with mirrored scope patterns, a changelog entry, and updated cross-references. ## Quick Start Ask the agent to create a new rule file for backend API standards in .agents/rules/ with frontmatter that works across Claude Code, Copilot, Cursor, and Codex.

Frequently Asked Questions about manage-rule-system

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

FAQPage Schema
How do I create a rule file that works with Claude Code, Copilot, and Cursor?▼

Create a kebab-case .instructions.md file under .agents/rules/ with YAML frontmatter containing description, globs, paths, applyTo, and alwaysApply fields. Mirror the same glob pattern across globs, paths, and applyTo so each tool scopes the rule identically.

What frontmatter fields do AI coding agent rules need?▼

Rules need description for Copilot and Cursor display, globs for Cursor auto-attach, paths as a YAML list for Claude Code, applyTo for Copilot's .github/instructions loading, and alwaysApply for Cursor. Use "**" patterns for always-apply rules.

When should I create a category subfolder in .agents/rules/?▼

Create a category subfolder only when two or more rules share a topic, such as backend/ or git/. Single cross-cutting rules stay flat in .agents/rules/. Folders are organizational only and do not affect how tools load the rules.

Why does the rule context get re-injected on every prompt?▼

Re-injection happens when the inject-context.sh script cannot resolve a session id from CLAUDE_SESSION_ID, Codex, or Copilot environment variables and falls back to the process id. Fix the session-id chain rather than changing the hook matcher.

Can Copilot read rules through a symlinked directory?▼

No, Copilot's github.com-hosted agent cannot resolve symlinks, which is why rule files physically live in .github/instructions/ as the real directory. The .agents/rules, .claude/rules, and .cursor/rules paths are symlinks pointing back to it.