Project Setup
Create or refresh project instruction files from verified repository facts.
This skill curates existing content; it does not blindly replace hand-authored
instructions.
Safety Rules
- Read existing
AGENTS.md, CLAUDE.md, GEMINI.md, and .claude/rules/
before writing.
- Preserve unmanaged content and GitNexus-managed blocks.
- Do not run destructive commands, migrations, seeders, live tests, or network
calls as discovery.
- Use safe probes only: manifest reads,
--help, --version,
pytest --co, cargo test --no-run, go test -list, or equivalent
non-mutating checks.
- Create physical backups before writing.
- Never run this skill concurrently from multiple agents against the same repo.
- Treat rollback as an explicit user-requested operation.
Modes
| Mode |
Behavior |
| default |
Merge with existing content and refresh stale managed sections. |
--dry-run |
Explore and show proposed diffs; write nothing. |
--force |
Regenerate managed sections while preserving unmanaged content. |
--codex |
Include Codex-compatible project instructions where appropriate. |
--no-memorymaster |
Skip MemoryMaster context. |
--rollback |
Restore from setup-created backups only after user confirmation. |
Fast Flow
- Detect whether a
<!-- project-setup:YYYY-MM-DD --> marker already exists.
- Back up existing instruction files into
docs/backups/.
- Read existing instructions fully and classify content:
- stack, commands, tests, and verification as managed
- architecture, boundaries, deployment, security, and team notes as
preserved unmanaged content unless clearly stale
- Explore manifests, top-level structure, test/lint/build config, CI, and
safe command availability.
- Query MemoryMaster unless update mode or
--no-memorymaster is active.
- Derive project scope once, then preserve it on later reruns.
- Write or preview:
AGENTS.md as canonical cross-provider instructions
CLAUDE.md as Claude-specific pointer to AGENTS.md
- optional
GEMINI.md / .gemini/settings.json
- optional scoped
.claude/rules/ only when evidence supports them
- Verify generated files exist, managed markers are present, and no preserved
content was silently dropped.
References
Load references/full-process.md when you need the full legacy template,
section mapping table, example generated blocks, or intelligence-layer details.
Output
PROJECT SETUP SUMMARY
Mode: <default|dry-run|force|rollback>
Files changed: <paths>
Backups: <paths>
Verified facts:
- <commands/manifests checked>
Skipped:
- <unsafe or unavailable checks>
Open questions:
- <none or questions>
1---2name: project-setup3description: Generate or refresh project AGENTS.md, CLAUDE.md, and optional GEMINI.md from real codebase evidence. Use when agent instructions are missing, stale, or need provider alignment.4---56# Project Setup78Create or refresh project instruction files from verified repository facts.9This skill curates existing content; it does not blindly replace hand-authored10instructions.1112## Safety Rules1314- Read existing `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, and `.claude/rules/`15 before writing.16- Preserve unmanaged content and GitNexus-managed blocks.17- Do not run destructive commands, migrations, seeders, live tests, or network18 calls as discovery.19- Use safe probes only: manifest reads, `--help`, `--version`,20 `pytest --co`, `cargo test --no-run`, `go test -list`, or equivalent21 non-mutating checks.22- Create physical backups before writing.23- Never run this skill concurrently from multiple agents against the same repo.24- Treat rollback as an explicit user-requested operation.2526## Modes2728| Mode | Behavior |29| --- | --- |30| default | Merge with existing content and refresh stale managed sections. |31| `--dry-run` | Explore and show proposed diffs; write nothing. |32| `--force` | Regenerate managed sections while preserving unmanaged content. |33| `--codex` | Include Codex-compatible project instructions where appropriate. |34| `--no-memorymaster` | Skip MemoryMaster context. |35| `--rollback` | Restore from setup-created backups only after user confirmation. |3637## Fast Flow38391. Detect whether a `<!-- project-setup:YYYY-MM-DD -->` marker already exists.402. Back up existing instruction files into `docs/backups/`.413. Read existing instructions fully and classify content:42 - stack, commands, tests, and verification as managed43 - architecture, boundaries, deployment, security, and team notes as44 preserved unmanaged content unless clearly stale454. Explore manifests, top-level structure, test/lint/build config, CI, and46 safe command availability.475. Query MemoryMaster unless update mode or `--no-memorymaster` is active.486. Derive project scope once, then preserve it on later reruns.497. Write or preview:50 - `AGENTS.md` as canonical cross-provider instructions51 - `CLAUDE.md` as Claude-specific pointer to `AGENTS.md`52 - optional `GEMINI.md` / `.gemini/settings.json`53 - optional scoped `.claude/rules/` only when evidence supports them548. Verify generated files exist, managed markers are present, and no preserved55 content was silently dropped.5657## References5859Load `references/full-process.md` when you need the full legacy template,60section mapping table, example generated blocks, or intelligence-layer details.6162## Output6364```text65PROJECT SETUP SUMMARY66Mode: <default|dry-run|force|rollback>67Files changed: <paths>68Backups: <paths>69Verified facts:70 - <commands/manifests checked>71Skipped:72 - <unsafe or unavailable checks>73Open questions:74 - <none or questions>75```