focus-guard

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 CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/devs-30/skill-gate/focus-guard
Any agent
npx skills add devs-30/skill-gate --skill focus-guard
Clone the repo
git clone --depth 1 https://github.com/devs-30/skill-gate

Made for: Claude Code, Codex.

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. Scan, not verified.
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 $0.00105 $0.01306
Opus 5 $0.00053 $0.00653
Sonnet 5 $0.00021 $0.00261
Haiku 4.5 $0.00011 $0.00131

Measured 2d ago against content hash a8ea24b85c95, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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. 2d 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 1mo ago), licensed MIT. It adds 105 tokens to every session and 1,306 once invoked, about $0.0005 per session on Opus 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

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

agent-host-chat-contributions

Build and review cross-cutting agent-host chat behavior through lifecycle contributions. Use when adding turn lifecycle side effects, prompt or context injection, restored-history transformation, protocol-action observation, or when reviewing changes that add code to AgentSideEffects or AgentService.

microsoft/vscode · 56 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens