fractal-docs-generator
目录级 CLAUDE.md 生成。触发:mkdir、create directory、目录结构变更。
When & Why to Use This Skill
The Fractal Docs Generator is an automated documentation utility designed to maintain project clarity by generating and updating directory-level CLAUDE.md files. It monitors file system events such as directory creation, movement, or renaming to ensure that every folder contains an up-to-date map of its contents, responsibilities, and architectural status. This skill is essential for maintaining a self-documenting codebase that provides high-quality context for both human developers and AI coding assistants.
Use Cases
- Automated Project Onboarding: Instantly generate directory maps that explain the role of each folder and file, helping new developers understand the architecture without manual documentation updates.
- AI Context Optimization: Maintain synchronized CLAUDE.md files across a repository to provide AI agents with precise local context, leading to more accurate code generation and fewer architectural errors.
- Large-Scale Monorepo Management: Automatically track structural changes in complex projects, ensuring that entry points, core services, and utility files are always correctly identified and documented.
- Standardized Documentation Enforcement: Apply a consistent 'fractal' documentation template across all team projects, ensuring that every module follows the same descriptive standards for better maintainability.
| name | fractal-docs-generator |
|---|---|
| description | 目录级 CLAUDE.md 生成。触发:mkdir、create directory、目录结构变更。 |
分形文档生成器
触发:创建/移动/重命名目录,目录内文件变化。
模板
<!-- 若此目录变更,立即更新本文件 -->
# {目录名} - {一句话定位}
| 文件 | 地位 | 职责 |
|------|------|------|
| foo.ts | 入口 | 对外唯一接口 |
地位
| 地位 | 典型文件 |
|---|---|
| 入口 | index.ts, main.ts |
| 核心 | service.ts, engine.ts |
| 辅助 | utils.ts, helpers.ts |
| 类型 | types.ts |
| 配置 | config.ts |
| 测试 | *.test.ts |
示例
<!-- 若此目录变更,立即更新本文件 -->
# auth - 认证授权
| 文件 | 地位 | 职责 |
|------|------|------|
| index.ts | 入口 | 导出 AuthService |
| auth.service.ts | 核心 | 登录、令牌刷新 |
| jwt.helper.ts | 辅助 | JWT 签发验证 |
协作:本 skill 管目录,file-header-guardian 管文件。