claude-security-settings
БесплатноБез исполняемых скриптовНе проверенClaude Code security settings: permission wildcards, shell operator protections, project-level allowlists. Use when auditing or hardening…
от laurigates★ 61 звезда на GitHubОб этом скилле
Claude Code Security Settings
When to Use This Skill
| Use this skill when... | Use configure-claude-plugins instead when... |
|---|---|
| You need the permission-wildcard syntax, shell-operator protections, and project-level allowlist patterns | You want to wire a project's .claude/settings.json to the marketplace and enable plugins end-to-end |
You are auditing or hardening an existing .claude/settings.json against the documented security conventions |
You want runtime detection of marketplace enrollment and enabledPlugins before changing settings |
| Another skill needs to cite the canonical permission-wildcard reference | The user asked you to actually onboard a project to the laurigates/claude-plugins marketplace |
Expert knowledge for configuring Claude Code security and permissions.
Core Concepts
Claude Code provides multiple layers of security:
- Permission wildcards - Granular tool access control
- Shell operator protections - Prevents command injection
- Project-level settings - Scoped configurations
Permission Configuration
Settings File Locations
Settings precedence, highest first (settings docs):
| Rank | Level | Source |
|---|---|---|
| 1 | Managed | managed-settings.json, an MDM policy, or server-managed settings. No other level overrides it |
| 2 | Command line | --settings <file-or-json>, for that session only |
| 3 | Project local | .claude/settings.local.json (kept out of git) |
| 4 | Shared project | .claude/settings.json (committed) |
| 5 | User | ~/.claude/settings.json (all projects) |
What matters for hardening: permissions.allow/deny lists merge across levels rather than override, and a tool denied at any level cannot be allowed by any other level. A user-level deny blocks a project-level allow, and the reverse (permissions docs). Put a guarantee in deny at the widest level you control; put an org-wide guarantee in managed settings. The full hierarchy, trust rules and per-key exceptions are in health-plugin:settings-configuration.
Permission Structure
{
"permissions": {
"allow": [
"Bash(git status *)",
"Bash(npm run *)"
],
"deny": [
"Bash(rm -rf *)",
"Bash(sudo *)"
]
}
}
Wildcard Permission Patterns
Syntax
Bash(command *)
Bash()- Tool identifiercommand- Command prefix to match*- Wildcard suffix matching any arguments- No
:asksuffix exists:Bash(git push *):askis ignored. Put the pattern in theasklist instead
Permission Tiers
| Tier | Behavior | Example |
|---|---|---|
allow |
Auto-allowed, no prompt | "allow": ["Bash(git status *)"] |
ask |
Always prompts for confirmation | "ask": ["Bash(git push *)"] |
deny |
Auto-denied, blocked | "deny": ["Bash(rm -rf *)"] |
Pattern Examples
| Pattern | Matches | Does NOT Match |
|---|---|---|
Bash(git *) |
git status, git diff HEAD |
git-lfs pull |
Bash(npm run *) |
npm run test, npm run build |
npm install |
Bash(gh pr *) |
gh pr view 123, gh pr create |
gh issue list |
Bash(./scripts/ *) |
./scripts/test.sh, ./scripts/build.sh |
/scripts/other.sh |
Pattern Best Practices
Granular permissions:
{
"permissions": {
"allow": [
"Bash(git status *)",
"Bash(git diff *)",
"Bash(git log *)",
"Bash(git add *)",
"Bash(git commit *)"
]
}
}
Tool-specific patterns:
{
"permissions": {
"allow": [
"Bash(bun test *)",
"Bash(bun run *)",
"Bash(biome check *)",
"Bash(prettier *)"
]
}
}
Flag-Scoped Deny Rules: Use the Space Form
When a deny rule targets a specific flag (a force-push backstop is the canonical case), write it in space form — the trailing * enforces a word boundary, so the prefix must be followed by a space or end-of-string and the rule stops at the exact flag:
{
"permissions": {
"deny": [
"Bash(git push --force *)",
"Bash(git push -f *)"
]
}
}
Gotcha — colon form widens to longer flags. The
:*suffix ("Bash(git push --force:*)") has been observed prefix-matching the raw command string, so it also matchedgit push --force-with-lease …— silently hard-blocking the safe recovery form that stacked-PR workflows depend on. Deny rules cannot be overridden except viabypassPermissions, so the widening is a hard block, not a prompt (laurigates/claude-plugins#2038). Current official docs state an end-of-pattern:*is equivalent to the trailing space form, but the equivalence is not version-pinned in the changelog and the widening was observed in practice — the space form's word-boundary semantics are explicit, stable, and match what
Установить claude-security-settings в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(jq *)ReadWriteEditGlobGrepTodoWriteВложенные файлы
FAQ
Что делает скилл claude-security-settings?
Claude Code security settings: permission wildcards, shell operator protections, project-level allowlists. Use when auditing or hardening .claude/settings.json permissions.
Как установить скилл claude-security-settings?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл claude-security-settings запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic