Dayz add scaffold

From DayZ-n-Chill/Agentic-Z · View interactive version

Dayz add scaffold is an AI agent skill from the GitHub repository DayZ-n-Chill/Agentic-Z. Adds missing DayZ mod scaffold pieces (config.cpp, $PBOPREFIX$, Workbench gproj, README, folders) to a folder already in workspace/ without overwriting files, and can create its P:\\ link. Use when a workspace mod lacks scaffold pieces or its P: link, such as a hand-cloned or older mod.

How to use this skill

Skill file

<!-- skill-dir-note -->

Path note: <skill-dir> in commands below is the absolute path of this skill's folder. When the agent loads this skill the harness exposes the skill's base directory; substitute it before running. Sibling skills are reached via <skill-dir>\..\dayz-X\.

/dayz-add-scaffold

Companion to /dayz-new-mod. Where dayz-new-mod creates a fresh project from nothing, dayz-add-scaffold fills missing scaffold pieces into a folder that already exists, without touching anything already there.

Use this when:

The mod folder is workspace/<ModName>/ in the project cached by /dayz-init, the same project /dayz-build-pbo uses, so the skill works from any subfolder of it.

Follow skills/_shared/dayz-conventions.md.

How to run

python "<skill-dir>\add_scaffold.py" <ModName> [--piece config|prefix|workbench|readme|skeleton|junction|all] [--author "YourHandle"]

| Argument | Required? | Notes |

|---|---|---|

| <ModName> | yes | Folder name under workspace/. The folder must already exist (real or a link). Same [A-Za-z][A-Za-z0-9_]{0,63} pattern as /dayz-new-mod. |

| --piece | no | Default all = scan and add only missing file pieces. Pick one to scaffold a single piece even if others are missing. junction is never part of all. |

| --author | no | Author handle for config.cpp and README.md. Same resolution chain as /dayz-new-mod: flag → cache (.claude/local-memory/dayz-author.txt) → interactive prompt → fail. A handle from the flag or the prompt is saved to that cache once the pieces are written, so later runs (including ones without a TTY) reuse it. Resolved once, before any piece is written, and only when config.cpp or README.md is about to be written; if no handle is available (no flag, no cache, no TTY) the skill exits 1 with the folder untouched. A handle containing " or a line break is refused, since it is written inside a quoted config.cpp string. |

Pieces

| Piece | What it writes | When |

|---|---|---|

| config | config.cpp (CfgPatches + CfgMods stub) | only if missing |

| prefix | $PBOPREFIX$ (contains <ModName>) | only if missing. An existing file that does not hold <ModName> (BOM and surrounding whitespace ignored), or is not UTF-8 text, is left unchanged with a [WARN] that /dayz-build-pbo will refuse it, and counted as needing fixing by hand. |

| workbench | workbench/dayz.gproj (vanilla copy + injected mod paths + dual FileSystem mounts) and workbench/DayZSetting.xml | gproj only if missing; xml only if missing. Skipped with a warning (and counted as skipped) when workbench/dayz.gproj is missing and cannot be written: DayZ Tools is not detected, or its Bin\Workbench\dayz.gproj is missing (the xml may still be copied). When workbench/dayz.gproj is already present and only the xml cannot be copied, the piece counts as present, with a [WARN] about the missing xml. |

| readme | README.md (light onboarding notes) | only if missing |

| skeleton | scripts/3_Game/, scripts/4_World/, scripts/5_Mission/, data/, gui/ (each with .gitkeep) | each subfolder only if missing. A file sitting where one of these folders (or scripts/) belongs is left unchanged with a [WARN] <name> exists as a file, not a folder; the other folders are still created and the piece counts as needing fixing by hand. |

| junction | the P:\<ModName>\ link to workspace/<ModName>/ (symlink, junction fallback; the same code /dayz-new-mod uses) | only if missing. Refuses if P:\<ModName>\ is a real folder or a link pointing anywhere else. |

| all | runs config, prefix, workbench, readme, skeleton in that order (not junction) | default |

Wrong kind of entry: when config.cpp, $PBOPREFIX$, README.md, workbench/dayz.gproj or workbench/DayZSetting.xml exists as a folder, or workbench exists as a file, the skill leaves it unchanged, prints [WARN] <name> exists as a folder, not a file (or the reverse) and counts the piece as needing fixing by hand.

Whatever piece you pick, the skill is idempotent: a second run on the same folder writes nothing.

--piece junction output, first run then second run:

[OK]    P:\MyMod junction -> workspace\MyMod
[SKIP]  P:\MyMod present (links to workspace\MyMod)

The first line says symlink instead of junction when Windows allows symlinks (Developer Mode or an elevated shell).

Refuses to run if

Output

Pieces run in the order config, prefix, workbench, readme, skeleton. Example on a folder that already has config.cpp and README.md:

DayZ preflight
... (preflight output)
Preflight complete.

Scaffolding workspace\MyMod\

[SKIP]  config.cpp present
[OK]    $PBOPREFIX$ written
[OK]    workbench/dayz.gproj written (mod paths + filesystem mounts injected)
[OK]    workbench/DayZSetting.xml copied
[SKIP]  README.md present
[OK]    Skeleton folders created (3 added, 2 already present)

[OK]    3 piece(s) added, 2 already present, 0 skipped.

A piece counts as skipped when it is missing but cannot be written, such as workbench when DayZ Tools is not detected (no empty workbench/ folder is created in that case). When the one piece named with --piece is skipped, the skill ends with [FAIL] <piece> was not written and exits 1, so callers can tell nothing was written; with all, skipped pieces are counted in the summary and the exit stays 0.

A piece needs fixing by hand when it is present but holds content a later skill refuses (a $PBOPREFIX$ that does not hold <ModName>), or when a file sits where a folder belongs or the reverse (for example a file named scripts). Nothing is changed. --piece <piece> then ends with [FAIL] <piece> is present but wrong and exits 1; with all, the summary adds , 1 need fixing by hand and the exit stays 0.

The summary line is tagged [OK] only when no piece was skipped or needs fixing; otherwise it is tagged [WARN], for example:

[WARN]  4 piece(s) added, 0 already present, 1 skipped.

If everything is already present:

[OK]    Nothing to add - workspace\MyMod is already fully scaffolded.

--piece junction checks only the link, so it ends with a line about the link instead:

[OK]    P:\MyMod link already in place.

What it does not do

Do not

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.