context-file-generation

Generate subdirectory CLAUDE.md files with provenance markers and workflow.yaml reconciliation entries.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Kiwi-Home/ai-workflow --skill context-file-generation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-file-generation
Source: https://github.com/Kiwi-Home/ai-workflow/tree/main/plugins/structured-workflows/skills/context-file-generation
Command: npx skills add https://github.com/Kiwi-Home/ai-workflow --skill context-file-generation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Subdirectory CLAUDE.md files are often missing or inconsistent, leaving AI agents without the local, area-specific context they need to operate reliably; this Skill fills that gap by producing curated, provenance-marked context files for repository sub-areas during setup.

Core Features & Use Cases

  • Generates CLAUDE.md files following a three-layer context model (root, subdirectory, skills/agents) to surface local conventions and domain-specific patterns.
  • Implements content assembly rules, provenance markers, interaction modes (fresh, lean-update, lean-append, bloated), and corruption handling to safely write or update files.
  • Produces workflow.yaml reconciliation entries and orphan detection to track generated and migrated files, enabling auditability and safe migrations from root CLAUDE.md.
  • Use case: migrate large root documentation into targeted subdirectory CLAUDE.md files while preserving provenance and avoiding redundant content.

Quick Start

Run the structured-workflows setup operation to generate or update CLAUDE.md files for qualifying subdirectories in the repository.

Frequently Asked Questions about context-file-generation

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

FAQPage Schema
How do I generate CLAUDE.md files for specific subdirectories in my repository?

To generate subdirectory CLAUDE.md files, run the structured-workflows setup operation, which scans targeted directories and applies content assembly rules to create provenance-marked context files for specific codebase areas.

What is the three-layer context model for repository setup?

The three-layer context model structures repository documentation into root, subdirectory, and skills/agents layers, ensuring AI agents receive domain-specific ambient context and local conventions for reliable operation within targeted codebase areas.

How do I migrate large root documentation into targeted subdirectory CLAUDE.md files?

Migrating root documentation into subdirectory CLAUDE.md files uses root migrations and demoted-skill synthesis to preserve provenance markers, avoid redundant content, and generate workflow.yaml reconciliation entries for safe, auditable file tracking.

Can I update existing CLAUDE.md files without losing their original context and provenance?

Yes, updating existing CLAUDE.md files uses interaction modes like lean-update and lean-append, applying provenance markers and corruption handling to safely modify content while preserving original context and maintaining workflow.yaml reconciliation entries.

How does orphan detection work during context file generation and migration?

Orphan detection tracks generated and migrated files during setup by cross-referencing workflow.yaml reconciliation entries, identifying unmanaged or displaced context files to ensure repeatable, auditable context generation across the repository structure.

What are the limitations of automated context generation for subdirectory files?

Automated context generation requires qualifying subdirectories to scan and relies on demoted-skill synthesis and directory scans; it may not suit repositories lacking clear structural separation or those needing highly customized, non-standard ambient context formatting.