Claude Organize v0.3.0 introduces intelligent subcategory organization for scripts, providing fine-grained organization based on the script's purpose and functionality. This system combines pattern matching with AI analysis to ensure scripts are placed in the most appropriate location.
The subcategory system operates in two phases:
- Pattern Analysis: Filename patterns are matched against predefined subcategory patterns
- AI Analysis: If patterns are ambiguous, Claude AI analyzes the script content to determine the best subcategory
Purpose: Scripts that activate, trigger, or enable features
Patterns:
activate-*- Scripts that activate services or featurestrigger-*- Scripts that trigger workflows or processesenable-*- Scripts that enable functionalitystart-*- Scripts that start serviceslaunch-*- Scripts that launch applications
Keywords: activate, trigger, enable, start, launch, initiate, orchestrate
Examples:
activate-workflow.mjs→scripts/activation/trigger-deployment.js→scripts/activation/start-services.sh→scripts/activation/
Purpose: Verification, validation, and status checking utilities
Patterns:
check-*- Scripts that check system statusverify-*- Scripts that verify configurationsvalidate-*- Scripts that validate datainspect-*- Scripts that inspect system statemonitor-*- Scripts that monitor systems
Keywords: check, verify, validate, status, health, inspect, audit, monitor
Examples:
check-api-status.mjs→scripts/checks/verify-database.js→scripts/checks/validate-config.sh→scripts/checks/
Purpose: Test scripts and test runners
Patterns:
test-*- Test scripts*-test.*- Test files*.test.*- Test filesspec-*- Specification tests*.spec.*- Specification files
Keywords: test, spec, jest, mocha, vitest, e2e, integration, unit
Examples:
test-api.mjs→scripts/testing/user-service.test.js→scripts/testing/integration.spec.ts→scripts/testing/
Purpose: Scripts that fix, repair, or patch issues
Patterns:
fix-*- Scripts that fix issuesrepair-*- Scripts that repair problemspatch-*- Scripts that patch bugsresolve-*- Scripts that resolve conflictscorrect-*- Scripts that correct errors
Keywords: fix, repair, patch, resolve, correct, mend, remedy
Examples:
fix-database-issue.mjs→scripts/fixes/repair-config.js→scripts/fixes/patch-security-flaw.sh→scripts/fixes/
Purpose: Database operations, migrations, and backups
Patterns:
migrate-*- Database migrationsbackup-*- Database backups*-db.*- Database-related scriptsseed-*- Database seedingrestore-*- Database restoration
Keywords: database, migrate, migration, prisma, backup, sql, postgres, sqlite, seed
Examples:
migrate-users.mjs→scripts/database/backup-production.js→scripts/database/seed-test-data.sh→scripts/database/
Purpose: Debug and diagnostic utilities
Patterns:
debug-*- Debug scriptsdiagnose-*- Diagnostic scriptstrace-*- Tracing scriptsanalyze-*- Analysis scriptsinvestigate-*- Investigation scripts
Keywords: debug, diagnose, trace, inspect, analyze, investigate, troubleshoot
Examples:
debug-performance.mjs→scripts/debug/diagnose-memory-leak.js→scripts/debug/trace-execution.sh→scripts/debug/
Purpose: Deployment and release scripts
Patterns:
deploy-*- Deployment scriptsrelease-*- Release scriptspublish-*- Publishing scriptsrollout-*- Rollout scriptsship-*- Shipping scripts
Keywords: deploy, release, publish, production, rollout, ship, launch
Examples:
deploy-to-production.mjs→scripts/deployment/release-version.js→scripts/deployment/publish-package.sh→scripts/deployment/
Purpose: Setup, configuration, and installation scripts
Patterns:
setup-*- Setup scriptsconfigure-*- Configuration scriptsinstall-*- Installation scriptsinit-*- Initialization scriptsbootstrap-*- Bootstrap scripts
Keywords: setup, configure, install, init, bootstrap, provision
Examples:
setup-development.mjs→scripts/setup/configure-environment.js→scripts/setup/install-dependencies.sh→scripts/setup/
Purpose: Workflow and process management scripts
Patterns:
workflow-*- Workflow scriptsprocess-*- Process management scriptsorchestrat-*- Orchestration scripts*-workflow.*- Workflow-related scripts
Keywords: workflow, process, orchestrate, pipeline, automation
Examples:
workflow-manager.mjs→scripts/workflows/process-orders.js→scripts/workflows/orchestrate-deployment.sh→scripts/workflows/
Purpose: General utility and helper scripts
Patterns:
get-*- Scripts that retrieve datalist-*- Scripts that list itemsfind-*- Scripts that find resourcesshow-*- Scripts that display informationupdate-*- Scripts that update resourcesbatch-*- Batch processing scripts
Keywords: get, list, find, show, update, batch, utility, helper
Examples:
get-user-info.mjs→scripts/utilities/list-services.js→scripts/utilities/batch-process.sh→scripts/utilities/
The subcategory system is automatically enabled for all script files. You can customize the behavior through environment variables:
# Enable debug mode to see subcategory decisions
CLAUDE_ORGANIZE_DEBUG=true
# Disable subcategory organization (use main scripts/ directory only)
CLAUDE_ORGANIZE_DISABLE_SUBCATEGORIES=true- Uses filename patterns to quickly categorize obvious cases
- Handles 90% of common script naming conventions
- Instant categorization without AI API calls
- Used when patterns are ambiguous or unclear
- Analyzes script content, comments, and structure
- Provides reasoning for categorization decisions
-
Script placed in wrong subcategory
- Check if filename matches multiple patterns
- Review AI reasoning in organization log
- Consider renaming script to match intended pattern
-
Scripts not being subcategorized
- Ensure
CLAUDE_ORGANIZE_DISABLE_SUBCATEGORIESis not set - Check if JavaScript organization is enabled for .js/.mjs files
- Verify script is not in skip patterns
- Ensure
-
AI analysis taking too long
- Use clearer filename patterns for faster categorization
- Consider pattern-based organization for bulk operations
Enable debug mode to see detailed subcategory decisions:
export CLAUDE_ORGANIZE_DEBUG=trueThis will show:
- Which patterns were matched
- AI analysis reasoning (if used)
- Final subcategory decision
- Why certain subcategories were rejected
- Use descriptive prefixes:
check-api-health.mjsinstead ofhealth.mjs - Follow patterns: Use established patterns like
test-*,fix-*,deploy-* - Be specific:
debug-memory-leak.jsinstead ofdebug.js - Avoid ambiguity: Don't use names that could match multiple patterns
- Start with patterns: Name scripts to match subcategory patterns
- Let AI handle edge cases: For complex or multi-purpose scripts
- Review organization log: Check that scripts are categorized correctly
- Adjust patterns: Rename scripts if they're consistently miscategorized
- Use pattern matching: Faster than AI analysis
- Batch operations: Process multiple scripts at once
- Clear naming: Reduces need for AI analysis
- Regular cleanup: Remove temporary test files
Scripts in the root scripts/ directory will be automatically reorganized into subcategories when:
- They are edited or modified
- You run manual organization
- They match subcategory patterns
Note: Existing scripts are not automatically moved to preserve your current organization. Only newly created or edited scripts will be subcategorized.
scripts/
├── check-api.mjs
├── test-auth.js
├── fix-database.mjs
├── deploy-prod.sh
├── debug-memory.js
└── activate-service.mjs
scripts/
├── activation/
│ └── activate-service.mjs
├── checks/
│ └── check-api.mjs
├── testing/
│ └── test-auth.js
├── fixes/
│ └── fix-database.mjs
├── deployment/
│ └── deploy-prod.sh
└── debug/
└── debug-memory.js
This organization makes it much easier to find and manage scripts based on their purpose and functionality.