Skills
Pre-packaged workflows with snapshot/restore permission management
Quick Start
What Skills Do
Instant Invocation
/command detected in @after_user_input, no LLM overhead
Snapshot/Restore
Preserves user approvals while granting temporary permissions
Security
Permissions auto-clear after turn completes
Unified Permission Structure
Skills use the same 4-field permission structure as all other permission sources:
True - Tool is permitted
"skill" - From skill invocation
"commit skill (turn 5)"
{"type": "turn_end"}
Snapshot/Restore Flow
Skills preserve user approvals using a snapshot → grant → restore pattern:
📸 Snapshot
Before granting skill permissions, save current state:
➕ Grant
Add skill permissions to existing permissions:
⚡ Execute
Agent runs with both user and skill permissions active
🔄 Restore
When turn ends, restore the snapshot:
Result: User Approvals Never Lost
- ✅ User's session approvals preserved across skill invocations
- ✅ Skill permissions cleanly added and removed
- ✅ No permission contamination between turns
- ✅ Predictable, testable permission lifecycle
Example Skill
User types: /commit → git commands auto-approved → commit created → permissions restored
Permission Patterns
Skills support flexible pattern matching for tool permissions:
Exact Match
Bash(git status)Only matches "git status"
Wildcard Args
Bash(git diff *)Any git diff command
Command Prefix
Bash(git *)All git commands
Tool Name
read_fileAny read_file call
