Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05c56904cf |
No files matched your search
@@ -1,183 +0,0 @@
|
||||
# Enforcement hooks: what apm can ship, and portable alternatives
|
||||
|
||||
Research for holocron issue #168 (map #166, "Infra and agent-team packages"). Captured 2026-11-12.
|
||||
|
||||
**Question.** Can the infra package *enforce*, not just instruct, the map's safety stance? The stance
|
||||
blocks `kubectl apply/delete`, `helm upgrade`, unchecked `ansible-playbook`, `tofu apply`, vault
|
||||
decryption, and reads of vault password files unless a human has approved. If it can, through what
|
||||
mechanism?
|
||||
|
||||
**Short answer.** Partly. apm can ship one `PreToolUse`-style hook that reaches Claude Code,
|
||||
Copilot (CLI and cloud agent), Codex and Gemini CLI, and each of those can deny a shell command
|
||||
after inspecting its text. Only Claude Code and Copilot CLI can turn the block into an *ask*, which
|
||||
is a real human approval. Every provider documents its hooks as best-effort guardrails rather than a
|
||||
security boundary. Hooks see only the command text, so `sh -c`, a script the agent writes and then
|
||||
runs, or a Python subprocess gets past them. Real enforcement has to come from credentials the agent
|
||||
does not hold: a read-only kubeconfig, no apply credentials for tofu, an unreadable vault password
|
||||
file and branch protection. Use the hook as the fast, explainable first layer, not the boundary.
|
||||
|
||||
Sources were the installed apm 0.28.0 source (`apm_cli/`, read from the pipx venv), the apm docs,
|
||||
and each provider's official docs. Context7 was unavailable in this session (invalid API key), so
|
||||
every citation below is a primary source fetched directly.
|
||||
|
||||
---
|
||||
|
||||
## 1. What apm ships as a hook, and where it lands
|
||||
|
||||
**Authoring.** Hook files are JSON keyed by lifecycle event, in `.apm/hooks/` or a root `hooks/`.
|
||||
apm accepts the Claude shape (`PreToolUse`, nested `matcher` and `hooks`) and the Copilot shape
|
||||
(`preToolUse`, flat entries with `bash`/`powershell`/`timeoutSec`). `${PLUGIN_ROOT}` and
|
||||
`${CLAUDE_PLUGIN_ROOT}` resolve to the package root and are rewritten per target
|
||||
([apm: Hooks and commands](https://microsoft.github.io/apm/producer/author-primitives/hooks-and-commands/);
|
||||
`apm_cli/integration/hook_integrator.py` module docstring). kyberforge's `SessionStart` hook
|
||||
(`plugins/kyberforge/.apm/hooks/hooks.json`) is exactly this. apm merges it into
|
||||
`.claude/settings.json` with the command rewritten to
|
||||
`${CLAUDE_PROJECT_DIR}/.claude/hooks/kyberforge/.apm/hooks/check-apm-current.sh` (ADR-0019, and the
|
||||
deployed `.claude/settings.json`).
|
||||
|
||||
**Deployment per target** (apm docs table, confirmed against `_MERGE_HOOK_TARGETS` and
|
||||
`integration/targets.py`):
|
||||
|
||||
| Target | Deployed to | Mode | Notes from source (apm 0.28.0) |
|
||||
|---|---|---|---|
|
||||
| claude | `.claude/settings.json` | merged | Reshaped to the nested matcher schema, default matcher `*` (`_to_claude_hook_entries`). |
|
||||
| copilot | `.github/hooks/<pkg>-<name>.json` | one file per hook | Events renamed to camelCase, `version: 1` added (`hook_integrator.py` ~L1087). |
|
||||
| codex | `.codex/hooks.json` | merged | `require_dir=True`: skipped unless `.codex/` already exists. No event rename and no reshape (Codex uses Claude's names and shape). |
|
||||
| gemini | `.gemini/settings.json` | merged | `require_dir=True`. `PreToolUse` becomes `BeforeTool` and timeouts become milliseconds (`_to_gemini_hook_entries`). |
|
||||
| cursor | `.cursor/hooks.json` | merged | `require_dir=True`, `version: 1` added. **No entry in `_HOOK_EVENT_MAP` and no shape transform** (see section 4). |
|
||||
| opencode | none | skipped | "OpenCode has no hooks concept" (`targets.py`). |
|
||||
|
||||
**Executable-trust gate.** Hooks are an executable primitive. When the consuming `apm.yml` has an
|
||||
`executables:` block, a hook deploys only if the consumer approves it (`apm approve`). Without the
|
||||
block, every executable deploys silently (`apm_cli/security/executables.py` docstring; ADR-0019).
|
||||
That gate works in the safety stance's favour: a consumer can see, and has to approve, the guard
|
||||
hook.
|
||||
|
||||
**What apm does *not* ship:**
|
||||
|
||||
- Permission rules, sandbox settings, or any `settings.json` key other than `hooks`. No source path
|
||||
writes `permissions` or `sandbox`. A repo-authored key in `.claude/settings.json` is permanent
|
||||
`apm audit --ci` drift (ADR-0018, AGENTS.md).
|
||||
- Tool-name translation in matchers. A `"matcher": "Bash"` is written verbatim to every target, but
|
||||
the shell tool is `Bash` in Claude and Codex, `Shell` in Cursor
|
||||
([Cursor hooks](https://cursor.com/docs/agent/hooks)), and `run_shell_command` in Gemini
|
||||
([Gemini hooks reference](https://geminicli.com/docs/hooks/reference/)). Copilot's flat format
|
||||
has no matcher at all.
|
||||
- `bin/` on `PATH`. A package's `bin/` deploys at **user scope only**, for the Claude target only,
|
||||
into the skill directory's `bin/` (`skill_integrator.py` ~L1571–1670, "bin/ deploy is user-scope
|
||||
only"). It is not a channel for portable wrapper scripts.
|
||||
|
||||
## 2. Can a pre-tool hook inspect arguments and deny or ask? Per target
|
||||
|
||||
| Provider | Event | Sees the command? | Deny | Ask (human approval) | Failure mode |
|
||||
|---|---|---|---|---|---|
|
||||
| **Claude Code** | `PreToolUse` | `tool_input.command` | exit 2 (stderr is the reason) or `permissionDecision: "deny"` | **Yes**, `permissionDecision: "ask"` | Fails open on error or timeout unless `"onFailure": "block"`. Runs in subagents too. |
|
||||
| **Copilot CLI / cloud agent** | `preToolUse` (`PreToolUse` alias) | `toolArgs` (camelCase) or `tool_input` (PascalCase) | `permissionDecision: "deny"` | **CLI yes. Cloud agent treats `ask` as `deny`.** | Crashes and non-zero exits **fail closed**; timeouts fail open. |
|
||||
| **Copilot in VS Code** | `preToolUse` | `toolArgs` | `deny` | Documented only loosely | Preview. Also reads the repo's `.claude/settings.json` hooks. |
|
||||
| **Codex** | `PreToolUse` (covers shell and unified exec as `Bash`, plus `apply_patch` and MCP) | `tool_input.command` | exit 2 or `permissionDecision: "deny"` | **No**: `ask` is "parsed but not supported yet" and the tool call **continues** | Errors and timeouts can let the tool run. Project hooks are skipped until a human trusts them (hash-pinned). |
|
||||
| **Gemini CLI** | `BeforeTool` | `tool_input` (raw tool args) | exit 2 or `decision: "deny"`/`"block"` | Not documented | Other exit codes are non-fatal and the call continues. Project hooks are fingerprinted, with a warning on change. |
|
||||
| **Cursor** | `beforeShellExecution` / `preToolUse` | `command` / `tool_input.command` | exit 2 or `permission: "deny"` | `beforeShellExecution` yes. `preToolUse` accepts `ask` in its schema but does not enforce it. | Fails open by default; `failClosed: true` per hook. |
|
||||
| **OpenCode** | none | n/a | n/a | n/a | No hooks. |
|
||||
|
||||
Sources: [Claude Code hooks](https://code.claude.com/docs/en/hooks),
|
||||
[Copilot hooks reference](https://docs.github.com/en/copilot/reference/hooks-configuration),
|
||||
[VS Code agent hooks](https://code.visualstudio.com/docs/copilot/customization/hooks),
|
||||
[Codex hooks](https://learn.chatgpt.com/docs/hooks) (redirected from developers.openai.com),
|
||||
[Gemini CLI hooks](https://geminicli.com/docs/hooks/) and its
|
||||
[reference](https://geminicli.com/docs/hooks/reference/),
|
||||
[Cursor hooks](https://cursor.com/docs/agent/hooks).
|
||||
|
||||
**Every vendor says hooks are not a boundary.** Codex: "Treat tool hooks as a useful guardrail, not
|
||||
a complete enforcement boundary". Claude's `if` field docs: "use the permission system rather than a
|
||||
hook to enforce a hard allow or deny". Claude permissions: a Bash rule "isn't a security boundary
|
||||
around the program", and the docs point to the sandbox for enforcement that doesn't depend on the
|
||||
command text ([Claude permissions](https://code.claude.com/docs/en/permissions)).
|
||||
|
||||
**Exit code 2 plus a stderr reason is the lowest common denominator for deny.** Claude, Codex,
|
||||
Gemini and Cursor document it, and Copilot fails closed on any non-zero exit. A single script can
|
||||
therefore deny portably. Only *ask* differs per provider.
|
||||
|
||||
## 3. Portable alternatives where hooks don't reach
|
||||
|
||||
| Layer | Mechanism | Strength | apm-shippable? |
|
||||
|---|---|---|---|
|
||||
| Host permission rules | Claude `permissions.deny`/`ask` (`Bash(kubectl apply *)`, `Read(**/.vault_pass*)`). Deny, then ask, then allow; a hook `allow` cannot override a deny or ask rule. Compound commands and subshells are split. | Matches the text Claude writes. It "doesn't match the same program invoked in a different form" (path, `sh -c`). | **No.** Settings keys are not an apm primitive and would be drift in `.claude/settings.json`. Use managed settings, user settings or `settings.local.json`. |
|
||||
| Claude sandbox | `sandbox.filesystem.denyRead` on the vault password file, `allowUnsandboxedCommands: false`, `failIfUnavailable: true`. OS-level (bubblewrap/Seatbelt) and covers child processes. | Strong for file reads, whatever the command text. Command hooks and MCP servers run outside it. | No (settings). Claude only. |
|
||||
| Wrapper scripts on PATH | `kubectl`/`helm`/`tofu` shims that refuse mutating verbs. | Weak: bypassed by an absolute path, `command -p` or a different PATH. Breaks humans who share the PATH. | No portable channel (apm `bin/` is user-scope, Claude-only, not on PATH). **Not recommended.** |
|
||||
| pre-commit / pre-push | e.g. reject a committed file that should be vault-encrypted but lacks the `$ANSIBLE_VAULT` header. | Catches mistakes at commit time. Client-side and skippable with `--no-verify`. Cannot stop a runtime apply. | Out of scope for apm (`.pre-commit-config.yaml` in the infra repo). |
|
||||
| Kubernetes RBAC | Agent kubeconfig bound to the built-in `view` ClusterRole. "This role does not allow viewing Secrets, since reading the contents of Secrets enables access to ServiceAccount credentials" ([k8s RBAC](https://kubernetes.io/docs/reference/access-authn-authz/rbac/)). | **Boundary.** `kubectl apply/delete` and `helm upgrade` fail server-side, whatever the shell form. It also keeps the Sealed Secrets controller key out of reach. `kubectl diff` needs server-side dry-run, which may need more than `view` (not verified here). | No: infra and credential setup. |
|
||||
| Separate apply credentials | tofu: the agent gets plan-only or read-only provider and state credentials, and apply runs with credentials held by the human or CI. Ansible: no vault password and no privileged SSH key in the agent's environment. | **Boundary.** | No: infra and credential setup. |
|
||||
| Forge branch protection | The Flux-watched branch accepts only reviewed merges, and the agent's Gitea token cannot push or merge to it. | **Boundary** for the GitOps path. | No: Gitea settings. |
|
||||
|
||||
## 4. Gaps named per provider
|
||||
|
||||
- **Claude Code: best covered.** The hook deploys and is honoured, with argument-level deny and real
|
||||
`ask`. Gaps: the hook fails open on error unless `onFailure: block` is set. A user's
|
||||
`disableAllHooks` turns off project hooks, and only `allowManagedHooksOnly` with managed hooks
|
||||
prevents that. The permission rules and sandbox that would harden it are not apm-deliverable.
|
||||
- **Copilot CLI: well covered.** Deny and ask both work, and errors fail closed. On the **cloud
|
||||
agent** `ask` becomes `deny`, so HITL commands are simply blocked there, which is the correct
|
||||
outcome. **VS Code** reads both `.github/hooks/` and `.claude/settings.json`. A package installed
|
||||
for both `copilot` and `claude` targets therefore runs the guard twice in VS Code. That is
|
||||
harmless for a deny-only idempotent script, but noisy.
|
||||
- **Codex: deny only.** `ask` silently degrades to *allow* (the run is marked failed and the tool
|
||||
call continues). The script must therefore emit `deny` for HITL commands on Codex, never `ask`.
|
||||
apm skips the hook entirely unless `.codex/` exists, and Codex skips it until a human trusts it.
|
||||
A fresh install is unguarded until someone runs `/hooks` to review it.
|
||||
- **Gemini CLI: deny only, and the matcher does not translate.** A `Bash` matcher never fires on
|
||||
`run_shell_command`, so ship the hook with no matcher (or `*`) and dispatch inside the script. apm
|
||||
skips it unless `.gemini/` exists.
|
||||
- **Cursor: not reliably reachable through apm 0.28.0.** The installed source applies no event
|
||||
rename and no reshape for `cursor`, so a Claude-shaped `PreToolUse` entry lands verbatim in
|
||||
`.cursor/hooks.json`, while Cursor's native events are camelCase with a flat
|
||||
`{command, matcher}` schema. The apm docs say "Cursor accepts Claude aliases and maps them to
|
||||
native names". Cursor's docs say it "supports loading hooks from third-party tools like Claude
|
||||
Code", but the page fetched here did not detail the mapping. **I'm not certain this works.** Verify
|
||||
with a real Cursor install before claiming coverage. Even when it works, `preToolUse` does not
|
||||
enforce `ask` and fails open unless `failClosed: true`.
|
||||
- **OpenCode and other hookless targets: no hook layer.** Only the credential layers apply.
|
||||
|
||||
## 5. Recommended layered design
|
||||
|
||||
1. **Instructions (intent).** Infra skills state the stance and tell the agent to propose the
|
||||
command and stop. This costs nothing, but it is not enforcement.
|
||||
2. **One portable guard hook shipped by the infra package (fast feedback, best-effort).**
|
||||
- A single `.apm/hooks/` file on the `PreToolUse`/`preToolUse` event, **with no tool matcher**.
|
||||
The script normalises the payload (`tool_input.command`, `toolArgs`, `command`) and ignores
|
||||
non-shell tools.
|
||||
- **Always deny:** `kubectl apply|delete|patch|replace|edit|create`, `helm install|upgrade|
|
||||
uninstall|rollback`, `ansible-vault decrypt|view|edit|rekey`, `kubeseal --recovery-unseal`,
|
||||
and commands naming the vault password file.
|
||||
- **HITL** (`ansible-playbook` without `--check`/`-C`, `tofu apply|destroy`, `git push` to the
|
||||
Flux branch): emit `ask` where it is honoured (Claude Code, Copilot CLI) and `deny` everywhere
|
||||
else, with a reason telling the agent to hand the command to the human.
|
||||
- Signal the decision with **exit 2 plus stderr** as well as the JSON, so a provider that ignores
|
||||
the JSON still blocks. Keep the script POSIX `sh` and `jq`-optional.
|
||||
- Consumers approve it through the apm executable-trust gate (version-blind grant, ADR-0019
|
||||
correction).
|
||||
3. **Host hardening, documented and not shipped.** The package README or skill tells the operator
|
||||
what to set per provider. Claude: deny and ask rules, plus sandbox `denyRead` on the vault
|
||||
password file with `allowUnsandboxedCommands: false`, ideally in managed settings with
|
||||
`allowManagedHooksOnly` so the guard cannot be disabled. Codex: trust the hook after review.
|
||||
4. **Credentials (the actual boundary).** A `view`-role kubeconfig for agent sessions, apply
|
||||
credentials for tofu that the agent never holds, a vault password file that the agent's OS user
|
||||
cannot read, and an agent forge token without push or merge rights on the Flux branch. These hold
|
||||
whatever the shell form and on every provider, including hookless ones.
|
||||
5. **Repo gates.** The infra repo's pre-commit catches unencrypted secrets. Forge branch protection
|
||||
and CI catch what client hooks miss.
|
||||
|
||||
**Trade-off.** Layer 4 is outside apm and needs per-environment setup, so the package can document it
|
||||
but not install it. That is the price of actual enforcement. Layers 1–3 alone are bypassable by
|
||||
construction.
|
||||
|
||||
## 6. Open issue for the map: `--check` needs the vault
|
||||
|
||||
The stance allows `ansible-playbook --check --diff` freely but forbids reading vault password files.
|
||||
A playbook that loads vaulted variables needs the vault secret to run at all, check mode included.
|
||||
That is my understanding of Ansible's variable loading; I did not verify it against the Ansible docs
|
||||
in this pass. Any layer that truly stops the agent's processes reading the password file (sandbox
|
||||
`denyRead`, file permissions) will therefore also break the agent's check runs. The hook layer
|
||||
cannot tell the agent reading the file from Ansible reading it on the agent's behalf. Possible
|
||||
resolutions: run checks in CI, use a `--vault-password-file` client script that prompts the human,
|
||||
or accept that Ansible (not the agent) reads it and enforce only "no direct read or decrypt
|
||||
command". This needs a decision ticket on map #166.
|
||||
@@ -0,0 +1,244 @@
|
||||
# Existing published infra skills: depend, adapt, or author
|
||||
|
||||
**Question (#169, part of map #166):** What published, reusable agent skills, agents, rule sets and
|
||||
MCP servers already exist for Ansible (playbooks, collections, ansible-lint, Molecule), Flux /
|
||||
Kustomize / Helm GitOps, Kubernetes troubleshooting, and OpenTofu/Terraform? For each, what are the
|
||||
quality, licence, maintenance and format? Should holocron **depend** on it (as with `mattpocock`),
|
||||
**vendor/adapt** it, or **author** its own?
|
||||
|
||||
**Researched:** 2026-11-12. Licence, star counts, last push and tags come from the GitHub REST API
|
||||
(`/repos/{owner}/{repo}` and `/tags`) on that date. Skill format comes from the raw `SKILL.md`
|
||||
frontmatter. Other facts come from the vendor page cited next to them.
|
||||
|
||||
**Constraint applied:** target packages must be generic and provider-agnostic. The target stack is an
|
||||
Ansible playbook monorepo, an Ansible Galaxy collection tested with Molecule, Flux (Kustomize and
|
||||
HelmRelease) with Sealed Secrets, and OpenTofu later.
|
||||
|
||||
## Answer
|
||||
|
||||
| Area | Best existing candidate | Licence | Recommendation |
|
||||
|---|---|---|---|
|
||||
| Flux / Kustomize / Helm GitOps | `fluxcd/agent-skills` (official) | Apache-2.0 | **Depend**, pinned. **Author** a thin Sealed Secrets and house-conventions skill on top. |
|
||||
| Ansible (playbooks, collections, lint, Molecule) | `ansible-community/ai-forge` (community) | **GPL-3.0-or-later** | **Author our own.** Do not depend on or adapt ai-forge, because of the copyleft licence and its stated instability. |
|
||||
| Kubernetes troubleshooting | No official skill. MCP: `containers/kubernetes-mcp-server` | Apache-2.0 | **Author** one thin skill. The MCP server is an optional companion, and declaring it needs its own decision. |
|
||||
| OpenTofu / Terraform | `antonbabenko/terraform-skill`; `hashicorp/agent-skills` | Apache-2.0; **MPL-2.0** | **Defer** until OpenTofu work starts. Then **depend** on `antonbabenko/terraform-skill`, pinned. Do not adopt HashiCorp's set wholesale. |
|
||||
|
||||
**apm-installable** below means that `SKILL.md` directories sit at a stable repo subpath and the repo
|
||||
has git tags. That is the same shape apm already resolves for
|
||||
`mattpocock/skills/skills/engineering/<skill>#v1.3.2` in `plugins/mattpocock/apm.yml`. I inferred
|
||||
this from the layout and **did not run `apm install` against any of these repos**.
|
||||
|
||||
## Flux / Kustomize / Helm GitOps
|
||||
|
||||
### `fluxcd/agent-skills`: official, recommended to depend
|
||||
|
||||
- **Source:** <https://github.com/fluxcd/agent-skills>; documented at <https://fluxcd.io/flux/agent-skills/>
|
||||
(v2.10 docs, last modified 2026-07-02).
|
||||
- **Licence:** Apache-2.0 (GitHub API). Each `SKILL.md` also declares `license: Apache-2.0`.
|
||||
- **Maintenance:** Last push on 2026-11-03. Tags `v0.0.4` through `v0.4.0`, so it is still pre-1.0 and
|
||||
breaking changes are possible. 244 stars. The repo ships `tests/` and `benchmarks/` directories.
|
||||
- **Format:** Agent Skills `SKILL.md` under `skills/<name>/`, with `name`, `description`, `license`
|
||||
and `compatibility` frontmatter. It also ships Claude Code, Codex and Copilot plugin manifests, and
|
||||
a cosign-signed OCI artifact installed with `flux operator skills install ghcr.io/fluxcd/agent-skills`.
|
||||
It is apm-installable by subpath, for example `fluxcd/agent-skills/skills/gitops-knowledge#v0.4.0`
|
||||
(inferred, see above).
|
||||
- **Skills** (per fluxcd.io):
|
||||
- `gitops-knowledge`: Flux CRD YAML generation, checked against bundled OpenAPI schemas and validated
|
||||
with `flux-schema`.
|
||||
- `gitops-repo-audit`: an offline audit of a GitOps repo in six phases. It runs deterministic tools:
|
||||
`flux schema` and `flux migrate --dry-run`.
|
||||
- `gitops-cluster-debug`: live HelmRelease and Kustomization troubleshooting through the Flux MCP
|
||||
server.
|
||||
- **Required tools:** `flux` ≥ v2.10, `flux-schema`, `kustomize` or `kubectl`, and `flux-operator-mcp`
|
||||
for the debug skill. The debug skill declares `compatibility: Requires flux-operator-mcp v0.60 or later`.
|
||||
- **Gaps for our stack:**
|
||||
- **Sealed Secrets is not mentioned.** `gitops-repo-audit` checks only "SOPS, External Secrets", and
|
||||
`gitops-cluster-debug` special-cases SOPS. I grepped all three `SKILL.md` files for
|
||||
`sealed|sops`.
|
||||
- It covers Flux `Kustomization` resources. Plain Kustomize overlays and `HelmRelease` are covered
|
||||
only as Flux sees them.
|
||||
- **Copyleft flag:** `flux-operator-mcp` is built from `controlplaneio-fluxcd/flux-operator`, which is
|
||||
**AGPL-3.0** (LICENSE file and GitHub API). The skills themselves are Apache-2.0. Running the MCP
|
||||
binary unmodified as a local tool should not put obligations on holocron's own content, because AGPL
|
||||
obligations attach to modifying and conveying, or network-serving, the program. **I'm not certain of
|
||||
that, and it is not legal advice.** Do not vendor or patch that binary.
|
||||
- **Open question:** fluxoperator.dev describes the MCP server as connecting to "clusters running Flux
|
||||
Operator". If the target clusters run plain `flux bootstrap` without Flux Operator,
|
||||
`gitops-cluster-debug` may be only partly usable. Not verified.
|
||||
- **Recommendation:** **Depend**, through a wrapper plugin like `plugins/mattpocock`, pinned to a tag.
|
||||
It is official, permissively licensed, tested, and grounded in deterministic tools. **Author** one
|
||||
small skill for Sealed Secrets (kubeseal workflow, which `SealedSecret` scope to use, rotation) and
|
||||
our repo layout conventions. Pin and bump it deliberately, because the project is pre-1.0.
|
||||
|
||||
### Flux MCP servers
|
||||
|
||||
- **Flux MCP server** (`flux-operator-mcp`): Go binary with a `--read-only` mode that masks Secret
|
||||
values (<https://fluxoperator.dev/mcp-server/>, <https://fluxcd.io/flux/agent-skills/>). It is
|
||||
**AGPL-3.0**, as above.
|
||||
|
||||
## Ansible (playbooks, collections, ansible-lint, Molecule)
|
||||
|
||||
No official, permissively licensed Ansible agent skill set exists.
|
||||
|
||||
### `ansible-community/ai-forge`: community, copyleft
|
||||
|
||||
- **Source:** <https://github.com/ansible-community/ai-forge>. It came out of the Ansible forum proposal
|
||||
of 2026-03-20 (<https://forum.ansible.com/t/proposal-new-repo-for-ansible-ai-collaboration/45575>)
|
||||
and was announced on 2026-04-09.
|
||||
- **Licence:** **GPL-3.0-or-later. COPYLEFT.**
|
||||
- **Maintenance:** Last push on 2026-11-06. **No tags**, so nothing can be pinned except a commit SHA.
|
||||
43 stars. The README warns that the repo is brand new and its "structure and contents may change
|
||||
frequently". The forum thread states it is "not Red Hat Supported".
|
||||
- **Format:** Lola modules, installed with `pip install lola-ai` then `lola install`. Skills live under
|
||||
`.agents/skills`. Neither the Claude plugin marketplace nor `npx skills` is documented. Whether apm
|
||||
can install it is unverified.
|
||||
- **Content:** Mostly collection SDLC: `ansible-collection-standards` (CoP review), `ansible-role`
|
||||
scaffolding, and `ansible-collection-sdlc` (17 skills covering changelog fragments, ansible-test,
|
||||
release and PR review). `ansible-content-development` includes `write-content-tests`, which covers
|
||||
Molecule. **There is no dedicated ansible-lint skill.**
|
||||
- **Recommendation:** **Do not depend and do not adapt.** Redistributing it through holocron's MIT
|
||||
marketplace, as we do with `mattpocock`, would convey GPL content. Adapting it would make the adapted
|
||||
skill a GPL derivative. Its own maintainers also say the structure is unstable and it has no tags.
|
||||
Reading it for ideas is fine. Copying its text is not.
|
||||
|
||||
### `leogallego/claude-ansible-skills`: community, copyleft
|
||||
|
||||
The four CoP review and scaffolding skills (role, collection, EE) that seeded ai-forge (forum thread
|
||||
above). The licence is **GPL-3.0** (GitHub API) and it has 48 stars. **Avoid**, for the same reasons.
|
||||
|
||||
### `akin-ozer/cc-devops-skills`: community, permissive
|
||||
|
||||
- **Licence:** Apache-2.0. 339 stars, last push on 2026-07-26, tags `v1`/`v1.0.0`, single maintainer.
|
||||
- **Format:** Agent Skills `SKILL.md` under `devops-skills-plugin/skills/<name>/`. It includes
|
||||
`ansible-generator` and `ansible-validator`. Aggregators report that the validator runs Molecule
|
||||
when a role has a `molecule/` directory; I did not verify that. The same repo also has `k8s-debug`
|
||||
and Terraform skills.
|
||||
- **Quality:** Unreviewed by me beyond the frontmatter. The `ansible-validator` description is a
|
||||
terse keyword list ("Validate, lint, audit, or debug Ansible playbooks, roles, inventories, FQCN,
|
||||
tasks."), which falls short of ADR-0020's description contract.
|
||||
- **Recommendation:** A permissible **reference to adapt from** (Apache-2.0 requires keeping the
|
||||
NOTICE and attribution). It is not worth depending on: one maintainer, and pushes stopped in July.
|
||||
|
||||
### Red Hat material
|
||||
|
||||
- **Ansible development tools MCP server** (`@ansible/ansible-mcp-server`, image
|
||||
`ghcr.io/ansible/devtools-mcp-server`): a **Technology Preview**
|
||||
(<https://developers.redhat.com/articles/2026/08/19/red-hat-ansible-development-tools-mcp-server>,
|
||||
<https://docs.ansible.com/projects/vscode-ansible/mcp/>).
|
||||
- **Tools:** Zen of Ansible and best-practice lookup, environment setup, `ansible-creator`
|
||||
scaffolding, ansible-lint with fixes, the EE builder, and `ansible-navigator` execution.
|
||||
- **Molecule is not a tool.**
|
||||
- **Licence:** not stated on either page. The `ansible/vscode-ansible` repo that bundles it is MIT,
|
||||
but I did not confirm that the server source lives there.
|
||||
- It can execute playbooks, so ADR-level scoping applies before any adoption.
|
||||
- **`RHEcosystemAppEng/agentic-collections`:** Red Hat's Summit 2026 skills repo, Apache-2.0
|
||||
(LICENSE file). Its `rh-automation` plugin is **Ansible Automation Platform governance**, not
|
||||
playbook or collection authoring. That is product-specific and fails the provider-agnostic
|
||||
constraint. Its only tag is a moving `latest`. **Not relevant.**
|
||||
- **Tooling licences, for awareness:** `ansible/ansible-lint` and `ansible/ansible-dev-tools` are
|
||||
**GPL-3.0**. `ansible/molecule` is MIT and `ansible/ansible-creator` is Apache-2.0. Skills that
|
||||
*invoke* these CLIs do not redistribute them, so this does not affect holocron.
|
||||
|
||||
**Recommendation for Ansible: author our own.** Suggested split, to be settled in the map: playbook
|
||||
authoring, collection authoring, and Molecule testing, with ansible-lint run as a deterministic gate
|
||||
inside those skills rather than as its own skill. Ground them in the canonical sources below, not in
|
||||
ai-forge text.
|
||||
|
||||
## Kubernetes troubleshooting
|
||||
|
||||
No official Kubernetes-project agent skill was found. Community skills are plentiful and uneven:
|
||||
|
||||
- `akin-ozer/cc-devops-skills` → `k8s-debug`: Apache-2.0, see above.
|
||||
- `laurigates/claude-plugins` → `kubectl-debugging`: MIT, last push on 2026-11-12. It covers ephemeral
|
||||
containers and `kubectl debug`.
|
||||
- `ahmedasmar/devops-claude-skills` → `k8s-troubleshooter`: **no licence** (GitHub API `None`, no
|
||||
LICENSE file), so all rights are reserved. **We cannot depend on it or adapt it.**
|
||||
- Many registry mirrors (`majiayu000/claude-skill-registry` and others) are re-hosts with unclear
|
||||
provenance. **Avoid them.**
|
||||
|
||||
MCP servers:
|
||||
|
||||
- **`containers/kubernetes-mcp-server`:** Apache-2.0, 2,243 stars, last push on 2026-11-12, latest tag
|
||||
`v0.1.2`. Its toolsets include `core` and `helm`. It has a `read_only` setting, plus
|
||||
`denied_resources`, which its README calls best-effort, deferring to RBAC as the real control. It
|
||||
ships as a native binary, npm, uvx and a container. This is the strongest generic option.
|
||||
- `Azure/mcp-kubernetes` (MIT, 62 stars) and `rohitg00/kubectl-mcp-server` (MIT) are alternatives.
|
||||
`k8sgpt-ai/k8sgpt` (Apache-2.0) is an analyser rather than a skill.
|
||||
|
||||
**Recommendation: author** one thin troubleshooting skill (events, describe, logs, `kubectl debug`,
|
||||
then hand off to Flux's `gitops-cluster-debug` for anything Flux-owned), grounded in kubernetes.io.
|
||||
Treat `containers/kubernetes-mcp-server` in read-only mode as an optional companion. Root `apm.yml`
|
||||
currently has `mcp: []`, and adding an MCP dependency is a change that needs its own decision.
|
||||
|
||||
## OpenTofu / Terraform
|
||||
|
||||
### `antonbabenko/terraform-skill`: community, recommended when needed
|
||||
|
||||
- **Licence:** Apache-2.0 (LICENSE file; the `SKILL.md` declares `license: Apache-2.0`).
|
||||
- **Maintenance:** 2,461 stars, last push on 2026-10-24, tagged regularly (latest `v1.17.2`). The
|
||||
author runs terraform-best-practices.com.
|
||||
- **Format:** Agent Skills `skills/terraform-skill/SKILL.md`. Also a Claude marketplace
|
||||
(`antonbabenko/agent-plugins`) and `npx skills`. It is apm-installable by subpath (inferred).
|
||||
- **Scope:** Explicitly covers **Terraform 1.0+ and OpenTofu 1.6+**: testing (native `test` vs
|
||||
Terratest), modules, state, CI, and Trivy/Checkov. Examples default to AWS. The guidance itself is
|
||||
cloud-generic, but we would want to check that the AWS examples do not bias a provider-agnostic
|
||||
package.
|
||||
|
||||
### `hashicorp/agent-skills`: official, mostly out of scope
|
||||
|
||||
- **Licence:** **MPL-2.0. Weak, file-level copyleft:** files we modify must stay MPL and their source
|
||||
must be made available. Depending on it unmodified carries no extra obligation. Adapting it means
|
||||
keeping the MPL on each derived file.
|
||||
- **Maintenance:** 927 stars, last push on 2026-11-04, **one tag, `v1.0.0`**.
|
||||
- **Format:** Agent Skills `SKILL.md` under `plugins/terraform/skills/<name>/`.
|
||||
- **Scope:** 16 Terraform skills (SKILLS.md). Most target provider development, Terraform Stacks,
|
||||
Sentinel/policy and Azure Verified Modules, which are HashiCorp or provider-specific. OpenTofu is
|
||||
**not mentioned**. Only `terraform-style-guide`, `terraform-test` and `refactor-module` are plausibly
|
||||
generic.
|
||||
- **Recommendation:** at most, depend on those two or three skills individually, pinned to `v1.0.0`.
|
||||
Check each against OpenTofu semantics first.
|
||||
|
||||
### MCP servers
|
||||
|
||||
- **`opentofu/opentofu-mcp-server`:** official. MPL-2.0 (LICENSE file; the GitHub API reports
|
||||
NOASSERTION because some folders carry different licences). Latest tag `v1.0.0`, last push on
|
||||
2026-09-21. It is **registry lookup only** (search, provider, module, resource and data-source docs),
|
||||
hosted at `https://mcp.opentofu.org/mcp` or run with `npx @opentofu/opentofu-mcp-server`. Read-only
|
||||
and low-risk.
|
||||
- **`hashicorp/terraform-mcp-server`:** MPL-2.0, `v1.4.1`. It is the Terraform Registry and HCP
|
||||
equivalent. Prefer the OpenTofu server for an OpenTofu target.
|
||||
|
||||
**No official OpenTofu agent skills exist** (search on 2026-11-12 found only the MCP server).
|
||||
|
||||
**Recommendation: defer.** When OpenTofu work starts, **depend** on `antonbabenko/terraform-skill`
|
||||
through a pinned wrapper plugin and **author** only OpenTofu-specific deltas (state encryption, `tofu`
|
||||
CLI differences) if they prove necessary.
|
||||
|
||||
## Canonical sources for our own skills' research registries
|
||||
|
||||
All URLs resolved on 2026-11-12.
|
||||
|
||||
- **Ansible:**
|
||||
- ansible-lint: <https://docs.ansible.com/projects/lint/>
|
||||
- Molecule: <https://docs.ansible.com/projects/molecule/>
|
||||
- Ansible dev tools MCP: <https://docs.ansible.com/projects/vscode-ansible/mcp/>
|
||||
- Red Hat CoP good practices: <https://github.com/redhat-cop/automation-good-practices>. The GitHub
|
||||
API reports **no detected licence**; cite and paraphrase it, do not copy it.
|
||||
- `ansible-creator` (Apache-2.0) for scaffolding conventions.
|
||||
- **Flux:**
|
||||
- <https://fluxcd.io/flux/>
|
||||
- Sealed Secrets guide: <https://fluxcd.io/flux/guides/sealed-secrets/>
|
||||
- <https://github.com/bitnami-labs/sealed-secrets> (Apache-2.0)
|
||||
- Agent skills page: <https://fluxcd.io/flux/agent-skills/>
|
||||
- **Kustomize:** <https://kubectl.docs.kubernetes.io/references/kustomize/>
|
||||
- **Helm:** <https://helm.sh/docs/>
|
||||
- **Kubernetes troubleshooting:** <https://kubernetes.io/docs/tasks/debug/>
|
||||
- **OpenTofu:** <https://opentofu.org/docs/>. Terraform: <https://developer.hashicorp.com/terraform>.
|
||||
|
||||
## Caveats
|
||||
|
||||
- Quality judgements are based on frontmatter, READMEs and vendor docs. No skill was evaluated
|
||||
end-to-end, and none was installed with apm.
|
||||
- Star counts and last-push dates are a snapshot from 2026-11-12.
|
||||
- The licence readings, especially AGPL for `flux-operator-mcp` and MPL-2.0 for HashiCorp and
|
||||
OpenTofu, are my reading of the licence terms and not legal advice.
|
||||
Reference in new issue
Block a user