markdown-toc
為 Markdown 生成目錄
手動創建和更新 Markdown 文件中的目錄既耗時又容易出錯。此技能通過解析標題自動生成和更新目錄,支持批量處理、可配置的深度級別和智能插入模式。
Descargar el ZIP de la skill
Subir en Claude
Ve a Configuración → Capacidades → Skills → Subir skill
Activa y empieza a usar
Pruébalo
Usando "markdown-toc". python scripts/generate_toc.py README.md
Resultado esperado:
- ## Table of Contents
- - [Installation](#installation)
- - [Usage](#usage)
- - [Basic Usage](#basic-usage)
- - [Advanced Usage](#advanced-usage)
- - [Contributing](#contributing)
Usando "markdown-toc". python scripts/generate_toc.py --no-title docs/guide.md
Resultado esperado:
- - [Getting Started](#getting-started)
- - [Configuration](#configuration)
- - [Troubleshooting](#troubleshooting)
Auditoría de seguridad
SeguroAll 80 static findings are false positives. The 74 external_command detections are documentation code blocks showing bash examples (e.g., `python scripts/generate_toc.py`). The 6 weak_crypto detections are misidentified table formatting patterns. This is a documentation-only skill with no executable code or malicious patterns. Safe for publication.
Factores de riesgo
Puntuación de calidad
Lo que puedes crear
更新所有項目文檔
為專案儲存庫中的所有 Markdown 文件生成完整的目錄。非常適合在大型文檔集中保持一致的導航。
建立 README 導航
為專案 README 文件添加清晰的目錄。幫助使用者快速導航到相關章節,而無需滾動整個文檔。
標準化文檔標記
在多個文檔文件中添加一致的目錄標記。確保在構建多頁文檔指南時具有統一的結構。
Prueba estos prompts
Generate a table of contents for README.md with headers H2 and H3.
Preview the TOC changes without applying them.
Generate a table of contents for all markdown files in the docs/ directory recursively.
Generate a TOC with only H2 headers for the contributing guide, and H2-H4 for the main README.
Mejores prácticas
- 始終先使用 --dry-run 預覽變更,然後再應用
- 對於複雜文檔,使用 --insert marker 模式進行精確的目錄放置
- 設定適當的 --max-level 以避免在大文件中產生過於詳細的目錄
Evitar
- 在重要的文檔文件上運行時未進行預覽
- 使用過深的標題級別而產生過長的目錄
- 重構文檔後忘記更新目錄
Preguntas frecuentes
預設包含哪些標題級別?
我可以生成目錄而不修改文件嗎?
自動插入模式如何運作?
我可以一次處理多個文件嗎?
生成什麼格式的錨點?
腳本可以移植到其他專案嗎?
Detalles del desarrollador
Autor
EmasoftLicencia
MIT
Repositorio
https://github.com/Emasoft/ghe-marketplace/tree/main/plugins/marketplace-utils/skills/markdown-tocRef.
main
Estructura de archivos
📄 SKILL.md