aiwg-regenerate-codexlisted
Install: claude install-skill jmagly/aiwg
# Regenerate Codex Context
Regenerate the Codex context file (`CODEX.md` or `~/.codex/instructions.md`) for OpenAI Codex integration. Performs an **intelligent merge** — preserving team-written content while updating AIWG context.
## Core Principle
**Team content is preserved. AIWG content is updated. Full injection used (Codex does not support @-link directives).**
## Important: No @-Link Support
Codex context files do not support `@filename` style includes. AIWG content is embedded directly using injection markers:
```markdown
<!-- BEGIN AIWG -->
[AIWG content]
<!-- END AIWG -->
```
This is different from other providers that use the hook file approach.
## Parameters
| Flag | Description |
|------|-------------|
| `--no-backup` | Skip creating backup file |
| `--dry-run` | Preview changes without writing |
| `--user-level` | Update `~/.codex/instructions.md` instead of project-level `CODEX.md` |
| `--migrate` | Extract injection to `AIWG-codex.md` and reference from CODEX.md (future-proofing) |
## Context File Locations
| Scope | Path | Use case |
|-------|------|----------|
| Project-level | `CODEX.md` | Project-specific AIWG context |
| User-level | `~/.codex/instructions.md` | User-wide context across all projects |
Default: project-level `CODEX.md`. Use `--user-level` for user-wide context.
## Execution Steps
### Step 1: Create Backup
Unless `--no-backup` specified, create `CODEX.md.backup-{YYYYMMDD-HHMMSS}`.
### Step 2: Analyze Existing Content
Read `C