focus-guard

focus-guard is a skill for Claude Code from devs-30/skill-gate. It costs 105 tokens per session (1,306 once invoked), scanned B, original, MIT.

A project skill for controlling which other skills require confirmation before they run. A gated skill is paused by a hook, or automatic check, until the user approves it.

In plain words
What is it for?
Adding or removing skills from a confirmation list, choosing confirmation behavior, and disabling gating while keeping the configured list.
Why use it?
It prevents selected skills from starting automatically when the user wants tighter control. Changes to the project blocklist take effect without restarting the session.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: reads .claude/ paths; names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the skill-gate plugin — 1 skill, 1 hook shipped together

Good fit Adding or removing skills from a confirmation list, choosing confirmation behavior, and disabling gating while keeping the configured list.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add devs-30/skill-gate
Claude Code
/plugin install skill-gate

Made for: Claude Code.

Or install skill-gate, the plugin that ships this one along with the rest of its 1 skill, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for focus-guard

README.md
[![agentmods](https://agentmods.dev/badge/skills/devs-30/skill-gate/focus-guard/github.svg)](https://agentmods.dev/skills/devs-30/skill-gate/focus-guard)
Your own site
<a href="https://agentmods.dev/skills/devs-30/skill-gate/focus-guard"><img src="https://agentmods.dev/badge/skills/devs-30/skill-gate/focus-guard/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for focus-guard

Your own site · 80×15
<a href="https://agentmods.dev/skills/devs-30/skill-gate/focus-guard"><img src="https://agentmods.dev/badge/skills/devs-30/skill-gate/focus-guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,306 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00105 $0.01306
Opus 5.5 $0.00042 $0.00522
Sonnet 5.5 $0.00021 $0.00261
Haiku 4.5 $0.00011 $0.00131

Measured 2mo ago against content hash a8ea24b85c95, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

focus-guard scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- This skill does not need to (and must not) edit `~/.claude/settings.json` or
skills/focus-guard/SKILL.md · 112 lines

How it starts

The opening of the file, as written. The whole thing — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Focus Guard

Manage which skills are gated in this project. A gated skill is intercepted by the skill-gate plugin's PreToolUse hook before it runs and (in the default confirm mode) blocked until the user explicitly approves it via a YES / NO / NO+alternative prompt.

How the pieces fit

  • The hook (${CLAUDE_PLUGIN_ROOT}/hooks/skill-gate-hook.js) ships with this plugin and runs on every Skill tool call. It is active whenever the skill-gate plugin is enabled. You do not create it — enabling the plugin is what "creates the hook".
  • The blocklist lives per project at <project>/.claude/skill-gate.json. The hook reads it live on every call, so adding/removing a skill takes effect immediately — no restart needed. (Only enabling the plugin itself needs a restart.)

Config shape:

{
  "mode": "confirm",
  "blocked": ["superpowers:brainstorming", "some-other-skill"],
  "debug": false
}
  • mode: "confirm" (default — YES/NO/alternative prompt), "always" (native permission dialog every time), or "off" (disable gating without losing the list).
  • blocked: exact skill identifiers as the Skill tool uses them — bare name for personal skills (my-skill), plugin:skill for plugin skills.
  • debug: false (default). When true, the hook appends the full decision flow of every Skill invocation to <project>/skill-gate-debug.log (the repo root) — config read, resolved skill name, blocklist match, mode branch, sentinel state, and final decision. Useful for diagnosing why a skill was or wasn't gated.

Workflow

Pick the branch that matches the request.

Adding skills to the gate

  1. Discover available skills by hierarchy (user → plugin → project → project-local). Run the helper:
    node "${CLAUDE_PLUGIN_ROOT}/scripts/list-skills.js"
    
    It prints { "skills": [ { name, tier, description, source } ] }. Reconcile with the skills you can actually see available in this session — the helper covers filesystem skills; your in-context list is the authoritative set of what is invocable here. Prefer the union, deduped by name.
  2. Read the current config at <project>/.claude/skill-gate.json (treat a missing file as { "mode": "confirm", "blocked": [] }). Exclude already-blocked skills from the candidates.
  3. Ask the user which to gate with AskUserQuestion (multiSelect: true), grouping/labeling options by tier so the source is clear. Do not invent skills not in the discovered list.
  4. Write the config: merge the chosen identifiers into blocked (dedup, keep sorted), preserve mode, and create the file (and .claude/ dir) if absent. Use exact identifiers from step 1.
  5. Confirm what is now gated and remind the user it takes effect immediately.

Read the full file on GitHub · 112 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 112 lines · 105 tokens per session scan B a8ea24b85c95

Subscribe to this mod's changes

focus-guard is a skill published in the GitHub repository devs-30/skill-gate (2 stars, last pushed 4mo ago), licensed MIT. It adds 105 tokens to every session and 1,306 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

focus-guard compared with skills from other repositories

focus-guard next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
focus-guarddevs-30/skill-gateSkill24mo agoMITB105Claude Code
imagegenopenai/codexSkill134ktodayApache-2.0A113Codex
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill79ktodayMITA200Claude Code, Codex
playwright-climicrosoft/playwrightSkill99ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill394ktodayMITA36Claude Code
systematic-debuggingobra/superpowersSkill314k4d agoMITA21Claude Code
next-cache-components-adoptionvercel/next.jsSkill143ktodayMITA95Claude Code