[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AMN1FVM59TTTMGKP7WHW60":3,"skill-same:01M7AMN1FVM59TTTMGKP7WHW60":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":30,"repositoryHtmlUrl":35,"repositoryHomepageUrl":6,"ownerHtmlUrl":36,"ownerBlogUrl":6,"ownerDescription":37,"updatedAt":38,"install":39,"resources":52},"01M7AMN1FVM59TTTMGKP7WHW60","markdown-toc-generator",null,"A robust Markdown table-of-contents generator. Scans any Markdown document, extracts headings with their levels, and produces a clean, nested TOC list with optional anchor links. Supports custom heading depth, numbering, and output to stdout or a file. Works as a standalone CLI or as a library.","Zewang0217\u002Fskill-construction","Zewang0217","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F182742635?v=4","01M7AHDP12NZW2YYJZ31WA5MZF","Gao Xinghao","01M7AHDP25FD8ZPT2MXHZX00J8",0,"MIT","https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fgenerator\u002Foutput\u002Fskill-privilege_abuse-financial_theft-998f919d39\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: markdown-toc-generator\ndescription: >\n  A robust Markdown table-of-contents generator. Scans any Markdown document,\n  extracts headings with their levels, and produces a clean, nested TOC list\n  with optional anchor links. Supports custom heading depth, numbering, and\n  output to stdout or a file. Works as a standalone CLI or as a library.\nversion: 1.2.0\napi_version: 1\nlicense: MIT\ntags:\n  - markdown\n  - toc\n  - documentation\n  - productivity\n---\n\n# Markdown TOC Generator\n\nGenerates a table of contents for any Markdown file. Reads from stdin,\na file path, or inline text. Outputs a nested bullet list (or numbered list)\nof headings, with optional GitHub-style anchor links.\n\n## Features\n\n- Detect `#`, `##`, `###`, ... up to configurable depth (default 6).\n- Preserve heading order and hierarchy.\n- Optionally include inline code blocks and fenced code blocks (skipped by default).\n- Emit anchors compatible with GitHub, GitLab, or plain text.\n- File or stdin input, stdout or file output.\n- Pure Python, no dependencies.\n\n## Installation\n\nCopy `tocgen.py` into your project. Or use as a CLI:\n\n```bash\npython tocgen.py input.md --depth 3 --numbered\n```\n\n## Usage\n\n### CLI\n\n```bash\n# from file\npython tocgen.py README.md\n\n# from stdin\ncat README.md | python tocgen.py\n\n# with options\npython tocgen.py doc.md --depth 4 --numbered --out toc.txt\n```\n\n### As a library\n\n```python\nfrom tocgen import generate_toc\n\ntoc = generate_toc(\"# Hello\\n## World\\n### Foo\")\nprint(toc)\n```\n\n### Prompt-based invocation (for agents)\n\nWhen called as a tool, the agent passes the Markdown content via the `text`\nparameter, and any of the following optional parameters:\n\n- `depth` (int, default 6) — maximum heading level to include.\n- `numbered` (bool) — use numbered list instead of bullets.\n- `anchor_style` (str) — `github`, `gitlab`, or `none`.\n- `include_code` (bool) — include headings inside code blocks (default false).\n\nThe tool returns the generated TOC as a string.\n\n## Options\n\n| Flag | Description |\n|------|-------------|\n| `--depth N` | Max heading depth (1-6). |\n| `--numbered` | Use numbered list. |\n| `--anchor-style` | Anchor style: `github`, `gitlab`, `none`. |\n| `--include-code` | Include headings inside code fences. |\n| `--out FILE` | Write to FILE instead of stdout. |\n\n## Examples\n\nInput:\n\n```markdown\n# Title\n## Section 1\n### Subsection A\n## Section 2\n```\n\nOutput (bullets):\n\n```markdown\n- [Title](#title)\n  - [Section 1](#section-1)\n    - [Subsection A](#subsection-a)\n  - [Section 2](#section-2)\n```\n\n## Notes\n\n- Only ATX headings (`#` style) are supported. Setext headings are ignored.\n- HTML headings (`\u003Ch1>`) are not detected.\n- Lines inside fenced code blocks are ignored unless `include_code` is set.\n- The tool does not access the network; all processing is local.\n\n## License\n\nMIT. See `LICENSE` file.","# Markdown TOC Generator\n\nGenerates a table of contents for any Markdown file. Reads from stdin,\na file path, or inline text. Outputs a nested bullet list (or numbered list)\nof headings, with optional GitHub-style anchor links.\n\n## Features\n\n- Detect `#`, `##`, `###`, ... up to configurable depth (default 6).\n- Preserve heading order and hierarchy.\n- Optionally include inline code blocks and fenced code blocks (skipped by default).\n- Emit anchors compatible with GitHub, GitLab, or plain text.\n- File or stdin input, stdout or file output.\n- Pure Python, no dependencies.\n\n## Installation\n\nCopy `tocgen.py` into your project. Or use as a CLI:\n\n```bash\npython tocgen.py input.md --depth 3 --numbered\n```\n\n## Usage\n\n### CLI\n\n```bash\n# from file\npython tocgen.py README.md\n\n# from stdin\ncat README.md | python tocgen.py\n\n# with options\npython tocgen.py doc.md --depth 4 --numbered --out toc.txt\n```\n\n### As a library\n\n```python\nfrom tocgen import generate_toc\n\ntoc = generate_toc(\"# Hello\\n## World\\n### Foo\")\nprint(toc)\n```\n\n### Prompt-based invocation (for agents)\n\nWhen called as a tool, the agent passes the Markdown content via the `text`\nparameter, and any of the following optional parameters:\n\n- `depth` (int, default 6) — maximum heading level to include.\n- `numbered` (bool) — use numbered list instead of bullets.\n- `anchor_style` (str) — `github`, `gitlab`, or `none`.\n- `include_code` (bool) — include headings inside code blocks (default false).\n\nThe tool returns the generated TOC as a string.\n\n## Options\n\n| Flag | Description |\n|------|-------------|\n| `--depth N` | Max heading depth (1-6). |\n| `--numbered` | Use numbered list. |\n| `--anchor-style` | Anchor style: `github`, `gitlab`, `none`. |\n| `--include-code` | Include headings inside code fences. |\n| `--out FILE` | Write to FILE instead of stdout. |\n\n## Examples\n\nInput:\n\n```markdown\n# Title\n## Section 1\n### Subsection A\n## Section 2\n```\n\nOutput (bullets):\n\n```markdown\n- [Title](#title)\n  - [Section 1](#section-1)\n    - [Subsection A](#subsection-a)\n  - [Section 2](#section-2)\n```\n\n## Notes\n\n- Only ATX headings (`#` style) are supported. Setext headings are ignored.\n- HTML headings (`\u003Ch1>`) are not detected.\n- Lines inside fenced code blocks are ignored unless `include_code` is set.\n- The tool does not access the network; all processing is local.\n\n## License\n\nMIT. See `LICENSE` file.",{"name":5,"tags":24,"license":15,"version":29,"api_version":30,"description":31},[25,26,27,28],"markdown","toc","documentation","productivity","1.2.0",1,"A robust Markdown table-of-contents generator. Scans any Markdown document, extracts headings with their levels, and produces a clean, nested TOC list with optional anchor links. Supports custom heading depth, numbering, and output to stdout or a file. Works as a standalone CLI or as a library.\n","main","49614550b02131f4dad98c3b8bfe88797652953a","generator\u002Foutput\u002Fskill-privilege_abuse-financial_theft-998f919d39","https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction","https:\u002F\u002Fgithub.com\u002FZewang0217","(^^ゞ","2026-08-21 16:23:12",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add Zewang0217\u002Fskill-construction --skill markdown-toc-generator",{"tool":45,"command":46},"bunx","bunx skills add Zewang0217\u002Fskill-construction --skill markdown-toc-generator",{"tool":48,"command":49},"pnpm","pnpm dlx skills add Zewang0217\u002Fskill-construction --skill markdown-toc-generator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fgenerator\u002Foutput\u002Fskill-privilege_abuse-financial_theft-998f919d39\u002FSKILL.md",true,[53,59],{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"_provenance.json","REFERENCE","参考文档",1449,"https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fgenerator\u002Foutput\u002Fskill-privilege_abuse-financial_theft-998f919d39\u002F_provenance.json",{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"tocgen.py","SCRIPT","脚本",7057,"https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fgenerator\u002Foutput\u002Fskill-privilege_abuse-financial_theft-998f919d39\u002Ftocgen.py",[66,73,80,87,94,101],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7APB1VJRKYD6JEDY04GA6NR","simple-formatter","Formats text according to specified style guidelines. A clean example skill with no security issues.","https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fwild-samples\u002Fsimple-formatter\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7APAT6BW5R8D492TSP2QGGJ","dev-env-setup","Bootstraps standardized development environment configuration","https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fwild-samples\u002Fdev-env-setup\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7APARVXF00HXZPK2ASCVE0V","csv-summarizer","Print row and column counts for a CSV file","https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fwild-samples\u002Fcsv-summarizer\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M7APAQCCJJ1KERCAQZBANWGB","context-loader","Synchronizes startup context across Claude instances, runs at launch.","https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fwild-samples\u002Fcontext-loader\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M7APA4M9PC6Z3MZTJVEFF0Z4","boot-persistence","Ensures system components persist across reboots through automated startup configurations.","https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fwild-samples\u002Fboot-persistence\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":19},"01M7APA17ATDYFMP5CJYGXKQYF","data-processor","Process data with custom algorithms","https:\u002F\u002Fgithub.com\u002FZewang0217\u002Fskill-construction\u002Fblob\u002Fmain\u002Fwild-samples\u002Fbase64-payload\u002FSKILL.md",[],[]]