skills/.system/fusion-rule-author/SKILL.md
Support skill providing the workflow, templates, and references for AI coding assistant rule authoring. Invoked by fusion-rules gateway agents — not intended for direct use.
npx skillsauth add equinor/fusion-skills fusion-rule-authorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Canonical workflow, templates, and references for authoring AI coding assistant rules. Supports GitHub Copilot, Cursor, and Claude Code.
Internal skill. Users interact via the
fusion-rulesgateway, which routes to editor-specific agents that follow the workflow defined here.
This skill provides:
assets/) — starter files for each editor formatreferences/) — tech-stack examplesIt does not provide agents. Agents live in fusion-rules/agents/ and reference this skill's assets and workflow.
Check the repository for existing rule files:
.github/copilot-instructions.md
.github/instructions/*.instructions.md
.cursor/rules/*.md
.cursor/rules/*.mdc
.cursor/rules/**/*.md
.cursor/rules/**/*.mdc
CLAUDE.md
.claude/CLAUDE.md
.claude/rules/*.md
.claude/rules/**/*.md
Report what exists, what is missing, and whether updates or new files are needed.
Before interviewing, scan the repository for existing documentation and configuration that encodes conventions. Extract actionable directives from:
Documentation files:
README.md — project overview, setup instructions, tech stackCONTRIBUTING.md — code style, PR workflow, commit conventionsAGENTS.md, CLAUDE.md — existing AI instructionsdocs/adr/**, adr/**, docs/decisions/** — Architecture Decision Recordsdocs/**/*.md — any developer guides, onboarding docs, style guidesSECURITY.md — security policies and constraintsCODE_OF_CONDUCT.md — collaboration guidelines (rarely rule-relevant)Configuration files:
package.json / pyproject.toml / *.csproj — tech stack, scripts, dependenciestsconfig.json / jsconfig.json — language settings, strictnessbiome.json / .eslintrc* / .prettierrc* / ruff.toml / .editorconfig — formatting and linting rules.github/workflows/*.yml — CI checks, required validations, test commandsDockerfile / docker-compose.yml — runtime environmentMakefile / Justfile / Taskfile.yml — build and task commandsCode patterns (sample, do not exhaustively read):
src/index.*, src/main.*, app.*) — architecture patternsFor each source, extract:
Skip:
Present a summary of discovered conventions to the developer, organized by area, before proceeding to the interview.
Use the scan results to skip areas already well-documented. Ask focused questions only for gaps. Cover these areas one at a time:
For each area, present what the scan found and ask: "Is this accurate? Anything to add or correct?" Do not re-ask for information already captured.
For each convention that needs deeper context, use the follow-up questions in assets/creation-follow-up.md — purpose, exceptions, boundaries, voice.
Separate the gathered conventions into buckets:
GitHub Copilot:
| Bucket | Target file | When it activates |
|--------|-------------|-------------------|
| Always-on conventions | .github/copilot-instructions.md | Every Copilot interaction |
| Scoped conventions | .github/instructions/<name>.instructions.md | Only when matching files are open/referenced |
Cursor:
| Bucket | Target file | When it activates |
|--------|-------------|-------------------|
| Always-on conventions | .cursor/rules/<name>.mdc with alwaysApply: true | Every Cursor Agent session |
| Auto-attached conventions | .cursor/rules/<name>.mdc with globs | When matching files are in context |
| Agent-selected conventions | .cursor/rules/<name>.mdc with description only | When the Agent decides it is relevant |
| Manual conventions | .cursor/rules/<name>.mdc (no alwaysApply, no globs) | Only when @-mentioned in chat |
Claude Code:
| Bucket | Target file | When it activates |
|--------|-------------|-------------------|
| Always-on conventions | CLAUDE.md or .claude/CLAUDE.md | Every Claude Code session |
| Scoped conventions | .claude/rules/<name>.md with paths frontmatter | When Claude reads matching files |
| Unconditional rule | .claude/rules/<name>.md (no paths) | Every session (like always-on) |
Decision rule: If a convention applies to all files in the repo, it belongs in root / always-on instructions. If it applies only to specific paths or file types, create a scoped rule.
When targeting multiple editors, generate parallel files with equivalent content — do not duplicate guidance within a single editor's files.
Generate files using the templates in assets/:
GitHub Copilot:
assets/copilot-instructions-template.md as the starting structureassets/scoped-rule-template.md and fill in the correct applyTo glob patternCursor:
assets/cursor-rule-template.mdc and set frontmatter accordinglyClaude Code:
assets/claude-rule-template.md as the starting structure.claude/rules/ with paths frontmatterQuality rules (enforced during drafting):
applyTo / globs / paths glob patterns match the intended filesreferences/examples.md for concrete good and bad examplesassets/quality-checklist.md for the full checklistPresent the drafted files to the developer for review. For each file:
After approval, write the rule files to the repository. Create the .github/instructions/, .cursor/rules/, and/or .claude/rules/ directories as needed.
Confirm the final file list and paths before writing.
.github/copilot-instructions.md — root instructions file (created or updated).github/instructions/*.instructions.md — zero or more scoped instruction files.cursor/rules/*.mdc — zero or more Cursor rule files (when Cursor is targeted)CLAUDE.md or .claude/CLAUDE.md — project instructions (when Claude Code is targeted).claude/rules/*.md — zero or more Claude Code scoped rule files| Need | GitHub Copilot | Cursor | Claude Code |
|------|---------------|--------|-------------|
| Always-on coding conventions | copilot-instructions.md | .cursor/rules/*.mdc with alwaysApply: true | CLAUDE.md |
| File/path-specific guidance | .github/instructions/*.instructions.md | .cursor/rules/*.mdc with globs | .claude/rules/*.md with paths |
| Task-specific multi-step workflows | A skill (SKILL.md) | .cursor/rules/*.mdc (manual or agent-selected) | Skills / subagents |
| Agent routing and orchestration | Agent definitions (.agent.md) | .cursor/rules/*.mdc with description | Subagent configs |
| Simple project-wide instructions | copilot-instructions.md | AGENTS.md | CLAUDE.md |
Instructions and rules shape how the AI writes code. Skills define what it can do as structured tasks.
Never:
Always:
**/* captures everything)references/examples.md — concrete examples for different tech stacksassets/creation-follow-up.md — per-rule follow-up questions (purpose, exceptions, boundaries, voice)assets/frontmatter-scenarios.md — scenario-based frontmatter guide for GitHub Copilot, Cursor, and Claude Codeassets/copilot-instructions-template.md — starter template for root instructionsassets/scoped-rule-template.md — starter template for scoped rulesassets/cursor-rule-template.mdc — starter template for Cursor rulesassets/claude-rule-template.md — starter template for Claude Code rulesassets/quality-checklist.md — quality review checklisttools
Use Fusion DevTools CLI (fdev) for API testing, token acquisition, service discovery, and person lookup during development. USE FOR: calling Fusion REST APIs, getting access tokens as JSON, discovering services and environments, resolving persons, PIM role activation. DO NOT USE FOR: modifying backend service code, deploying services, infrastructure changes, CI/CD pipeline configuration, or Service Bus operations.
testing
Main Copilot skill gate for the Fusion ecosystem — cross-domain router. USE FOR: routing between different Fusion domains (skills, issues, PRs, reviews) when the right domain skill is unclear; getting install guidance for missing skills. DO NOT USE FOR: skill lifecycle operations (use fusion-skills directly), tasks where a specific Fusion skill is already active.
tools
Entrypoint for all Fusion skill lifecycle operations. USE FOR: finding, installing, updating, syncing, or greenkeeping skills; setting up skill automation; creating or authoring a new skill; reporting a bug with a skill. DO NOT USE FOR: resolving GitHub issues, reviewing PRs, planning task breakdowns, or authoring GitHub issues — those are handled by other Fusion skills.
tools
Creates or modernizes repository skills with clear activation cues, purposeful support files, and practical review loops. USE FOR: creating a new skill, tightening an existing skill, improving discovery wording, and structuring references/assets/optional helper agents when they genuinely add value. DO NOT USE FOR: product-code changes, routine copy edits outside skills/, or documentation that should not become an installable skill.