Claude Code hook

Claude Organizer

AI-powered file organization and context engineering that understands content, not patterns. Automatically sorts temporary scripts from permanent docs while preserving your workflow. Works seamlessly with Claude Code hooks. Protects README, LICENSE, configs.

72 stars 12 forksHooks Source

Install

Install
npm install -g claude-organize

Found in the project README. Check it for setup steps after installing.

From source
git clone https://github.com/ramakay/claude-organizer.git

From the README

Claude Organize

Intelligent document organization for Claude Code

NPM Package: https://www.npmjs.com/package/claude-organize

The Messy File Problem 🗂️

Claude Code creates files everywhere. Despite CLAUDE.md instructions saying "don't create scripts in the root directory," it keeps creating test files, debug scripts, and documentation right at your project root:

Solution: Automatic file organization using AI-powered categorization

How Claude Organize Helps

🗂️ Automatic File Organization

Quick Start

Installation

Setup File Organization

You have two options to configure the file organization hook:

Option 1: Using Claude's /hooks command (Recommended)

Use Claude Code's built-in /hooks command to configure:

Option 2: Manual Configuration

Add to your .claude/settings.json:

How This Complements Claude Code Best Practices

According to Claude Code Best Practices, the recommended approaches include:

- Hierarchical CLAUDE.md files - Great for static organization in monorepos
- Shorter sessions with /clear - Helps manage context effectively
- Using subagents - Reduces context usage for complex tasks

Claude Organize complements these practices:

File Organization (Hooks) - Works regardless of session length. Even with /clear and perfect CLAUDE.md setup, Claude still creates files in root. Our hooks ensure consistent organization.

Think of it this way:

- Best Practices: Organize your kitchen (hierarchical CLAUDE.md)
- Claude Organize: Clean as you cook (hooks)

Both approaches work together for optimal Claude Code workflows.

Key Features

✅ Automatic cleanup - Files move to proper directories instantly
✅ AI categorization - Understands file purpose from content
✅ 10 script subcategories - Detailed organization for scripts
✅ Safe defaults - Protects README,…
Read the full README on GitHub

How hooks work

  • Hooks are shell commands Claude Code runs at fixed points: before or after a tool call, when you submit a prompt, when Claude stops, on notifications and at session start.
  • They are set in the hooks section of ~/.claude/settings.json (or .claude/settings.json for a project), or come bundled in a plugin.
  • A hook can block a tool call, add context, or run a formatter or test. Read the scripts before you install them: they run on your machine with your permissions.
Claude Code docs

Details

Type
Hooks
Language
TypeScript
License
MIT
Last updated
18 August 2025
Topics
claude-aiclaude-codecontext-engineering

FAQ

What is Claude Organizer?

AI-powered file organization and context engineering that understands content, not patterns. Automatically sorts temporary scripts from permanent docs while preserving your workflow. Works seamlessly with Claude Code hooks. Protects README, LICENSE, configs. It is a hook for Claude Code, from ramakay/claude-organizer on GitHub.

How do I install Claude Organizer?

Run npm install -g claude-organize, then follow the setup in the README.

Is Claude Organizer popular?

ramakay/claude-organizer has 72 GitHub stars and 12 forks, and is included in 1 curated Claude Code list. It was last updated on 18 August 2025.

More hooks

Browse the most popular Claude Code mods, all hooks, or the skills and MCP server directories.