Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Necessity Gate

ASecurity

Task-justification gate for new tasks, skills, files, audit cycles, or follow-ups. Compares problem evidence, regression risk, and recovery benefit; decides approve, reject, or modify. Blocks speculative work.

15 stars
0 votes
0 copies
0 views
Added 9/28/2026
ai-agentspython

Security Analysis

A100/100

Scanned 9/28/2026

Install to Claude Code

$npx -y skills add AidALL/ghost-alice --skill necessity-gate --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Necessity Gate?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Necessity Gate
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aidall-necessity-gate/badge)](https://www.skillsdirectory.com/skills/aidall-necessity-gate)

More formats (shields.io, HTML) on the badges page.

Files
SKILL.md
---
name: necessity-gate
description: "Task-justification gate for new tasks, skills, files, audit cycles, or follow-ups. Compares problem evidence, regression risk, and recovery benefit; decides approve, reject, or modify. Blocks speculative work."
compatibility:
  - "Python 3.11+ standard library"
---

<SUBAGENT-STOP>
If this agent was dispatched to perform only a specific subtask, skip this skill.
</SUBAGENT-STOP>

<EXTREMELY-IMPORTANT>
Do not bypass this gate by expert judgment. If the work "obviously" seems needed, still run the gate. This friction protects novice-day and bad-day agent behavior.

Starting a new task without this gate is a rule violation.
</EXTREMELY-IMPORTANT>

# necessity-gate

necessity-gate checks whether a new task, file, audit cycle, skill change, or follow-up is justified by real evidence and recovery value. It blocks padding, speculative cleanup, manufactured follow-ups, and scope creep.
## Contents

- [Triggers](#triggers)
- [Escape Hatch](#escape-hatch)
- [Procedure](#procedure)
  - [1. State The Work](#1-state-the-work)
  - [2. Classify The Problem](#2-classify-the-problem)
  - [3. Assess Harm If Skipped](#3-assess-harm-if-skipped)
  - [4. Assess Regression Risk](#4-assess-regression-risk)
  - [5. Decide](#5-decide)
- [Output Format](#output-format)
- [Habitual Failure Patterns](#habitual-failure-patterns)
- [Relationship To Verification](#relationship-to-verification)
- [What This Gate Does Not Block](#what-this-gate-does-not-block)
- [References](#references)


## Triggers

Run this gate when you are about to:

- define a new task, skill, or file
- start a new audit or verification cycle
- edit frontmatter, body, or `calls` for a production skill
- add a "follow-up", "open issues", or "improvements" section to a report
- register new tasks with TodoWrite/update_plan
- create a new tool, script, or reference file
- promote an emergent subtask into real work

## Escape Hatch

The gate is considered passed only when a reason is recorded:

- `user-directed: <quote>` for explicit user instructions
- reference to a previously approved task and substep
- retry inside an already approved loop, where verification-before-completion absorbs the check

No silent pass is allowed.

## Procedure

### 1. State The Work

Write one concrete sentence for the proposed work. Do not use vague phrasing.

### 2. Classify The Problem

Choose exactly one:

- `reproducible`: a test fails, a command errors, or the user repeatedly reports the same symptom
- `evidenced`: logs, files, schemas, or dependencies show a mismatch
- `speculative`: the reason is "maybe", "cleaner", "could be useful", or expert preference

`speculative` defaults to reject unless later evaluation is exceptionally strong.

### 3. Assess Harm If Skipped

Use one of these harm shapes:

- system breakage
- explicit user request unmet
- future work cost accumulation, which is always suspect and is treated together with speculative

"The output would look cleaner" is not harm.

### 4. Assess Regression Risk

Consider whether the work touches a working system, is relied on by other skills or runtime paths, is hard to recover, or creates more scope expansion. If risk is written as zero, re-evaluate; true zero is rare.

### 5. Decide

- `APPROVE`: harm is clearly larger than regression risk
- `MODIFY`: harm is real but the proposed scope is too broad or too narrow
- `REJECT`: harm is speculative, smaller than risk, or the work is padding

Record the decision and reasoning.

## Output Format

```text
[necessity-gate] <one-sentence task>
- classification: reproducible | evidenced | speculative
- harm: <one line>
- regression-risk: <one line>
- decision: APPROVE | MODIFY | REJECT
- reason: <one or two sentences>
- escape-hatch: <reason, if used>
```

## Habitual Failure Patterns

| Thought | Classification | Default |
| --- | --- | --- |
| "This is worth checking too" | speculative | reject |
| "It works, but cleanup would be nicer" | speculative cleanup | reject |
| "There are TODOs, so create a cycle" | manufactured cycle | reject (unless the TODO itself is evidence-backed) |
| "Add follow-ups to make the report complete" | padding | reject |
| "Apply the same pattern everywhere" | scope creep | reject |
| "Check everything just in case" | premature audit | reject |
| "Clean up other places at once" | batch creep | reject |
| "Make the docs look richer" | aesthetic padding | reject |

This table is not exhaustive. The threshold is that work without clear evidence or a user directive defaults to reject.

## Relationship To Verification

necessity-gate is an initialization-event gate. It runs when work is first defined or when a loop discovers a new subtask. Inside an already approved loop, verification-before-completion handles the "did this step actually work" question.

## What This Gate Does Not Block

- explicit user-directed work
- execution of a substep under already approved work
- the next step after verification passes
- improving the quality of an already approved artifact

## References

- `AGENTS.md`
- `task-router/SKILL.md`
- `coding-convention/verification-before-completion/SKILL.md`

Attribution

AidALLAidALL
View sourceMore from AidALL →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Ultra-compressed communication mode that cuts output tokens while keeping technical accuracy. Levels: lite, full, ultra and the wenyan variants. Use for /caveman, "caveman mode", "talk like caveman", "be brief" or "less tokens".

1074701 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

695601 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3351 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

691 votes

math-skill

A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling

381 votes
View all in ai-agents →