init-sub-dir

Generate context-specific CLAUDE.md files for subdirectories from parent CLAUDE.md files.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/usadamasa/claude-config --skill init-sub-dir
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: init-sub-dir
Source: https://github.com/usadamasa/claude-config/tree/main/dotclaude/skills/init-sub-dir
Command: npx skills add https://github.com/usadamasa/claude-config --skill init-sub-dir

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the creation of CLAUDE.md files for subdirectories, ensuring consistency and avoiding redundancy by intelligently inheriting from parent CLAUDE.md files.

Core Features & Use Cases

  • Intelligent Inheritance: Automatically detects and leverages parent CLAUDE.md content.
  • Minimalist Generation: Creates lightweight CLAUDE.md files containing only directory-specific information.
  • Use Case: When organizing a large project, you can use this skill to quickly set up CLAUDE.md files for new feature branches or module directories, ensuring each has appropriate context without duplicating global project guidelines.

Quick Start

Use the init-sub-dir skill to create a CLAUDE.md file for the current subdirectory.

Frequently Asked Questions about init-sub-dir

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I initialize CLAUDE.md files for project subdirectories without duplicating parent configurations?

Use this skill to initialize subdirectory CLAUDE.md files by automatically detecting parent CLAUDE.md files, generating lightweight context-specific markdown, and referencing parent configurations to ensure minimal duplication across directory structures.

What happens if no parent CLAUDE.md file is found when generating subdirectory documentation?

When no parent CLAUDE.md is found, the skill utilizes fallback templates to generate the subdirectory CLAUDE.md file, ensuring directory structure documentation proceeds with baseline context-specific markdown.

Can I automate directory structure setup to create CLAUDE.md files for new module directories?

Yes, you can automate CLAUDE.md creation for new module directories; the skill handles directory creation prompts and overwriting confirmations, automatically generating context-specific markdown for each subdirectory.

Does the init-sub-dir skill overwrite existing CLAUDE.md files in the target directory?

The skill handles overwriting confirmations interactively, prompting the user before replacing existing CLAUDE.md files in the target subdirectory, ensuring directory-specific markdown updates require explicit approval.

Why should I use inherited CLAUDE.md files for subdirectories instead of a single project configuration?

Inherited subdirectory CLAUDE.md files maintain project consistency and avoid redundancy by intelligently leveraging parent content, allowing each module to document only directory-specific information while referencing global guidelines.