$npx -y skills add neuromechanist/research-skills --skill install-user-instructionsInstall, update, or audit general user-level AI coding instructions across Claude Code, OpenAI Codex, GitHub Copilot CLI, and Cursor. Use when the user asks to set up global instructions, personal AGENTS.md or CLAUDE.md defaults, configure instructions for multiple agent systems,
| 1 | # Install User Instructions |
| 2 | |
| 3 | Install shared personal defaults at each selected system's supported user |
| 4 | surface without overwriting custom content or copying global rules into every |
| 5 | repository. |
| 6 | |
| 7 | ## Workflow |
| 8 | |
| 9 | 1. Detect available systems with read-only checks (`command -v` plus existing |
| 10 | target files). Do not infer that every detected system should be modified. |
| 11 | 2. Ask the user which of Claude Code, Codex, Copilot CLI, and Cursor to |
| 12 | configure. This selection is required before any user-home write. |
| 13 | 3. Read `references/platform-paths.md` for the selected systems. Resolve |
| 14 | documented home overrides before default paths. |
| 15 | 4. Choose the instruction content: |
| 16 | - use `assets/global-instructions.md` for the project defaults; |
| 17 | - use a user-supplied file with `--template` when requested; |
| 18 | - never silently copy a repository's project-specific instructions into |
| 19 | user scope. |
| 20 | 5. Run `scripts/install_user_instructions.py --systems <csv>` without |
| 21 | `--apply`. This is the mandatory dry-run and diff preview. |
| 22 | 6. Show every destination and diff. For Cursor, show the copy/paste block for |
| 23 | **Cursor Settings > Rules**; do not invent a filesystem destination. |
| 24 | 7. Ask for confirmation of the exact selected destinations and changes. |
| 25 | 8. After confirmation, rerun with `--apply`. Writing outside the workspace may |
| 26 | require the runtime's normal filesystem approval. |
| 27 | 9. Verify each selected system using the command or UI check in |
| 28 | `references/platform-paths.md`. |
| 29 | 10. Audit the current repository for duplicated general rules. Report exact |
| 30 | duplicates or conflicts, but remove project content only with separate |
| 31 | user approval. |
| 32 | |
| 33 | ## Non-destructive contract |
| 34 | |
| 35 | - Manage only the block between |
| 36 | `<!-- research-skills:global-instructions:start -->` and |
| 37 | `<!-- research-skills:global-instructions:end -->`. |
| 38 | - Preserve all content outside the managed block byte-for-byte. |
| 39 | - Fail on unmatched or repeated markers instead of guessing. |
| 40 | - Default to preview mode. `--apply` is required for writes. |
| 41 | - Write only explicitly selected systems. |
| 42 | - Keep Cursor manual until its official User Rules surface exposes a stable, |
| 43 | supported file path. |
| 44 | - Keep general personal defaults at user scope. Repository `AGENTS.md`, |
| 45 | `CLAUDE.md`, `.github/copilot-instructions.md`, and `.cursor/rules` contain |
| 46 | only project facts or system-specific/path-scoped deltas. |
| 47 | - Do not duplicate shared project rules in `CLAUDE.md`; import `AGENTS.md` and |
| 48 | append Claude-only deltas. |
| 49 | |
| 50 | ## Script examples |
| 51 | |
| 52 | Preview Claude, Codex, and Copilot targets: |
| 53 | |
| 54 | ```bash |
| 55 | uv run python scripts/install_user_instructions.py \ |
| 56 | --systems claude,codex,copilot |
| 57 | ``` |
| 58 | |
| 59 | Apply the approved preview: |
| 60 | |
| 61 | ```bash |
| 62 | uv run python scripts/install_user_instructions.py \ |
| 63 | --systems claude,codex,copilot --apply |
| 64 | ``` |
| 65 | |
| 66 | Preview Cursor's manual User Rules block: |
| 67 | |
| 68 | ```bash |
| 69 | uv run python scripts/install_user_instructions.py --systems cursor |
| 70 | ``` |
| 71 | |
| 72 | Use absolute paths to the skill script when the current working directory is |
| 73 | not this skill directory. |
| 74 | |
| 75 | ## Content policy |
| 76 | |
| 77 | The bundled defaults encode the central `agent-fanout` routing contract: |
| 78 | strongest-tier lead judgment, intermediate approved-plan elaboration, and |
| 79 | worker-tier implementation with explicit tests and gates. They also require |
| 80 | closing/removing completed one-off agents. |
| 81 | |
| 82 | Use semantic line breaks in prose source generally. GitHub issue and |
| 83 | pull-request bodies are the exception: keep each paragraph on one source line, |
| 84 | separate paragraphs with blank lines, and do not insert sentence- or |
| 85 | clause-level newlines inside a paragraph. |