skills/doc-split/SKILL.md
Auto-split documentation files exceeding size threshold
npx skillsauth add alchemishty/agent-harness doc-splitInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Split oversized documentation files into a directory of smaller, self-contained sub-documents.
Read harness.yaml at the project root. Extract:
docs.max_doc_lines (default: 200)docs.root (default: docs/)Determine target files:
.md files in docs/ and process any exceeding docs.max_doc_linesFor each oversized file:
Read the file content in full.
Identify natural split points at ## (h2) headings. Each ## section becomes a candidate sub-document.
Minimum size guard: If splitting would produce any sub-document with fewer than 20 lines, merge it with the adjacent section. Do not split a file into fragments that are too small to be useful on their own.
Create a directory with the same name as the file (without .md extension):
docs/conventions.md becomes docs/conventions/Write each section as a separate file in the new directory:
## Import Rules becomes import-rules.mdsrc/.")Create an index file at docs/<name>/index.md:
# Conventions
- [Import Rules](./import-rules.md) — module import ordering and restrictions
- [Naming](./naming.md) — variable, function, and file naming standards
Update AGENTS.md: find references to the old file path and replace them with the new directory path or index file path.
Search the rest of the repo for any other references to the old file path (other docs, comments, config files). Update those references to point to the new index file.
Delete the original oversized file.
Commit with message: docs: split <filename> into sub-documents (exceeded <N> line threshold)
part-1.md).## heading, include it in the index file.$ARGUMENTS
documentation
Post-implementation retrospective that captures learnings to memory and proposes doc improvements
testing
Validate and fix project structure against architecture rules
tools
Migrate project scaffolding to match the latest harness version. Adds new directories (memory/, scratch/), new harness.yaml fields, and suggests AGENTS.md updates. For plugin users this handles what a plugin update cannot — project-level structure changes. For git-clone users this also updates copied skill files.
data-ai
Install the agent harness into a target project. Detects project type (greenfield vs existing), copies skills, and delegates to the appropriate bootstrap command.