data-quality-audit
Skill9 starsChanged 3 months agoMITView on GitHub
"I spent two weeks debugging a model that kept outputting garbled text. The issue was 0.3% of my training data had HTML entities that the tokenizer split into hundreds of tokens, dominating the loss landscape." Key lessons: 1. Token length distribution matters — outlier-length documents dominate gradient updates disproportionately 2. Deduplication is not optional — even 1% duplicate data causes memorization artifacts 3. Tokenizer fertility (chars/token) should be consistent — sudden drops indicate encoding bugs 4. BOS/EOS tokens must be…
4 other projects use a version of this.
Adopted by
Most recently taken up by
- motao123/dev-workflow-kittheir own version, first seen Jun 13, 2026
- sp1e/claude-skillstheir own version, first seen Jun 9, 2026
- vermapragya/analytics-skilltheir own version, first seen Jun 6, 2026
- antonrisch/db-skillstheir own version, first seen Jan 24, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- antonrisch/db-skills★ 9same name
- motao123/dev-workflow-kit★ 1same name
- sp1e/claude-skills★ 1same name
- vermapragya/analytics-skill★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository109 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- agent/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- router/CLAUDE.mdCLAUDE.md
- .agents/skills/llms.txtllms.txt
- agent-harnessSkill
- auto-fixSkill
- brain-dumpSkill
- industrial-brutalist-uiSkill
- changelog-enforcerSkill
- checkpoint-strategySkill
- context-primeSkill
- cooldown-resumeSkill
- council-reviewSkill
- debug-tracerSkill
- dependency-auditSkill
- deslopSkill
- docs-syncSkill
- duplicate-threadSkill
- email-triageSkill
- fabric-patternsSkill
- feature-flagSkill
- git-hygieneSkill
- graphifySkill
- implementation-plannerSkill
- insightsSkill
- issue-resolverSkill
- learn-ruleSkill
- local-ai-querySkill
- lr-schedule-advisorSkill
- minimalist-uiSkill
- modularity-reviewSkill
- full-output-enforcementSkill
- parallel-agentsSkill
- parallel-worktreesSkill
- prompt-librarySkill
- prompt-transparencySkill
- pro-workflowSkill
- redesign-existing-projectsSkill
- release-readinessSkill
- replay-learningsSkill
- repo-memory-updaterSkill
- repowise-intelligenceSkill
- researchSkill
- resource-panelSkill
- risky-module-reviewSkill
- sandboxed-execSkill
- scope-guardSkill
- self-improveSkill
- session-handoffSkill
- skill-composerSkill
- smart-commitSkill
- high-end-visual-designSkill
- stitch-design-tasteSkill
- system-prompt-auditSkill
- task-alive-updatesSkill
- task-scoperSkill
- design-taste-frontendSkill
- test-first-executorSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Tokenizer fertility (chars/token): should be consistent — sudden drops indicate encoding bugs
- Distinctive: line 59
Every document has BOS token at start
- Distinctive: line 60
Every document has EOS token at end
- Very specific: line 61
No document contains raw <unk> tokens (tokenizer coverage issue)
- Distinctive: line 62
No document contains padding tokens mid-sequence
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: data-quality-audit
Purpose
Audit training data and tokenizer pipelines for quality issues that silently degrade LLM training. Data problems are the #1 underdiagnosed cause of poor model performance — most tutorials skip this entirely.
Trigger
Use when:
- Preparing a dataset for LLM pretraining or fine-tuning
- Model outputs seem degenerate (repetition, wrong language, truncated responses)
- Tokenizer was recently changed or vocabulary was updated
- Merging datasets from multiple sources
Background (Why This Matters)
From LLM-from-scratch practitioners:
"I spent two weeks debugging a model that kept outputting garbled text. The issue was 0.3% of my training data had HTML entities that the tokenizer split into hundreds of tokens, dominating the loss landscape."
Key lessons:
- Token length distribution matters — outlier-length documents dominate gradient updates disproportionately
- Deduplication is not optional — even 1% duplicate data causes memorization artifacts
- Tokenizer fertility (chars/token) should be consistent — sudden drops indicate encoding bugs
- BOS/EOS tokens must be consistent — missing end tokens cause the model to never learn to stop
- Language distribution — unlabeled multilingual data causes unexpected behavior in monolingual models
Usage
/data-quality-audit [dataset_path_or_glob] [--tokenizer model_name_or_path] [--sample 10000]Checks Performed
1. Token Length Distribution
P5: [tokens]
P50: [tokens]
P95: [tokens]
P99: [tokens]
MAX: [tokens] ← flag if >> context_window
WARNING: Documents at P99+ length will be truncated, losing their tail content.
Consider splitting or filtering documents > 0.8 * context_window.2. Deduplication Check
- Exact match on first 64 tokens (cheap, catches near-duplicates)
- MinHash LSH for near-duplicate detection (sampled)
- Reports estimated duplicate % in dataset
3. Tokenizer Fertility Check
# chars_per_token should be stable across document types
# English prose: ~4.0 chars/token
# Code: ~3.0-3.5 chars/token
# Sudden drop to <2.0 suggests tokenizer is splitting on noise
fertility = total_chars / total_tokens4. Special Token Consistency
- Every document has BOS token at start
- Every document has EOS token at end
- No document contains raw
<unk>tokens (tokenizer coverage issue) - No document contains padding tokens mid-sequence
5. Language Detection (if langdetect available)
- Reports language distribution
- Flags documents with mixed-language content
- Warns if distribution differs from intended training target
6. Content Quality Signals
- Repetition ratio: flag documents where any 4-gram repeats >5x
- Average line length: flag documents with lines >500 chars (likely minified/encoded data)
- Punctuation density: flag documents with <1% punctuation (may be code or structured data)
- HTML/XML tag density: flag documents with >5% tag content
Output Format
=== Data Quality Audit Report ===
Dataset: [path]
Sampled: [N] documents
[PASS/WARN/FAIL] Token Length Distribution
[PASS/WARN/FAIL] Deduplication
[PASS/WARN/FAIL] Tokenizer Fertility
[PASS/WARN/FAIL] Special Token Consistency
[PASS/WARN/FAIL] Language Distribution
[PASS/WARN/FAIL] Content Quality
CRITICAL ISSUES: N
WARNINGS: N
Estimated affected documents: [N] ([%] of dataset)
Recommended Actions:
1. Filter documents where token_length > [threshold]
2. Remove [N] near-duplicate clusters
3. [other specific actions]Common Dataset Issues by Source
| Source | Common Issue | Fix |
| Common Crawl | HTML artifacts, boilerplate | trafilatura extraction |
| GitHub | Minified JS/CSS, generated files | Filter by file extension |
| Wikipedia | Citation markup, table syntax | WikiExtractor preprocessing |
| Books | Gutenberg headers/footers | Trim first/last 1000 chars |
| Deleted/removed comments ([deleted]) | Filter short or placeholder text | |
| PDFs | OCR noise, column merging artifacts | Quality score threshold |
Integration Points
- Pairs with
dependency-auditfor checking data pipeline library versions - Pairs with
training-stability-monitorwhen data issues cause training instability - Pairs with
insightsfor tracking data quality metrics across dataset versions
Notes
- This skill is read-only — it analyzes but does not modify data
- For large datasets (>100GB), always use
--sampleto get fast estimates - Re-run after any tokenizer change — fertility and special token checks are tokenizer-dependent
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

