apply-artifacts

star 0

Safely parse and apply `## ARTIFACTS` blocks from planning outputs into repository files with strict path validation and atomic writes. Use when a workflow response contains artifact payloads (for PRD/PSD/master plan/feature plan/PR plan/change-review outputs) that must be written exactly as provided.

jefflyt By jefflyt schedule Updated 2/16/2026

name: apply-artifacts description: Safely parse and apply ## ARTIFACTS blocks from planning outputs into repository files with strict path validation and atomic writes. Use when a workflow response contains artifact payloads (for PRD/PSD/master plan/feature plan/PR plan/change-review outputs) that must be written exactly as provided.

Apply Artifacts

Apply planning artifacts deterministically and report exactly what changed.

Workflow

  1. Confirm input contains an ## ARTIFACTS section with one or more ### <relative/path> headers.
  2. Save the full planning output to a temporary input file.
  3. Run scripts/apply_artifacts.py against the target repository root.
  4. Return the script report verbatim.
  5. If validation fails, stop and ask for corrected artifacts.

Run

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
Install via CLI
npx skills add https://github.com/jefflyt/AI-Assisted_Workflow --skill apply-artifacts
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator