Intelligence add rule
Skill ainova-systems/intelligence-sync/intelligence/sync/skills/intelligence-add-rule
Single source of truth for AI coding rules across Claude Code, Cursor, Copilot, Codex, and more. Write once, sync everywhere.
npx -y skills add ainova-systems/intelligence-sync --skill intelligence-add-ruleAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Create new intelligence rule
SKILL.md
3.1 KB, as published. Nobody here has run it
Add Rule
Steps
-
Determine rule name from domain (the scope is required):
- Reuse the existing domain when one fits: list
intelligence/rules/. If a rule file covers the target area (e.g.,backend.md,frontend.md), extend it. Introduce a new domain only when the scope is materially different from all existing rules. - When no existing rule fits, derive the filename from repo structure:
- Single / root project → use the project codename from
intelligence/config.yaml→project.name(e.g.,<codename>.md) - Backend service / API component →
backend.md - Frontend / web / UI component →
frontend.md - Infrastructure, IaC, CI/CD, deployment →
devops.md - Shared library / common / cross-cutting code →
core.md - Test suites (e2e, integration) →
tests.md - Always-loaded global context →
context.md
- Single / root project → use the project codename from
- If the repo is a monorepo with named components (e.g.,
apps/billing,services/auth), prefer the component name as the rule name (billing.md,auth.md). - Rule filenames match the domain used by skills/agents. If the scope is unclear, ask the user before proceeding.
- Reuse the existing domain when one fits: list
-
Check existing rules: Read
intelligence/rules/to detect overlapping scope — favor extending an existing rule over creating a new one. -
Determine scope:
- If paths glob provided — scoped rule with
paths:frontmatter - If no paths — always-loaded rule (no
paths:in frontmatter)
- If paths glob provided — scoped rule with
-
Analyze codebase: Read source files matching the scope to extract:
- REQUIRED patterns (conventions consistently followed across the codebase — judgment calls expressed as positive defaults)
- Invariants (true must-nots — safety, output format, security; not judgment calls)
- Architecture patterns (layer dependencies, module structure)
- Build and test commands specific to this scope
- Anti-patterns observed in code, each paired with the positive replacement that should adopt instead
-
Create rule: Write
intelligence/rules/<name>.md:--- paths: - "<glob-pattern>" --- -
Write body with sections: REQUIRED → Invariants → Architecture → Build & Test → Examples → Patterns to recognize and replace (optional)
- Lead with REQUIRED (positive defaults) — the LLM follows the positive instruction first
- Reserve Invariants for true must-nots — security, safety, output format. Use absolute language (MUST / NEVER) only here, never for judgment calls
- Patterns to recognize and replace is reference documentation of anti-patterns paired with positive replacements — readers recognize the pattern, apply the replacement
- Examples come from the actual codebase — reference real files
- Every REQUIRED / Invariant / Pattern is backed by observed code
-
Update config.yaml if needed: Add source path to
sources.rulesif rule is in a new directory not yet listed. -
Run
/intelligence-syncto distribute to all enabled IDE targets.