Skip to content

Cloud Agent environment — hooks and validation

Use this when configuring env-hoen-platform (or any Cloud Agent that commits to hoen-library).

Why pushes failed without local hooks

hoen-library CI runs on every PR:

  • node library-maintenance/scripts/validate.mjs (skill layout, radar blips)
  • lychee on all markdown (.lychee.toml) — catches bad relative links

Local husky hooks mirror part of that:

Hook Runs
commit-msg commitlint (Conventional Commits + 👓 body rules)
pre-push npm run validate:skills + npm run lint:links

Hooks exist only after npm install in the hoen-library root (prepare → husky). Agents that push without installing skip pre-push; CI still fails.

Common CI failure: markdown links to ../../skills/... instead of ../../library/skills/... (lychee file URLs).

After hoen-library is on disk (reuse your existing find_repo helper):

library="$(find_repo hoen-library)"
npm install --prefix "${library}"
node "${library}/library/skills/cloud-agent-ide-wiring/scripts/wire.mjs" --user --repo-self

Optional (match pre-push link check locally):

# Pin v0.24.2 to match CI — see AGENTS.md in hoen-library
command -v lychee >/dev/null 2>&1 || cargo install lychee --locked --version 0.24.2

Before commit / push (agent checklist)

From hoen-library root:

npm install          # ensures husky hooks
npm run validate:skills
npm run test:cloud-agent-ide-wiring
npm run lint:links   # needs lychee; skipped with hint if missing
git commit …         # commit-msg hook
git push             # pre-push hook

Shell vs Node scripts

Cloud Agent VMs provide bash for install hooks and one-liners. Prefer Node (.mjs) for wiring logic so behaviour is unit-tested; invoke via node …/wire.mjs from bash install scripts.

Future IDE targets (Claude Code, Copilot, Codex) share the same catalog path; use --all-ides when those agents should discover skills from the same pod.