Apply Artifacts
Apply planning artifacts deterministically and report exactly what changed.
Workflow
- •Confirm input contains an
## ARTIFACTSsection with one or more### <relative/path>headers. - •Save the full planning output to a temporary input file.
- •Run
scripts/apply_artifacts.pyagainst the target repository root. - •Return the script report verbatim.
- •If validation fails, stop and ask for corrected artifacts.
Run
bash
python3 "$HOME/.codex/skills/apply-artifacts/scripts/apply_artifacts.py" \ --input /tmp/artifacts-input.md \ --root /path/to/repo
Use --check to validate without writing files.
Rules
- •Write only files listed under
## ARTIFACTS. - •Require relative paths only.
- •Reject path traversal (
../,..\\), home shortcuts (~/), absolute paths, URL-like paths, and duplicate artifact targets. - •Create parent directories when needed.
- •Replace file contents atomically.
- •Do not rewrite or "improve" artifact content.
Output
Expect Markdown sections:
- •
Applied Artifacts - •
Directories Created - •
Warnings - •
Notes
References
- •Artifact format and edge-case guidance:
references/artifact-format.md