Custom skills & hooks

The packaged skills are the base layer. Your team’s rituals — a pre-deploy gate, a compliance check, client release notes — become skills of your own and hooks on the loop.

Custom skills#

Each project can keep its own Boost skills in .larapilot/skills/ — committed with the code, registered with Boost automatically, built on the same larapilot:* commands. Ask for one in plain words:

Your agent
/larapilot-custom-skill "A pre-deploy gate we run before every production release:
nothing left in review, doctor healthy, quality green, then GO or NO-GO"
  1. Zoey interviews you in three rounds: one skill or a family; the slash name and the description Boost routes on; the personas, the rules, and the commands in order.
  2. She shows the draft SKILL.md — the same shape as a packaged skill.
  3. Sarah saves it with one command that validates it, writes it, mirrors it into every agent folder, and runs boost:update.
.larapilot/skills/acme-predeploy-gate/SKILL.md
---
name: acme-predeploy-gate
description: "Pre-deploy gate before a production release — GO or NO-GO. Use when someone says deploy, go live, or asks whether main is safe to ship."
---

# Acme — Pre-deploy gate

## Context
`php artisan larapilot:context acme-predeploy-gate` — read what `data.runtime.read` lists.

## Workflow
1. `larapilot:spec-list --status=REVIEW` and `--status="IN PROGRESS"` — anything listed → NO-GO.
2. `larapilot:doctor` — `data.healthy` false → NO-GO.
3. `larapilot:quality` — an `E_QUALITY` error → NO-GO.
4. `larapilot:metrics` — one scope line; then GO / NO-GO.

Stop at the first NO-GO. Never deploy, push, tag, or merge from this skill.
Terminal
php artisan larapilot:custom-skill-add --name=acme-predeploy-gate --file=SKILL.md
php artisan larapilot:custom-skill-list   # after git pull: registers the team's skills on this machine

A custom skill never replaces one it did not write: a larapilot-* name, or the name of a skill Boost ships, is refused. Remove one from the dashboard File manager, which removes its mirrors too.

Workflow hooks#

A story always moves through the same transitions — planned, started, task done, review, approved or sent back, released, shipped. Hooks attach your commands and skills to those moments, in .larapilot/hooks.yaml, committed so the team shares them:

.larapilot/hooks.yaml
hooks:
  task.done:
    before:
      - name: Tests
        run: php artisan test --compact
        timeout: 900
  spec.review:
    before:
      - name: Static analysis
        run: vendor/bin/phpstan analyse --no-progress
      - skill: acme-a11y-check
  spec.approved:
    after:
      - name: Deploy to staging
        run: curl -fsS -X POST "$FORGE_STAGING_DEPLOY_URL"
  ship:
    before:
      - skill: acme-predeploy-gate
EventFired byEventFired by
prd.writtenprd-writespec.reviewspec-review
spec.addedspec-addspec.approvedspec-approve
spec.plannedspec-planspec.changes_requestedspec-request-changes
spec.startedspec-startrelease.shippedrelease-ship
task.donetask-doneship/larapilot-ship
  • before runs after the command’s own checks and before anything is written; if it fails, the transition is refused and nothing changes (blocking: false only warns). after runs once the state is written, and only reports.
  • run: is run by Larapilot from the project root, with the event in LARAPILOT_HOOK_* variables and as JSON on stdin. skill: is run by the agent, which reports it before the transition goes through.
  • Gates an agent cannot skip. An instruction in a prompt can be forgotten; a hook runs inside the command.
  • Nothing runs until you say so. Install writes every example commented out, and hooks is off. A file with errors is a closed gate. Hooks run from Artisan only — never from the dashboard, the API, or MCP.
Terminal
php artisan larapilot:settings-set --hooks=YES
php artisan larapilot:hook-list
php artisan larapilot:hook-run task.done --phase=before --spec=US-001 --task=TASK-01 --dry-run