Claudeignore — Development skill for Claude Code
Claude hook that blocks file access based on .claudeignore patterns, save tokens and protect sensitive files.
How to install Claudeignore
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open tornikegomareli/claudeignore and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claudeignore does
Claude hook that blocks file access based on .claudeignore patterns, save tokens and protect sensitive files.
Alternatives in Development
- L Docs Plugin — Document a Lowdefy plugin package (blocks, connections, operators, actions) 3k ★
- Defensive Code Cleanup — Clean Defensive Try-Catch Blocks 1.2k ★
- WP Block Development — Develop WordPress Gutenberg blocks 902 ★
README
claudeignore
CC hook that blocks file access based on .claudeignore patterns. Works at the hook level for tool calls and at the, OS kernel level to stop sub-agents and shell commands via macOS [seatbelt](https://theapplewiki.com/wiki/Dev:Seatbelt),
**⚠️ but currently OS level protection works only on macOS.**
Claude reads files to understand your codebase. but it doesn't need to read sensitive files or deprecated features, or features which are large you don't need them and it takes lot of tokens and fills context without reason. When it does, it wastes tokens
cc has built-in deny rules in `.claude/settings.json`:
{
"permissions": {
"deny": ["Read(./node_modules/**)"]
}
}
This works, but has some problems for me
- Per-tool syntax — you write
Read(./node_modules/**),Edit(./node_modules/**),Write(./node_modules/**)separately for each tool - No shared file — rules live in
settings.json, mixed with other config. You can't commit a simple ignore file that teammates can read and edit
claudeignore is simple a [PreToolUse hook](https://docs.anthropic.com/en/docs/claude-code/hooks), before cc reads, edits, writes, globs, or greps a file, the hook checks the path against your `.claudeignore`. If it matches, the operation is blocked.
The `.claudeignore` file uses **gitignore syntax**, the same patterns you already know.
Install
curl -fsSL https://raw.githubusercontent.com/tornikegomareli/claudeignore/main/install.sh | sh
Or build from source:
go install github.com/tornikegomareli/claudeignore@latest
claudeignore setup
Use
Create a `.claudeignore` in your project and put there anything you don't want claude to touch.
sub-agent protection (macOS only right now)
sub-agents spawned via the Agent tool can bypass hooks. On macOS, `claudeignore wrap` launches Claude inside a kernel-level sandbox Seatbelt
Related Skills
Freeze
Freeze files matching a pattern — blocks Edit/Write to matched files via a session-scoped PreToolUse hook. Use
Ashlr Brief
Toggle response-shortening (caveman-inspired, ashlr-flavored) with three intensity levels. Trims filler from C
Continuous Improvement
Reflect on the current session, analyze observations for patterns, and show instinct status. Runs on-demand to
Claude Svelte5 Skill
🚀 Explore efficient Svelte 5 development with Claude Code. Save tokens while gaining expert insights, best pr
Rogue Auth Access Control Skill
Expert authentication and authorization engineering: identity lifecycle, session/token handling, password/OTP
Serialised Browsing
use a headless Chromium to fetch a page when curl or WebFetch cannot, in-built burst access prevention. Also a
Related Agents
Be Auth
Authentication and authorization work — guards, tokens, SSO/external login handoffs, policies, and access pred
Fec Design Token Mapper
Use this subagent to map styles and variables in Figma, Sketch, MasterGo, Pixso, Mokou, or Mockup to existing
Canva Fse Converter
Specialized agent for converting Canva HTML/CSS exports to WordPress FSE block themes. Parses design tokens fr