panic

$npx mdskill add softspark/ai-toolkit/panic

Halts all agents by creating a lockfile gate.

  • Stops agent loops or runaway processes immediately.
  • Depends on Bash and a project-local lockfile at .claude/HALT.
  • Creates lockfile on any trigger phrase like 'panic' or 'kill switch'.
  • Notifies user with reason and instructs how to resume.

SKILL.md

.github/skills/panicView on GitHub ↗
---
name: panic
description: "Emergency kill switch — halts all agents via lockfile gate. Triggers: panic, stop everything, kill switch, halt agents, agents looping."
effort: low
disable-model-invocation: true
agent: system-governor
context: fork
allowed-tools: Bash
---

# Panic Command (The Kill Switch)

Stops the system dead in its tracks.

## Usage

```bash
/panic [reason]
# Example: /panic "Agents are looping infinitely"
```

## Protocol
1. **Create Lockfile**: `touch .claude/HALT`
2. **Notify User**: "System Halted. Delete .claude/HALT to resume."

## Resume
To resume operations:
```bash
rm .claude/HALT
```

## Rules

- **MUST** create the lockfile at `.claude/HALT` — agents check this path to gate execution
- **NEVER** bypass the lockfile silently once it exists
- **CRITICAL**: emit a clear, single-line notification so the user knows the system is halted
- **MANDATORY**: include the provided reason (if any) in the notification

## Gotchas

- The lockfile is **project-local** (`./.claude/HALT`). Agents running in a different working directory, or globally-invoked tools, will not see it and will keep running. `/panic` is not a system-wide kill switch.
- The lockfile check relies on the `PreToolUse` hook from `ai-toolkit`; if the user disabled hooks in `settings.json` or ejected without keeping hooks, `touch .claude/HALT` does nothing. Verify the hook is present after invocation.
- Removing `.claude/HALT` mid-task resumes agents that were blocked, but they resume with potentially **stale context** (conversation moved on, tool results orphaned). Prefer restarting the session cleanly if possible.

## When NOT to Use

- For cancelling a single agent — use the task's own stop mechanism
- For a production incident — use `/workflow incident-response`
- As a rollback tool — use `/rollback`
- To pause for a short clarification — just ask the question, do not halt the system

More from softspark/ai-toolkit

SkillDescription
a11y-validateAccessibility validator: WCAG 2.1 AA, EN 301 549, EAA. Triggers: a11y, accessibility, WCAG, EAA, ARIA, contrast, keyboard, screen reader.
agent-creatorCreates new specialized agents with frontmatter, tools, delegation. Triggers: new agent, create agent, agent scaffold, specialized agent.
ai-toolkit-rulesMandatory engineering, security, testing, git, performance, quality, and response rules. Claude MUST load this skill for every technical, coding, debugging, review, architecture, DevOps, data, or file-editing task in Chat or Cowork.
api-patternsREST/GraphQL API design: naming, versioning, pagination, idempotency, OpenAPI. Triggers: API design, REST, GraphQL, OpenAPI, Swagger, idempotency, rate limit.
architecture-auditAudits codebase for architectural friction, shallow modules; proposes RFCs. Triggers: improve architecture, shallow modules, deepen modules, reduce coupling.
biz-scanScans codebase for revenue opportunities, KPIs, monetization gaps. Triggers: business metrics, KPI, analytics gaps, monetization, revenue.
briefingExecutive daily briefing aggregating reports from all agents into decision-focused summary. Triggers: briefing, daily summary, status across system, executive update.
chaosInjects controlled faults for resilience testing on non-prod. Triggers: chaos, fault injection, latency injection, dependency kill, resilience test.
ci-cd-patternsCI/CD: GitHub Actions, GitLab CI, Jenkins, caching, blue-green, canary. Triggers: CI, CD, pipeline, GitHub Actions, workflow YAML, release, canary, rollout.
content-moderation-patternsContent moderation with Claude: pre-filter vs LLM-classify, categories, thresholds, HITL. Triggers: moderation, safety filter, policy enforcement, content classifier.