Agent skill

update-allowed-tools

Use when creating or editing a skill that uses Bash commands, external tools, or skill invocations and the allowed-tools frontmatter may be incomplete

Stars 113
Forks 20

Install this agent skill to your Project

npx add-skill https://github.com/vinta/hal-9000/tree/main/plugins/hal-skills/skills/update-allowed-tools

SKILL.md

Overview

Analyzes a skill's full content -- SKILL.md and any sibling files in the same directory -- to find tools it references or requires, then compares against the skill's allowed-tools frontmatter to find missing entries.

Usage

/update-allowed-tools <skill name>
/update-allowed-tools @path/to/SKILL.md

Instructions

  1. Parse argument: The argument is either a file path to a SKILL.md file, or a skill name/description. If no file path is provided, search for the skill using Glob — first in the current working directory (e.g., **/skills/**/<name>/SKILL.md), then in ~/.claude/skills/**/<name>/SKILL.md.

  2. Read the skill file and separate the YAML frontmatter from the body content. Also read any other files in the same directory (sibling files referenced by or bundled with the skill).

  3. Extract declared allowed-tools: Parse all entries under allowed-tools: in the frontmatter.

  4. Scan all skill content (SKILL.md body + sibling files) for tool usage. Look for:

    • Explicit tool names: e.g., Read, Write, Edit, Bash, WebFetch, WebSearch, Task, AskUserQuestion, Skill, etc.
    • Bash command patterns: e.g., git diff, git commit, make, npm, docker, python, curl, etc.
    • For Bash commands found, the required allowed-tool format is Bash(<command>:*) (e.g., git stash push needs Bash(git stash:*))
    • For file tools with path patterns (Read, Write, Edit), note the paths referenced (e.g., /tmp/ needs Read(//tmp/**))
    • Skill invocations: e.g., commit, Use the commit skill, Skill(commit). The required allowed-tool format is Skill(<name>) (e.g., commit needs Skill(commit))
  5. Compare: For each tool detected in the body, check if it's covered by an entry in allowed-tools. Rules:

    • Glob, Grep, Read, Write, Edit are available by default for files within the project directory. Only add these when the skill needs to access files outside the project (e.g., Read(//tmp/**), Write(~/.config/**)).
    • Bash commands always need explicit Bash(<command>:*) entries.
    • A Bash pattern covers subcommands (e.g., Bash(git stash:*) covers git stash push).
    • Exact match counts as covered (e.g., WebSearch matches WebSearch).
  6. Update the skill file: For any missing tools found, add them to the allowed-tools list in the skill's YAML frontmatter using the Edit tool. Then report what was added.

  7. Validate: Re-read the updated file to confirm YAML frontmatter remains syntactically valid (proper indentation, no duplicate entries, correct list format).

Expand your agent's capabilities with these related and highly-rated skills.

vinta/hal-9000

bump-plugin-version

(project) Use when editing any file under plugins/hal-skills/ or plugins/hal-voice/ to bump the plugin version before committing

113 20
Explore
vinta/hal-9000

commit

Use when making any git commit. All git add and commit operations must go through this skill, including from subagents and other skills. Always pass a brief description of what changed as the argument

113 20
Explore
vinta/hal-9000

second-opinions

Use when wanting independent perspectives from external models (Codex, Gemini) on code, plans, docs, or any task — or when the user asks for a second opinion, codex review, or gemini review

113 20
Explore
vinta/hal-9000

magi

Use when brainstorming ideas, features, or directions for a project where independent perspectives from different model families (Claude/Codex/Gemini) would surface blind spots and spark creative options the user hasn't considered — especially "what cool things can I add", "what should I build next", "give me ideas for X"

113 20
Explore
davila7/claude-code-templates

verl-rl-training

Provides guidance for training LLMs with reinforcement learning using verl (Volcano Engine RL). Use when implementing RLHF, GRPO, PPO, or other RL algorithms for LLM post-training at scale with flexible infrastructure backends.

23,776 2,298
Explore
davila7/claude-code-templates

openrlhf-training

High-performance RLHF framework with Ray+vLLM acceleration. Use for PPO, GRPO, RLOO, DPO training of large models (7B-70B+). Built on Ray, vLLM, ZeRO-3. 2× faster than DeepSpeedChat with distributed architecture and GPU resource sharing.

23,776 2,298
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results