Committed skills as agent instructions: ownership, updates and required tools #208
Notifications
Due Date
No due date set.
Blocks
#193 chore: trim the apm plugins and pin apm-cli
Mortis/Kamino
Reference: Mortis/Kamino#208
Reference in new issue
Block a user
Part of #87
Question
Shared agent primitives through apm commits the deployed
.claude/skillsand.claude/agents, leaves them outside CODEOWNERS and lets their updates automerge. EveryAGENTS.mdis under CODEOWNERS because an agent rewriting its own instructions is the risk. Four reviewers flagged the gap from different sides. Decide:.claude/skillsand.claude/agents(one maintainer approval per skills update), or a bot-diff rule that blocks automerge when frontmatter gains a grant, a hook or a shell line? Doapm.yml,apm.lock.yamland.mcp.jsonjoin CODEOWNERS?apm.yml, the lock and the committed tree is "held by review".apm audit --cicompares deployed files with lock hashes. Is that the control?rtkis a required contributor tool only because the skills callrtk git. Its hook already rewrites plaingit, and its default edition carries a non-open-source component installed bycurl | sh. Required, optional, or removed from the skills?Co-authored-by:. Who fixes the skill, and what holds until then?apmmanager needs theapmCLI to update the lock, and the bot-diff gate refusesapm.ymland its lock today.From the review
apm install), and the scope of the open re-check task (#194).Evidence from the review of the map (2026-11-15). File references below are to the skills as
apm installdeploys them today (gitignored,.gitignore:19), which chore: commit the deployed agent skills, trim the apm plugins and pin apm-cli would commit as they are.Are skills agent instructions?
allowed-toolsare "Tools Claude can use without asking permission", and "Claude Code applies a project skill'sallowed-toolseven in a-prun in a folder you've never trusted"; a!`<command>`line "runs shell commands before the skill content is sent to Claude"; frontmatterhooksregister when the skill is invoked, also in an untrusted-prun.git-commits/SKILL.md:19allowed-tools: Bash;pc-author/SKILL.md:7allowed-tools: Bash Read Write Edit; a shell script underdiagnosing-bugs/scripts/..claude/is not under CODEOWNERS: skills carry no rules". Its own survey contradicts this:git-commitsmandatesrtk gitand showsCo-authored-by:. Contributor doc set owns everyAGENTS.mdbecause "an agent rewriting its own instructions is the mistake the threat model guards against".How they are held
\.claude/.*(whole directory)allowed-tools,hooksor a!line and no executable file changesscripts/check_bot_pr_diff.py"disableSkillShellExecution": truein the tracked.claude/settings.json(documented setting).apm.yml,apm.lock.yamland.mcp.json: apm grants are package-scoped ("a bareowner/repokey and anowner/repo#1.2.0key both match ... regardless of the installed version"), and a self-defined MCP server is an executable written to the tool's MCP config. Recommendation: own them, withdocs/agents/.*.Private references in the skills
git-history/references/git-log-format.md:169-172cites design records of another repository ("ADR-0023").apm audit as the control
deployed-files-present,content-integrity("SHA-256 drift between the on-disk content and the hash recorded indeployed_file_hashes") and a drift replay inapm audit --ci, which fetches the lock-pinned source.apm audit --cito Lint, or to pull requests touchingapm.*or.claude/, in the re-check task.rtk
git-commits/SKILL.md:24says "Run git asrtk git <subcommand>, never baregit— org convention".git status"automatically"; the default edition is "Apache-2.0 + BUSL-1.1",rtk-ossis Apache-only; install bycurl ... | sh.rtk-ossandrtk init -gonly, because project-level init writes aCLAUDE.md.The
Co-authored-by:skillgit-commits/SKILL.md:68,references/create-commit.md:15,references/commit-template.md:62. AI-assistance policy and commit trailer excludes it; the apm decision lets the root policy win.Assisted-by:; nothing there holds it yet. The commit-msg check discussed in Making sure an agent actually loads the guidance would hold it here.Renovate's apm manager, and related
apmCLI"; reads only the string form, whileapm.yml:19-27uses the object form.apmis not inenabledManagers; the bot-diff gate refusesapm.ymland its lock..claude/drifts from the lock after a Renovate bump.apm install, which fails without access to the SSH source and dirties committed files.apm-clireaches theciimage throughrequirements-dev.txt, against the apm decision's "not in the ci image"; accept or ask.agentsmd-author/agentsmd-audit, from thecoreplugin the commit issue drops.docs/agents/issue-tracker.md:3points to an MCP-only skill; line 30 says fork pull requests are not accepted.Resolution
Resolved on 2026-11-16 with the maintainer, by grilling. Evidence: the review comment above. Partly supersedes Shared agent primitives through apm (points 2, 3 and 8) and the note from Agent guard hook and permission allowlist that "skills and agents stay unowned and automerged".
Decision
.claude/skillsand.claude/agentsare instructions and executable configuration for the threat model, the same asAGENTS.md. Reason: a skill can grant itself tools, run shell commands on load and register hooks, also in an unattended-prun, and apm's approval step never looks at text primitives..claude/(\.claude/.*, because Gitea patterns are regexes). This replaces the separatesettings.json,hooks/andrules/entries. A frontmatter bot-diff rule was rejected: it cannot see instructions in a skill's prose, and it would be a custom checker. Cost accepted: each skills bump waits for one maintainer approval. How that sits with Renovate automerge is for Code-owner approval against Renovate automerge, and where secrets live.apm.yml,apm.lock.yaml,.mcp.jsonanddocs/agents/. Each changes what an agent does or may run: apm grants are scoped to the package,.mcp.jsonregisters executables, anddocs/agents/is read by the skills as configuration."disableSkillShellExecution": truegoes in the tracked.claude/settings.json, as a second layer. Not verified here: the implementation confirms that the setting exists and drops the line if it does not.apm install. No exception to Sanitise private-environment references is recorded.Co-authored-by:trailer, against AI-assistance policy and commit trailer. The fix belongs in the skills source. Until then the skills are not committed (point 5). The trailer stays held by review here. Acommit-msgcontrol stays with Making sure an agent actually loads the guidance.rtkis mandatory, asrtk-oss. The maintainer's choice, because it is relevant to agentic coding with or without the skills. The objection is recorded: it is a token saver, not a correctness tool, and the default edition carries a BUSL-1.1 component installed bycurl | sh. How it is held:scripts/dev-setup.shinstalls the pinnedrtk-ossinto~/.local/bin. It verifies a checksum, or falls back tocargo installat the pinned version if no checksummed release exists. There is never acurl | sh, and there is a tested minimum version..claude/settings.jsoncarries a guarded PreToolUse hook onBash:command -v rtk >/dev/null 2>&1 && exec rtk hook claude || exit 0. A clone plusdev-setup.shis the whole setup, with nortk init -g. Withoutrtk, it degrades to plaingit. This reverses #104's "no hook is tracked here", whose reason the guard removes.rtk init -ghook. The implementation tests it; if the two double-wrap,dev-setup.shwarns about a global hook.rtk. One carries its usage block in aCLAUDE.md, which this repository does not have.apm audit --ciis the control for agreement betweenapm.yml, the lock and the committed tree, replacing "held by review". It runs in Lint, only on pull requests that touchapm.yml,apm.lock.yamlor.claude/. It is outside the network-off fast path (#168), because the drift replay fetches the source.apm-cligoes into theciimage, reversing #104's "not in the ci image". It ships with the re-check, because it needs the public source. Not verified: whether the hash check alone runs offline; if it does, the fetch is dropped.apm.yml, the lock and.claude/must not bypass CODEOWNERS.AGENTS.md.Backlog
rtkmoved out), #144 (owned paths), #196 (shell-execution setting), #189 (noapm install,rtkviadev-setup.sh), #194 (commit, clean content,apm audit, CODEOWNERS), #143 (ADR 0001 line).