<required_reading>
conventions.md— target repository layout
</required_reading>
From the user's target directory (or current directory):
python <skill-dir>/scripts/init.py --path . [--rhdh-url https://rhdh.example.com] [--json]The script:
- Checks required tools (
python3,git) - Reports recommended tools (
djlintfor Nunjucks — used byvalidate --lint-skeleton) - Scaffolds
templates/example-template/with startertemplate.yamlandskeleton/ - Creates root
location.yamlif missing - Optionally probes
GET /api/scaffolder/v2/actionswhen--rhdh-urlis set
Consume full JSON output when --json is passed. Do not pipe through head, tail, or grep.
| Exit code | Meaning |
|---|---|
| 0 | Ready — required tools present, layout scaffolded or already valid |
| 1 | Partial — layout created but optional tools or RHDH unreachable |
| 2 | Usage error |
If RHDH is unreachable, tell the user local authoring and validate still work; use list-actions / dry-run when connectivity is available.
Show:
- Which tools are missing (if any) and install hints
- Scaffolded paths
- RHDH connectivity status (if checked)
Ask whether to rename example-template or start templatize / create on the new layout.
Mention the recommended dev loop from best-practices.md: local validate → Template Editor (/create/edit) → dry-run when RHDH is reachable. Route to rhdh-local skill if the user wants a local RHDH instance.
<success_criteria>
init.pyexit code 0 or 1 with clear user messagingtemplates/directory exists with at least one template folder- Root
location.yamlexists with glob target./templates/**/template.yaml - User knows next command (
templatize,create, or incremental add-*)
</success_criteria>