Before adopting a shared Claude Code skill into your project's .claude/skills, what do you review in its folder, and why?
answer
- it can act, not just advise
- tools approved without a prompt
- commands that run before Claude reads
- hooks that outlive the turn
- scripts, names and plugin manifests
basics
~20 sRead it as code that can run: its allowed-tools grants, injected shell commands that execute while it renders, hooks that persist all session, bundled scripts, where and on what model it runs, its name, and whether a side-effecting skill sets disable-model-invocation.
solid answer
~50 sA skill is not just prose. Its `allowed-tools` pre-approve tools for the turn that invokes it, and workspace trust never gates that field. Lines written as `` !`command` `` or in a ```` ```! ```` block run on your machine while the skill renders, before Claude sees anything. A `hooks` block registers hooks on invocation that keep running for the rest of the session. Scripts in the folder are executed, so read them. Also check `context: fork`, `agent` and `model`; whether a deploy- or send-style skill sets `disable-model-invocation: true`; whether its description is broad enough to fire on everything; whether its name replaces a command you rely on; and whether a `.claude-plugin/plugin.json` makes the folder a plugin. Then trial it in a fresh session. Organisations can withhold the riskier parts with `disableSkillShellExecution` and, from v2.1.282, `allowManagedPermissionRulesOnly`.
code
yaml · 16 lines---
name: release-notes
description: Helps with releases and anything git related.
allowed-tools: Bash
hooks:
PostToolUse:
- matcher: "Bash"
hooks:
- type: command
command: "./scripts/sync.sh"
---
## Context
!`./scripts/collect.sh`
Draft release notes from the context above.go deeper
Recall that a skill can pre-approve tools and run commands, so you read it before installing it, as you would any script.
Name the parts that act, allowed-tools, injected commands, hooks frontmatter and bundled scripts, and say what each one does when the skill is invoked.
Walk through a real review: grant breadth, what injected commands touch, hook persistence, side-effecting skills without disable-model-invocation, name clashes, and a trial in a fresh session.
Set the policy: which skills need review before merge, when disableSkillShellExecution or managed-only permission rules apply, and who owns shared skills after adoption.
## A skill is configuration that can act Skills spread easily: a colleague commits one, another team shares a folder, a blog post links one. Most of a skill is instructions, but several parts make Claude Code do things on your machine, some without asking you. Review a shared skill the way you would review a script before merging it, because once it is in `.claude/skills/` everyone who opens the repository gets it. (What repository content can run before a folder is trusted, and how attackers use it, is the security material's subject; this is the adoption checklist.) ## The review checklist | Part | What it does | What to look for | | :- | :- | :- | | `allowed-tools` | Pre-approves the listed tools for the turn that invokes the skill; the grant clears on your next message, and deny and ask rules still override it | A bare `Bash`, wide wildcards, write or network tools the task doesn't need | | `` !`command` `` and ```` ```! ```` blocks | Run before the content reaches Claude; the output is inlined | What each command reads, writes or sends; secrets pulled into the prompt | | `hooks` | Registered on invocation and kept for the rest of the session | Which events, which commands, whether they touch files or the network | | Bundled scripts | Executed, not loaded into context | Read every script the body tells Claude to run | | `context`, `agent`, `model`, `effort` | Where the skill runs and with what | A fork into an agent type with broader tools than you expected; a background fork's edits sit outside checkpoints, so `/rewind` can't undo them | | `disable-model-invocation` | Whether Claude may start it on its own | Side-effecting skills (deploy, commit, send a message) should set it | | `description` | When Claude chooses it | So broad it fires on everything and crowds the listing | | Name | The command it becomes | A project skill replaces a bundled skill of the same name, and a built-in command in a local terminal session | | `.claude-plugin/plugin.json` | Turns the folder into a plugin that can bundle agents, hooks and MCP servers | Review those components too | ## Why the executable parts matter most - **`allowed-tools` is a grant, not a restriction.** Every tool stays callable; the listed ones simply stop prompting during the invoking turn. Workspace trust never gates the field, so the docs advise reviewing the `allowed-tools` of skills checked into a repository before running Claude Code there. - **Injected commands never prompt.** Claude Code checks each one against your permission rules first: a deny rule aborts the invocation, and outside auto mode so does anything short of an allow. A matching `allowed-tools` entry is what lets an unmatched command run silently, which is why the two fields are read together. - **Skill hooks persist.** A project skill's frontmatter hooks register when the skill is invoked and keep running after its turn, so one invocation can change behaviour for the rest of the session. - **Name clashes are quiet.** A project skill named like a bundled skill replaces it, and among enterprise, personal and project skills the enterprise one wins, then personal over project. ## Trying it before committing 1. Read `SKILL.md` and every file it references or runs. 2. Try it in a scratch repository first. 3. Start a fresh session and run prompts that should and should not trigger it, then compare results with the skill set to `"off"` in `skillOverrides`. 4. Add it through a reviewed pull request, so later edits to the skill get the same scrutiny as code. ## Organisation-wide guard rails - **`disableSkillShellExecution: true`** replaces each injected command in user, project, plugin and additional-directory skills with `[shell command execution disabled by policy]`. Bundled and managed skills are unaffected, and a `true` in managed settings can't be overridden. - **`allowManagedPermissionRulesOnly`** in managed settings makes Claude Code ignore `allowed-tools` in project and personal skills (v2.1.282 or later); their tools go through managed rules and the normal permission prompt, and `/status` lists each skill whose grant was ignored. - **`Skill(name)` deny rules** block specific skills from being invoked by Claude.
- Does deleting the skill's allowed-tools line make it safe?Safer, not safe. Without the grant, tools the skill asks for go through your normal permission prompts, and an injected command no rule allows aborts the invocation outside auto mode. But `hooks` frontmatter, bundled scripts Claude is told to run, and the instructions themselves remain, so the rest of the checklist still applies.
- How can an organisation stop shared skills from running shell commands while they render?Set `disableSkillShellExecution: true`, ideally in managed settings where users can't override it. Each `` !`command` `` or ```` ```! ```` block in user, project, plugin and additional-directory skills is replaced with `[shell command execution disabled by policy]` instead of running. Bundled and managed skills are not affected.
- A skill is just Markdown, so there is nothing to execute.
- allowed-tools limits the skill to only the tools it lists.
- Injected !command lines wait for my approval before running.
- A skill's hooks stop when the turn that invoked it ends.
- Workspace trust stops a repository skill's allowed-tools in claude -p.
- A project skill can't take over a built-in command's name.
Assumes Claude Code 2.1.286; allowManagedPermissionRulesOnly has made Claude Code ignore skills' allowed-tools since 2.1.282.