/hermitd-laravel-forge:hatchfrom hermitd-laravel-forge
One-time Laravel Forge plugin setup wizard: installs the Forge PHP SDK into hermit-owned runtime space, verifies PHP/Composer prerequisites, and wires the estate scan into config.json. Run once per project after /hermitd:hatch.
Ships in hermitd-laravel-forge. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Idempotent setup wizard for the Laravel Forge plugin. Run after /hermitd:hatch has been completed.
Check whether .hermit/config.json exists.
If it does not:
Print this block and stop:
## ▶ Next step — type this now
/hermitd:hatch
I can't run setup wizards for you (they're operator-run by design).
After it finishes, come back and type `/hermitd-laravel-forge:hatch`.
If it does exist, run .hermit/bin/hermitd-run domain-hatch preflight hermitd-laravel-forge and parse the JSON verdict. Branch on action:
bootstrap_core / upgrade_core_package / upgrade_core_applied → tell the operator to run the next_steps commands in order, then stop. An older core prints the dashed form of these with a remedy instead: relay remedy and stop.
verify → say:
"hermitd-laravel-forge {self_version} is already installed. Reply 'verify' to re-run checks only, or 'full' to re-run the full wizard."
Use AskUserQuestion: "(verify / full)" — verify → skip to Step 4; full → continue from Step 2.
full → continue from Step 2.
error, or any domain-hatch command in this skill that prints error → tell the operator in plain words what its token means, then stop.
Check PHP version. Run php -r 'echo PHP_VERSION;' via Bash. Parse the output. If php is not found or the version is below 8.5.0, relay this and stop:
"PHP 8.5+ is required but not found (got: {version or 'not found'}).
- Docker: re-run
/docker-setupafter the core base image is updated to Ubuntu 26.04 (which ships PHP 8.5 natively). If the core base is still 24.04, the Docker path is blocked pending that upgrade.- Bare-metal: install
php8.5-cliandphp8.5-curl(or your distro's equivalent)."
Check Composer. Run composer --version. If not found, relay this and stop:
"Composer is not found. Install it from https://getcomposer.org/."
Install the Forge SDK into project space. The SDK goes into .hermit/forge-runtime/ (hermit-owned, isolated from your app's own composer.json/vendor/).
Run these Bash commands:
mkdir -p .hermit/forge-runtime
cp "${CLAUDE_PLUGIN_ROOT}/php/composer.json" .hermit/forge-runtime/composer.json
cp "${CLAUDE_PLUGIN_ROOT}/php/composer.lock" .hermit/forge-runtime/composer.lock
Idempotent install check: if .hermit/forge-runtime/vendor/ exists and the staged composer.lock content matches ${CLAUDE_PLUGIN_ROOT}/php/composer.lock, skip the install. Otherwise run:
composer install --no-dev --no-interaction --working-dir=.hermit/forge-runtime
If composer exits non-zero, surface the error. Common cause: egress blocked — packagist.org, repo.packagist.org, api.github.com, codeload.github.com must be reachable. In Docker, verify the DNS allowlist in DOCKER.md is present.
Credential verification belongs to forge.php check in Step 4. Do not read .env into context.
Tell the operator:
"Add your Forge API credentials to
.envin the project root:FORGE_API_TOKEN=your-forge-api-token FORGE_ORG=your-org-slug # optional if you have exactly one orgGet your token at https://forge.laravel.com/profile/api. Reply 'done' when set, or 'skip' to continue (credential check happens in Step 4)."
Use AskUserQuestion: "(done / skip)"
Read the consumer's .gitignore (this file is not a secret — only the .env content is). Check if .env and .env.* patterns are present. If missing, offer to add them:
.env
.env.*
Append any missing patterns via Edit.
Run: php ${CLAUDE_PLUGIN_ROOT}/php/forge.php check and branch on status. A policy_lift field lists .env lifts of the shipped deny tiers; mention it in the final report.
missing → tell the operator to add FORGE_API_TOKEN to .env and re-run Step 3.invalid → token found but API rejected it; tell the operator to check the token at https://forge.laravel.com/profile/api. If the token is freshly created, the API may be refusing this server's IP instead.unreachable → token present but the API could not be reached (network/egress blocked). In Docker, verify the DNS allowlist in DOCKER.md (forge.laravel.com). Re-run once connectivity is confirmed.ok → continue.If php is not found at this point: re-run Step 2.
Read .hermit/knowledge-schema.md.
Check for deploy-incident: in the file. If absent, append under ## Work Products:
- deploy-incident: per-failure deployment record with scrubbed log tail and resolution. Producer: forge-deploy skill on a failed terminal deploy status. location: compiled/deploy-incident-<site>-<YYYY-MM-DD>.md
Use Edit. Skip if already present (idempotent).
Re-read .hermit/config.json now — the wizard has been running since Step 1 and the on-disk file may have changed. Apply the merges below to that fresh copy.
Stamp version: set _hermit_versions["hermitd-laravel-forge"] to self_version from Step 1's preflight.
Merge the failed-deployment routine
Merge these entries into config.routines. A row matches a seeded entry when its full skill string (including arguments) or its id equals the seeded one's; preserve every field on a matching row. Create the array if absent. Append each entry with no matching row and leave all other config fields unchanged. No prompt is needed for these read-only analyses.
{"id": "hermitd-laravel-forge:forge-failed-deploys", "schedule": "5 9 * * *", "skill": "hermitd:reflect --check-id forge-failed-deploys --check hermitd-laravel-forge:forge-failed-deploys", "enabled": true}
Each routine owns its cadence and passes findings through reflection gates into the proposal pipeline.
Register runtime dir: ensure config.storage_drift exists and config.storage_drift.ignore is an array that includes "forge-runtime". If the key is absent, add "storage_drift": {"ignore": ["forge-runtime"]}. If the array exists but does not include "forge-runtime", append it. Skip if already present.
Write the updated config.json via Write tool (full file replacement for valid JSON).
If needs_target_question is true, ask with AskUserQuestion (header: "Visibility") — target_default at position 0 with (recommended): .local files (gitignored, operator-personal) / Committed files (shared with teammates). Then record it:
.hermit/bin/hermitd-run domain-hatch ensure-target hermitd-laravel-forge --target <choice>
Resolve the project settings target through .hermit/bin/hermitd-run domain-hatch preflight hermitd-laravel-forge. Map target (or target_default when absent): local to .claude/settings.local.json, committed to .claude/settings.json.
Run bun ${CLAUDE_PLUGIN_ROOT}/scripts/native-permissions.ts <resolved-settings-file>. It prints OK; {"status":"installed","deny_conflicts":[...]} means existing operator denies override those asks, so name them in the final report. On {"error":...}, surface the error and stop.
hermitd-laravel-forge {version} setup complete.
Installation summary:
✓ Prerequisite: hermitd {base_version} confirmed
✓ PHP 8.5+ found: {php_version}
✓ Composer found
✓ Forge SDK installed → .hermit/forge-runtime/vendor/
✓ .env: FORGE_API_TOKEN present, API check: ok
✓ .gitignore: .env covered
✓ knowledge-schema.md: deploy-incident type added (or already present)
✓ config.json: _hermit_versions stamped, hermitd-laravel-forge:forge-failed-deploys routine registered
Next steps:
- Run /hermitd:hermit-routines load to activate the daily estate scan.
- In Docker: the forge-runtime/ vendor is in your project tree (bind-mounted/persistent) — it survives container restarts.
Installed skills:
/hermitd-laravel-forge:forge-servers — list / detail / reboot servers
/hermitd-laravel-forge:forge-sites — list / detail sites
/hermitd-laravel-forge:forge-deploy — preview → approve → deploy
/hermitd-laravel-forge:forge-logs — read site / server / deployment logs
/hermitd-laravel-forge:forge-failed-deploys — daily estate scan (daily routine)
Security reminder: FORGE_API_TOKEN is in .env — verify it is gitignored before any git push.
Read by /hermitd:docker-security when the operator enables LAN containment + DNS policy.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
6 skills in this plugin
/forge-deployDeploy a site on Laravel Forge. Always surface-then-approve (preview-deploy first, then deploy with native approval). Watches via the hermit /watch registry and writes a deploy-incident on failure. Triggers on "deploy", "trigger deployment", "deploy site", "run deployment", "check deployment status"./forge-failed-deploysRoutine check: scans the Forge estate for sites whose latest deployment is in a failure state. Runs daily via its own routine; findings are routed through the proposal pipeline as Evidence Source: scheduled-check/forge-failed-deploys./forge-logsRead site deployment logs, server logs, site application/nginx logs, background process logs, and specific deployment logs from Laravel Forge. Includes a triage mode that bundles recent logs with deployment history for rapid incident analysis. Triggers on "show logs", "read logs", "deployment log", "server log", "what happened to the deployment", "triage failing site".npx claudepluginhub gtapps/hermitd --plugin hermitd-laravel-forgeOther plugins' skills for the same job