Habilidades markdown-toc
📦

markdown-toc

Seguro ⚙️ Comandos externos

為 Markdown 生成目錄

手動創建和更新 Markdown 文件中的目錄既耗時又容易出錯。此技能通過解析標題自動生成和更新目錄,支持批量處理、可配置的深度級別和智能插入模式。

Soporta: Claude Codex Code(CC)
📊 69 Adecuado
1

Descargar el ZIP de la skill

2

Subir en Claude

Ve a Configuración → Capacidades → Skills → Subir skill

3

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

Seguro
v6 • 1/23/2026

All 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.

1
Archivos escaneados
264
Líneas analizadas
1
hallazgos
6
Auditorías totales

Puntuación de calidad

38
Arquitectura
100
Mantenibilidad
87
Contenido
19
Comunidad
100
Seguridad
91
Cumplimiento de la especificación

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

預設包含哪些標題級別?
預設情況下,目錄包含 H2 和 H3 標題。使用 --min-level 和 --max-level 自訂此範圍。
我可以生成目錄而不修改文件嗎?
可以,使用 --dry-run 預覽目錄而不對文件進行任何更改。
自動插入模式如何運作?
自動模式首先搜尋現有的目錄區塊,然後是 YAML frontmatter,接著是第一個標題,或插入到文件頂部。
我可以一次處理多個文件嗎?
可以,傳遞多個文件路徑、使用 glob 模式如 docs/*.md,或使用 --遞歸處理目錄樹中的所有 Markdown 文件。
生成什麼格式的錨點?
腳本生成 GitHub 相容的錨點:小寫、空格轉為連字號、移除特殊字元、將多個連字號合併。
腳本可以移植到其他專案嗎?
可以,腳本沒有硬編碼的路徑,可與任何 Markdown 文件配合使用。您可以將其複製到任何專案中。

Detalles del desarrollador

Estructura de archivos

📄 SKILL.md