Claude-skill-registry large-file-toc
Generate table of contents overview for large files. When onboarded Markdown file exceeds threshold (default 30KB), extract heading structure to create navigation file. Trigger condition: Markdown file size >= 30KB.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/large-file-toc" ~/.claude/skills/majiayu000-claude-skill-registry-large-file-toc && rm -rf "$T"
manifest:
skills/data/large-file-toc/SKILL.mdsource content
Large File Table of Contents Overview Generation
Generate table of contents overview for large Markdown files for quick user navigation.
Applicable Conditions
- Markdown file size >= 30KB
- Automatically triggered at onboarding stage 5 (write and update)
Quick Workflow
- Extract headings: Use Grep to search
^#+\s+.*$ - Generate overview: Create
contents_overview/{filename}_overview.md - Update README: Record overview file path
Grep Extract Headings
grep -n '^#' knowledge_base/path/to/file.md
Output example:
10:# Chapter 1 Introduction 150:## 1.1 Background 180:## 1.2 Objectives 400:# Chapter 2 Methodology
Table of Contents Overview Format
See TOC_TEMPLATE.md
README Update Format
- [filename.md](path/to/file.md) (XXX KB) - Brief description [Table of Contents](contents_overview/filename_overview.md)