permission-system

Enforce permission checks on tool calls before side effects execute.

5|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/TechyMT/claude-code-superpowers --skill permission-system-techymt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: permission-system
Source: https://github.com/TechyMT/claude-code-superpowers/tree/main/skills/permission-system
Command: npx skills add https://github.com/TechyMT/claude-code-superpowers --skill permission-system-techymt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents accidental or malicious side effects from AI-invoked tools by enforcing a declarative permission gate that runs before any tool's call method is executed, ensuring destructive actions require explicit approval or match pre-approved rules.

Core Features & Use Cases

  • Declarative permission gate: checkPermissions is invoked by the framework before call and can return allow, deny, ask, or passthrough to control execution flow.
  • Three permission modes: default (prompt), bypass (silent allow), and auto (match allow rules) let you balance safety and automation for CI or interactive sessions.
  • Per-input rules and typed validation: Zod validation occurs before permission checking so rules can safely inspect typed fields; supports per-tool flags like isDestructive and isReadOnly and integrates with app-level toolPermissionContext and settings.json allow/deny rules.
  • Use Case: Add this pattern when introducing tools that run shell commands, modify the file system, or make network requests so users are prompted for destructive operations while safe reads are approved.

Quick Start

Add a checkPermissions implementation that delegates to checkWritePermissionForTool and mark the tool as isDestructive so the framework prompts for destructive operations while allowing safe reads to auto-approve.

Frequently Asked Questions about permission-system

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent AI tools from executing destructive shell commands without approval?

Implement a declarative permission gate using checkPermissions to intercept tool calls before execution, returning allow, deny, or ask to control whether destructive shell commands run without explicit approval.

How does Zod validation work with tool permission checks?

Zod validation executes before permission checking, allowing checkPermissions to safely inspect typed input fields and evaluate per-input rules against validated data for file system operations.

Can I auto-approve read-only file system operations while blocking destructive ones?

Use isReadOnly and isDestructive per-tool flags to let safe reads auto-approve while destructive file system operations trigger explicit prompts under the default permission mode.

What permission modes are available for balancing automation and safety in CI sessions?

Three modes exist: default prompts for operations, bypass silently allows all calls, and auto matches pre-approved allow rules from settings.json to balance safety and CI automation.

Does this permission system integrate with allow and deny rules in settings.json?

The system integrates with app-level toolPermissionContext and settings.json allow and deny rules, combining declarative per-input rule evaluation with the standard checkPermissions flow.

When should I not use a bypass permission mode for tool execution?

Avoid bypass mode when tools execute destructive shell commands or modify the file system, as it silently allows all calls and skips the permission checks needed to prevent accidental side effects.