Date Implemented: July 27, 2025 Purpose: Optimize development workflow while maintaining security through intelligent permission management
The Smart Permissions System allows Claude Code to automatically execute safe, read-only operations while requiring explicit permission for potentially destructive or external operations.
These operations are automatically allowed for smooth development flow:
pytest - Run tests with any argumentsPYTHONPATH=. pytest - Run tests with Python path./scripts/tldr_runner.py - TLDR continuous verificationtimeout - Time-limited command executionls - List directory contentsfind - Search for filesgrep / rg - Search file contentscat / head / tail - Read file contentswc - Count lines/wordswhich - Find executablespwd - Show current directorytree - Display directory structureecho - Display textenv | grep - Check environment variablespython --version - Check Python versionnode --version - Check Node versiongit status - Check repository statusgit log - View commit historygit diff - View changesgit branch - List branchesgit remote -v - View remotesgh repo view - View repository infogh run list/view - View workflow runsgh workflow list - List workflowsgh issue list/view - View issuesdocker ps - List containersdocker images - List imagesdocker-compose ps - List compose servicesThese operations require explicit user permission:
rm - Remove filesmv - Move/rename filescp - Copy fileschmod - Change permissionsmkdir - Create directoriesgit add - Stage changesgit commit - Create commitsgit push - Push to remotegit checkout - Switch branchesgit merge - Merge branchesgit reset - Reset changesgh issue create - Create issuesgh pr create - Create pull requestsgh repo set-default - Change default repocurl - HTTP requestswget - Download filesWebFetch - Fetch web contentpip install - Install Python packagesnpm install - Install Node packagesnpm run - Run npm scriptsdocker run - Run containersdocker-compose up/down - Manage servicesdocker build - Build imagesalembic - Database migrationspython scripts/init_db.py - Initialize databasekill / pkill - Terminate processessource - Execute shell scriptsexport - Set environment variablesThese operations are always denied for safety:
rm -rf - Recursive force removalsudo / su - Superuser operations> /dev/ - Device file operationsdd - Disk operationsformat - Disk formattingThe smart permissions are configured in .claude/settings.local.json:
{
"permissions": {
"allow": [
// Auto-allowed safe operations
],
"deny": [
// Explicitly denied dangerous operations
]
},
"smart_permissions": {
"mode": "restrictive",
"auto_allow_categories": [...],
"require_permission_categories": [...],
"permission_request_template": "Permission requested for {command}: {reason}",
"log_permission_requests": true
}
}
# Run tests
PYTHONPATH=. pytest services/integrations/slack/tests/ -v
# Search codebase
grep -r "pattern" services/ --include="*.py"
# Check git status
git status
# List files
ls -la services/integrations/slack/
# Remove file
rm old_file.py
# Claude will ask: "Permission requested for rm old_file.py: Remove outdated file"
# Commit changes
git commit -m "Add feature"
# Claude will ask: "Permission requested for git commit: Create commit for new feature"
# Install package
pip install new-package
# Claude will ask: "Permission requested for pip install: Add required dependency"
To modify permissions:
.claude/settings.local.jsonallow and commented sections