$npx -y skills add krzysztofsurdy/code-virtuoso --skill agentic-rules-writerInteractive tool to generate tailored rules and instruction files for any AI coding agent. Use when the user asks to set up agent rules, configure Claude Code instructions, create Cursor rules, write Windsurf rules, generate Copilot instructions, or establish consistent AI coding
| 1 | # Agentic Rules Writer |
| 2 | |
| 3 | Generate a tailored rules/instruction file for any AI coding agent. Runs an interactive questionnaire, pulls the installed-skill and agent inventory from the `using-ecosystem` meta-skill, and writes the output in the correct format and location for the chosen agent and scope. |
| 4 | |
| 5 | ## When to Use |
| 6 | |
| 7 | - Setting up a new AI coding agent for the first time |
| 8 | - Creating team-shared project rules for consistent behavior across developers |
| 9 | - Adding personal dev-specific rules to a project (gitignored) |
| 10 | - After installing new skills to update the rules file with skill references |
| 11 | |
| 12 | ## Quick Start |
| 13 | |
| 14 | ``` |
| 15 | /agentic-rules-writer claude |
| 16 | /agentic-rules-writer cursor |
| 17 | /agentic-rules-writer codex |
| 18 | /agentic-rules-writer # asks which agent |
| 19 | ``` |
| 20 | |
| 21 | --- |
| 22 | |
| 23 | ## Phase 1: Agent Selection |
| 24 | |
| 25 | If `$ARGUMENTS` is provided, map it to an agent from the table below (case-insensitive, partial match OK — e.g. "wind" matches Windsurf). If no argument or no match, present a selectable menu using `AskUserQuestion` (or the agent's equivalent interactive prompt tool). |
| 26 | |
| 27 | ### Tier 1 — Full support with dedicated format/paths |
| 28 | |
| 29 | | Agent | Format Notes | |
| 30 | |---|---| |
| 31 | | Claude Code | Plain Markdown, keep under 200 lines | |
| 32 | | Cursor | Requires YAML frontmatter: `alwaysApply: true`, `.mdc` extension | |
| 33 | | Windsurf | Plain Markdown, enforce under 12,000 characters | |
| 34 | | GitHub Copilot | Plain Markdown, `.github/copilot-instructions.md` | |
| 35 | | Gemini CLI | Plain Markdown | |
| 36 | | Roo Code | Plain Markdown | |
| 37 | | Amp | Same format as Claude Code | |
| 38 | | Codex (OpenAI) | Plain Markdown, uses `AGENTS.md` convention | |
| 39 | | Cline | Plain Markdown | |
| 40 | | OpenCode | Plain Markdown | |
| 41 | | Continue | Plain Markdown | |
| 42 | | Trae | Plain Markdown | |
| 43 | |
| 44 | ### Tier 2 — Supported with generic Markdown format |
| 45 | |
| 46 | | Agent | Format Notes | |
| 47 | |---|---| |
| 48 | | Goose | Plain Markdown | |
| 49 | | Augment | Plain Markdown | |
| 50 | | Kilo Code | Plain Markdown | |
| 51 | |
| 52 | ### Other / Universal |
| 53 | |
| 54 | For any agent not listed: write plain Markdown to a user-specified path. Ask the user for the output path. |
| 55 | |
| 56 | See [references/agent-targets.md](references/agent-targets.md) for full details on each agent's format, paths, limits, and testing instructions. |
| 57 | |
| 58 | --- |
| 59 | |
| 60 | ## Phase 2: Scope Selection |
| 61 | |
| 62 | Present a selectable menu (using `AskUserQuestion` or the agent's equivalent) to ask the user which scope to generate rules for: |
| 63 | |
| 64 | | Scope | Description | Typical Path (Claude Code example) | |
| 65 | |---|---|---| |
| 66 | | **Global** | User-level rules applied to every project. Personal workflow preferences. | `~/.claude/CLAUDE.md` | |
| 67 | | **Project (team-shared)** | Committed to the repo. Shared conventions the whole team follows. | `.claude/rules/team-rules.md` | |
| 68 | | **Project (dev-specific)** | Local to this dev, gitignored. Personal preferences layered on top of team rules. | `.claude/rules/dev-rules.md` | |
| 69 | |
| 70 | See [references/agent-targets.md](references/agent-targets.md) for the exact path for each agent + scope combination. |
| 71 | |
| 72 | **If the target file already exists**, present a selectable menu to ask the user: |
| 73 | 1. **Overwrite** — replace entirely with generated content |
| 74 | 2. **Merge** — append generated content below existing content (separated by `---`) |
| 75 | 3. **Abort** — cancel and leave the file untouched |
| 76 | |
| 77 | --- |
| 78 | |
| 79 | ## Phase 3: Workflow Questionnaire |
| 80 | |
| 81 | **IMPORTANT: Always present questions using a structured interactive menu, never as plain text.** If `AskUserQuestion` is available, use it. Otherwise, use whatever equivalent interactive prompt tool the agent CLI provides. The goal is a selectable option list, not a wall of text the user has to parse and type answers to. Batch up to 4 independent questions per call when the tool supports it. If a question has more than 4 options, present the most common 4 and let the "Other" / free-text fallback cover the rest. |
| 82 | |
| 83 | Wait for the user's answers before proceeding to the next batch. |
| 84 | |
| 85 | ### Scope Matrix |
| 86 | |
| 87 | Which questions to ask depends on the scope: |
| 88 | |
| 89 | | # | Question | Group | Global | Team-shared | Dev-specific | |
| 90 | |---|---|---|---|---|---| |
| 91 | | Q1 | Primary stack | A: Project Context | Yes | Yes | Skip | |
| 92 | | Q2 | Directory structure | A: Project Context | Yes | Yes | Skip | |
| 93 | | Q3 | Build/run commands | A: Project Context | Yes | Yes | Skip | |
| 94 | | Q4 | Code quality bar | B: Code Standards | Yes | Yes |