Runs DocToc to insert or refresh navigable tables of contents inside Markdown files after headings already exist. Use it when an agent is preparing README or docs updates and needs reliable intra-document navigation, not when it is generating the documentation itself.
Scanned 6/8/2026
Install via CLI
openskills install agentskillexchange/skills---
name: "Generate Markdown tables of contents before publishing docs or README updates"
slug: "generate-markdown-tables-of-contents-before-publishing-docs-or-readme-updates"
description: "Runs DocToc to insert or refresh navigable tables of contents inside Markdown files after headings already exist. Use it when an agent is preparing README or docs updates and needs reliable intra-document navigation, not when it is generating the documentation itself."
github_stars: 4432
verification: "security_reviewed"
source: "https://github.com/thlorenz/doctoc"
author: "Thorsten Lorenz"
category: "Content Writing & SEO"
framework: "Multi-Framework"
tool_ecosystem:
github_repo: "thlorenz/doctoc"
github_stars: 4432
npm_package: "doctoc"
npm_weekly_downloads: 1025939
---
# Generate Markdown tables of contents before publishing docs or README updates
Runs DocToc to insert or refresh navigable tables of contents inside Markdown files after headings already exist. Use it when an agent is preparing README or docs updates and needs reliable intra-document navigation, not when it is generating the documentation itself.
## Prerequisites
Node.js, npm, command line
## Installation
Use the upstream install or setup path that matches your environment:
- npm install -g doctoc
Requirements and caveats from upstream:
- # DocToc [](https://github.com/thlorenz/doctoc/actions/workflows/node.js.yml)
- [Docker image](#docker-image)
- ### Docker image
Basic usage or getting-started notes:
- <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
- [Usage](#usage)
- [Example](#example)
- Source: https://github.com/thlorenz/doctoc
- Extracted from upstream docs: https://raw.githubusercontent.com/thlorenz/doctoc/HEAD/README.md
## Documentation
- https://github.com/thlorenz/doctoc#readme
## Source
- [Agent Skill Exchange](https://agentskillexchange.com/skills/generate-markdown-tables-of-contents-before-publishing-docs-or-readme-updates/)
No comments yet. Be the first to comment!