Agent skill
large-file-toc
为大文件生成目录概要。当入库的 Markdown 文件超过阈值(默认30KB)时,提取标题结构创建导航文件。触发条件:Markdown 文件大小 >= 30KB。
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/documents/large-file-toc
SKILL.md
大文件目录概要生成
为大型 Markdown 文件生成目录概要,便于用户快速导航。
适用条件
- Markdown 文件大小 >= 30KB
- 入库阶段5(写入和更新)自动触发
快速流程
- 提取标题:使用 Grep 搜索
^#+\s+.*$ - 生成概要:创建
contents_overview/{文件名}_overview.md - 更新 README:记录概要文件路径
Grep 提取标题
grep -n '^#' knowledge_base/path/to/file.md
输出示例:
10:# 第1章 介绍
150:## 1.1 背景
180:## 1.2 目标
400:# 第2章 方法
目录概要格式
见 TOC_TEMPLATE.md
README 更新格式
- [文件名.md](path/to/file.md) (XXX KB) - 简短描述 [目录概要](contents_overview/文件名_overview.md)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?