githubnext/gh-aw-workshop/markdown-chunker
- community
Checking that the SKILL.md file is still in the repository.
Parse markdown and QMD files into AST-based section chunks for similarity analysis. Explains the chunking algorithm, output format, and how to interpret chunk and cluster data.
Install
npx vskill@latest install githubnext/gh-aw-workshop/markdown-chunkerSKILL.md
Markdown Chunker Skill
Use this skill when you need to understand how the markdown-dedup workflow parsed markdown files into sections and what the chunk data means.
Parsing Strategy
The workflow uses a heading-based AST chunker that processes each file in two passes:
- Primary (mistletoe AST): If
mistletoeis importable, the file is parsed
to a full AST and sections are extracted from Heading nodes. This gives accurate text content free of raw markdown syntax characters.
- Fallback (regex): If mistletoe is unavailable, a regex-based parser splits
on heading lines (^#{1,6}\s+) while tracking fenced code blocks to avoid false heading matches inside code examples.
Both approaches produce the same output schema.
Chunk Schema
Each chunk object in md-chunks.json has:
| Field | Description | |
|---|---|---|
file | Repository-relative path | |
level | Heading depth (1–6) | |
title | Heading text (stripped) | |
heading_path | Breadcrumb from document root to this section | |
text | Heading title + content concatenated — used for similarity scoring | |
word_count | Whitespace-separated word count of text; chunks with fewer than 20 words are excluded |
Cluster Schema
Each cluster object in md-clusters.json has:
| Field | Description | |
|---|---|---|
max_similarity | Highest cosine similarity among all pairs in the cluster | |
files | Distinct source files; always ≥ 2 (same-file pairs are excluded) |
Similarity Algorithm
- Tokenize each chunk's
text(lowercase, alphabetical words ≥ 3 characters). - Compute IDF over all chunks:
idf(t) = log(N / (1 + df(t))). - Build TF-IDF vectors per chunk.
- Score all cross-file pairs; keep pairs with cosine similarity ≥ 0.55.
- Union-Find groups overlapping pairs into clusters.
- Discard clusters where all members belong to the same file.
Interpreting Similarity Scores
| Score | Typical meaning | |
|---|---|---|
| ≥ 0.80 | Near-verbatim duplicate — very likely genuine redundancy | |
| 0.65–0.80 | Strong overlap — probably the same concept in different words | |
| 0.55–0.65 | Partial overlap — shared vocabulary; may be intentional parallel structure |
When max_similarity is in the lower band, read both sections in full before recommending consolidation.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.github/skills/markdown-chunker/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/githubnext/gh-aw-workshop/markdown-chunker)