np:chunk-context-check

Detect context loss from stripped headers in Mastra Markdown chunks.

11|1|Updated Dec 1, 2025
One-click install
npx skills add https://github.com/kayac/nepp-chan --skill np-chunk-context-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: np:chunk-context-check
Source: https://github.com/kayac/nepp-chan/tree/main/.claude/skills/np-chunk-context-check
Command: npx skills add https://github.com/kayac/nepp-chan --skill np-chunk-context-check

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill detects when Mastra's Markdown chunking strips header information, causing context loss that degrades semantic search and retrieval quality.

Core Features & Use Cases

  • Detects when headers are stripped from chunks and assesses impact on context and disambiguation.
  • Compares multiple chunks in the same file to identify structurally similar content that could collide in vector space.
  • Generates a remediation plan with actionable steps to preserve or reintroduce contextual headers.
  • Use Case: For RAG pipelines where accurate chunk context is critical for answering domain-specific questions.

Quick Start

Run the np:chunk-context-check against a sample Markdown corpus to identify chunks with missing context and generate a remediation plan.

Frequently Asked Questions about np:chunk-context-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my RAG retrieval return irrelevant chunks from markdown documents?

Markdown chunking often strips header context, causing irrelevant RAG retrieval. This Skill identifies chunks missing essential title or section information and generates a remediation plan to restore contextual headers.

How do I detect context loss in Mastra markdown chunking?

To detect context loss in Mastra markdown chunking, run this Skill against your corpus. It uses a context_coverage calculator and structural similarity detector to flag chunks stripped of critical header metadata.

When do I need to check for dropped headers in my RAG knowledge base?

You need to check for dropped headers when your RAG knowledge base relies on markdown documents where section titles are essential for correct retrieval and semantic disambiguation of domain-specific answers.

How do I fix structurally similar chunks colliding in vector space?

To fix structurally similar chunks colliding in vector space, use this Skill to compare chunks within the same file. It identifies structural similarities and provides actionable steps to preserve or reintroduce contextual headers.

Can I check markdown chunks without configuring external dependencies?

Yes, you can check markdown chunks without external dependencies. This Skill operates standalone to analyze your Mastra documents, calculate context coverage, and output a structured remediation report.

What is the best way to prevent semantic search degradation from markdown chunking?

The best way to prevent semantic search degradation is to identify stripped headers early. This Skill diagnoses context loss across chunks and guides remediation to ensure header information supports accurate vector retrieval.