tornikegomareli

Claudeignore — Development skill for Claude Code

Development community

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

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

CleanShot 2026-04-03 at 03 45 17@2x