From 3e71e9874beb0290d25c979b4f9737705aca18dd Mon Sep 17 00:00:00 2001 From: Michael Kantor <6068672+kantorcodes@users.noreply.github.com> Date: Thu, 27 Aug 2026 10:42:56 -0400 Subject: [PATCH] feat: add HOL Guard runtime safety skill --- README.md | 1 + skills/security/hol-guard/README.md | 11 +++++ skills/security/hol-guard/SKILL.md | 75 +++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 skills/security/hol-guard/README.md create mode 100644 skills/security/hol-guard/SKILL.md diff --git a/README.md b/README.md index 62aabc7..e3f5078 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ Cursor, and other Agent Skills clients. |---|---|---|---| | [secleak-check](skills/security/secleak-check/README.md) | Scan for secrets and repository risks. | `★★★☆☆` · 24 sessions | `npx skills add instructa/agent-skills --skill secleak-check` | | [package-security-check](skills/security/package-security-check/README.md) | Audit JavaScript supply-chain risks. | `★★★☆☆` · 20 sessions | `npx skills add instructa/agent-skills --skill package-security-check` | +| [hol-guard](skills/security/hol-guard/README.md) | Protect local coding-agent runtime workflows with HOL Guard. | `★☆☆☆☆` · 0 sessions | `npx skills add instructa/agent-skills --skill hol-guard` | ### Git diff --git a/skills/security/hol-guard/README.md b/skills/security/hol-guard/README.md new file mode 100644 index 0000000..9c521ea --- /dev/null +++ b/skills/security/hol-guard/README.md @@ -0,0 +1,11 @@ +# HOL Guard + +Protect a supported local coding-agent harness with HOL Guard before state-changing commands and tool calls. + +## Install + +```bash +npx skills add instructa/agent-skills --skill hol-guard +``` + +Use `-g` for a global install. See [SKILL.md](SKILL.md) for the fail-closed setup, dry-run, launch, and verification workflow. diff --git a/skills/security/hol-guard/SKILL.md b/skills/security/hol-guard/SKILL.md new file mode 100644 index 0000000..803dc43 --- /dev/null +++ b/skills/security/hol-guard/SKILL.md @@ -0,0 +1,75 @@ +--- +name: hol-guard +description: Protect local coding-agent harnesses with the HOL Guard runtime before state-changing commands and tool calls. Use when a supported agent may edit files, execute commands, call external tools or MCP servers, or perform destructive work that must fail closed when protection is unavailable. +--- + +# HOL Guard + +Use HOL Guard as a local runtime boundary around a supported coding-agent harness. It complements repository permissions, human review, tests, and service-side controls; it does not replace them. + +## Workflow + +1. Preserve the current workspace and native approval gates. Never read `.env` files to set this up. +2. Probe the real CLI: + +```bash +hol-guard --version +``` + +If it is missing and the user asked for runtime setup, prefer an isolated install: + +```bash +pipx install hol-guard +``` + +If `pipx` is unavailable, stop instead of silently changing the user's Python environment. + +3. Discover the supported harness and use only the exact identifier returned by HOL Guard: + +```bash +hol-guard status +hol-guard detect --json +``` + +Do not maintain a hard-coded harness list. If no supported harness is detected, stop before mutation-bearing work. + +4. Let Guard own setup and prove the protected launch path: + +```bash +hol-guard bootstrap +hol-guard install +hol-guard run --dry-run +``` + +If setup or dry-run fails, reports an unexpected mutation, or cannot prove protection, stop. Never fall back to launching the agent unprotected. + +5. Launch through Guard, then verify current protection: + +```bash +hol-guard run +hol-guard doctor --json +hol-guard status +``` + +Only claim protection when current command output proves it. + +6. Continue the original task with the project's own approvals, tests, and deployment controls still enabled. If Guard queues work, inspect it rather than bypassing it: + +```bash +hol-guard approvals +hol-guard approvals open +``` + +Approve or deny only after understanding the requested scope and risk. + +## Stop Conditions + +Stop before side-effecting work when: +- `hol-guard --version` is unavailable and installation is not authorized. +- `hol-guard detect --json` finds no supported harness. +- bootstrap, install, dry-run, doctor, or status cannot prove the protected path. +- the proposed workaround is a direct unprotected harness launch. + +## Verification + +Before reporting success, show evidence that the CLI is available, the harness came from runtime detection, dry-run succeeded, the real launch used `hol-guard run`, and doctor/status prove current protection. Keep native project and provider controls in force.