Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Run automatically on Claude Code events. Claude doesn't decide.
2 cautions to review before installing
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Path-based access control plugin for Claude Code. Blocks AI from accessing specified files and directories via PreToolUse hooks.
.disable-fileguard flag for manual bypassThis plugin is part of the custom-skills package. It is automatically installed when custom-skills is configured.
Edit fileguard-rules.json in the plugin directory:
{
"rules": [
{
"action": "allow",
"pattern": "/Users/arlen/.config/claude",
"type": "directory",
"reason": "Claude config is safe to access"
},
{
"action": "deny",
"pattern": "/Users/arlen/.config",
"type": "directory",
"reason": "Config root"
},
{
"action": "deny",
"pattern": "/Users/arlen/.ssh",
"type": "directory",
"reason": "SSH private keys"
},
{
"action": "deny",
"pattern": "\\.env($|\\.)",
"type": "regex",
"reason": "Environment secrets"
},
{
"action": "deny",
"pattern": "\\.pem$",
"type": "regex",
"reason": "Certificate private keys"
}
],
"default": "allow"
}
| Field | Description |
|---|---|
action | deny or allow |
pattern | Path string or regex |
type | directory (prefix match), file (exact match), regex (regex match) |
reason | Displayed when access is denied |
default | Action when no rule matches: allow or deny |
Firewall model (first-match-wins): Rules are evaluated in array order. The first matching rule determines the result. If no rule matches, default is applied.
This means rule order matters. Place more specific rules (like allows for subdirectories) before broader rules (like denying the parent directory).
Read, Write, Edit — file_path is normalized via realpath (resolves ../, symlinks) and lowercased before matching:
directory → path.startswith(pattern)file → path == patternregex → re.search(pattern, path)Grep, Glob — path field is used (falls back to cwd if empty), same normalization as above.
Bash — command string is matched directly (no path normalization, case-insensitive):
directory → substring searchfile → substring searchregex → re.search(pattern, command, re.IGNORECASE)Create .disable-fileguard in the project directory to temporarily disable all checks:
touch .disable-fileguard # Disable FileGuard
rm .disable-fileguard # Re-enable protection
Important: .disable-fileguard itself is protected by hardcoded rules. AI cannot create, delete, or read this file. Only human operators can toggle it via their terminal.
The following are always protected, regardless of rules:
.disable-fileguard — prevents AI from toggling the guard${CLAUDE_PLUGIN_ROOT}) — prevents AI from modifying the guard's code, hooks, or rulesCan intercept (path appears as plain text in command string):
cat /secret/file.txtcat $(echo /secret/file.txt)cd /secret && lsgrep "keyword" /secret/filecp /secret/a.txt /tmp/echo "data" > /secret/filecat "/my secret/file" (quoted paths)Cannot intercept (path not visible as plain text):
p="/secret"; cat $pcat $(head -1 paths.txt)echo L3NlY3JldA== | base64 -d | xargs catcat $SECRET_PATHeval "cat /sec" + "ret/file"cat /sec*/file (if rule is full path /secret)hooks.json require restarting Claude Code.fileguard-rules.json is missing or has invalid JSON, all access is denied. Use touch .disable-fileguard to bypass.Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub valorvie/custom-skills --plugin fileguardPlugins from other owners that cover similar ground