Claude Security Settings
Configure Claude's safety settings (e.g., refusal rates, content filters) to align with your organization’s risk tolerance.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add claude-security-settings npx -- -y @trustedskills/claude-security-settings
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"claude-security-settings": {
"command": "npx",
"args": [
"-y",
"@trustedskills/claude-security-settings"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill allows you to configure Claude Code's security settings, including granular permissions for shell commands and protections against potentially dangerous shell operators. It enables organizations to align Claude Code’s access with their specific risk tolerance by controlling which commands can be executed and preventing the use of risky shell constructs. The configuration is managed through JSON files at different scopes (user, project, local project) with varying priority levels.
When to use it
- You need to restrict what shell commands Claude Code can execute within a project.
- Your organization requires specific controls over command execution for security compliance.
- You want to prevent the use of potentially dangerous shell operators (like
&&,||, or redirection) during code execution. - You are managing multiple projects with different security requirements.
Key capabilities
- Permission Wildcards: Define granular access control using wildcard patterns for Bash commands (e.g.,
Bash(git status *)). - Shell Operator Protections: Prevents the use of dangerous shell operators like
&&,||,;, and redirection (>,>>) to mitigate command injection risks. - Permission Tiers: Control command execution with "allow," "ask" (prompt for confirmation), or "deny" permissions.
- Scoped Configuration: Manage settings at the user, project (committed), and local project (gitignored) levels, with priority-based overrides.
Example prompts
- “Set up Claude Code to allow
git statusbut denyrm -rf *.” - "Configure permissions so that running
npm run buildrequires confirmation." - "What is the highest priority settings file for controlling Bash commands?"
Tips & gotchas
- Settings are applied based on a priority system: Local project > Project level > User level.
- Be mindful of wildcard patterns; overly broad patterns can unintentionally grant excessive permissions.
- Claude Code 2.1.7 and later versions include built-in protections against dangerous shell operators, which will trigger explicit approval prompts if encountered.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.