document-validator
Skill0 starsChanged 4 months agoApache-2.0View on GitHub
Unified linter that validates both YAML frontmatter schemas and Markdown style best practices (heading nesting, blank line spacing, trailing whitespace, end-of-file newlines) across all repository documentation.
- Installs packages
In this repository78 other files it gives its agents.
- a11y-debuggingSkill
- accidental-data-loss-preventionSkill
- agy-customizationsSkill
- alphafold-database-fetch-and-analyzeSkill
- alphagenome-single-variant-analysisSkill
- antigravity-guideSkill
- bigquery-ai-mlSkill
- bigquery-bigframesSkill
- bigquery-data-transfer-serviceSkill
- bigquery-graphSkill
- bigquery-sqlSkill
- building-data-appsSkill
- chembl-databaseSkill
- chrome-devtoolsSkill
- chrome-extensionsSkill
- clinical-trials-databaseSkill
- clinvar-databaseSkill
- credentialsSkill
- data-autocleaningSkill
- dataform-bigquerySkill
- dbsnp-databaseSkill
- dbt-bigquerySkill
- debug-optimize-lcpSkill
- discovering-gcp-data-assetsSkill
- embl-ebi-olsSkill
- encode-ccres-databaseSkill
- enforcing-resource-attributionSkill
- ensembl-databaseSkill
- federate-lakehouse-catalogSkill
- foldseek-structural-searchSkill
- gcloud-auth-verificationSkill
- gcp-composer-troubleshootingSkill
- gcp-dataflowSkill
- gcp-data-pipelinesSkill
- gcp-managed-airflow-migrationsSkill
- gcp-pipeline-orchestrationSkill
- gcp-pipeline-resource-provisioningSkill
- gcp-sparkSkill
- gcs-security-assessmentSkill
- gnomad-databaseSkill
- google-antigravity-sdkSkill
- gtex-databaseSkill
- human-protein-atlas-databaseSkill
- interpro-databaseSkill
- jaspar-databaseSkill
- link-checkSkill
- literature-search-arxivSkill
- literature-search-biorxivSkill
- literature-search-europepmcSkill
- literature-search-openalexSkill
- managing-python-dependenciesSkill
- memory-leak-debuggingSkill
- ml-best-practicesSkill
- modern-web-guidanceSkill
- ncbi-sequence-fetchSkill
- notebook-guidanceSkill
- openfda-databaseSkill
- opentargets-databaseSkill
- pdb-databaseSkill
- permissioned-githubSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Run it locally via the Claude client skill, or directly from the command line, before committing — see the repo root README.md's "No CI …
- Distinctive: line 37
Trailing Whitespace: No line may end with trailing space or tab characters.
- Very specific: line 54
Add it to the appropriate group in CONTRIBUTING.md's Tag Taxonomy section.
- Very specific: line 55
Add it to the matching group in TAG_TAXONOMY in document_validator.py, in the same commit.
- Very specific: line 73
All files in the skills/ directory are fully skipped (frontmatter and style) — they're this skill's own meta-docs.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: document-validator
Unified validator for YAML frontmatter schemas and Markdown style best practices in this repository.
Run it locally via the Claude client skill, or directly from the command line, before committing —
see the repo root README.md's "No CI merge gate" note: there is currently no GitHub Actions workflow running this.
Contents
- What it checks
- Tag taxonomy
- Files excluded from validation
- Running locally
- Known issue fixed: Marp double-frontmatter
- Extending the schema
What it checks
1. Frontmatter Validation
- Checks for required fields:
title,tags,category,type,status,version,review_owner,review_interval_days,last_reviewed,next_review,changelog,classification. - Checks values of
status,type,classificationagainst allowed enumerations. - Enforces
sop_idwhentype: sop. - Enforces DPO approval fields (
approved_by,approved_date) whenstatus: publishedandtype: policy(this includes compliance documents likeDPIA.md, which usestype: policy— there is no separate filename-based check). - Enforces date math checks:
next_review == last_reviewed + review_interval_days(+-3 day tolerance). - Enforces tag taxonomy matching.
2. Markdown Style Validation
- Heading Nesting Hierarchy: Heading levels must only increment by 1 level at a time (e.g. H2 followed by H3, H4; H3 cannot directly follow H1).
- Blank Line Spacing: Headings must be surrounded by blank lines. (Skipped for Marp slides).
- End-of-File Newline: Files must end with exactly one newline character (no trailing empty lines).
- Trailing Whitespace: No line may end with trailing space or tab characters. (Skipped inside fenced code blocks).
Tag taxonomy
TAG_TAXONOMY / ALLOWED_TAGS in document_validator.py must always mirror the
Tag Taxonomy section in the repo root CONTRIBUTING.md — same rule as
ALLOWED_TYPES/ALLOWED_STATUSES (see Extending the schema
below): two independent, hand-maintained copies of the same list, updated together
in one commit.
An unknown tag fails the check with an actionable error naming the offending tag, the full allowed list, and where to add a new one.
To add a new tag:
- Add it to the appropriate group in
CONTRIBUTING.md's Tag Taxonomy section. - Add it to the matching group in
TAG_TAXONOMYindocument_validator.py, in the same commit.
Files excluded from validation
The following files are exempt from the frontmatter schema requirement only
(they are repository/tooling infrastructure, not operational SOPs/guides, so
they legitimately have no YAML frontmatter) — but Markdown style rules
(heading blank lines, trailing whitespace, EOF newline, heading nesting) still
apply to them like any other .md file, and --fix corrects them too:
README.mdCONTRIBUTING.mdCHANGELOG.mdAGENTS.mdCODE_OF_CONDUCT.mdSECURITY.md
All files in the skills/ directory are fully skipped (frontmatter and style) — they're this skill's own meta-docs.
Running locally
Requires Python 3.9+ and PyYAML.
# Install dependencies
pip install -r skills/document-validator/requirements.txt
# Run linter on the current directory
python skills/document-validator/document_validator.py
# Run on a specific path
python skills/document-validator/document_validator.py path/to/folder
# Run unit tests
pip install -r skills/document-validator/requirements-dev.txt
pytest skills/document-validator/tests/ -vKnown issue fixed: Marp double-frontmatter
service-overview-presentation.md previously had two --- blocks — the standardised
frontmatter block followed by the original Marp block (marp: true, theme: default,
paginate: true). Marp only reads the first --- block, so marp: true was
silently ignored and the file no longer rendered as a slide deck.
Fix: merge both YAML blocks into one — put marp, theme, and paginate inside
the same frontmatter block as title, tags, etc. See service-overview-presentation.md
for the current source of truth.
The duplicate-block detector only flags a genuine second YAML mapping after the
first --- close — a document body that simply opens with a Markdown horizontal
rule (--- followed by prose) is not flagged.
Extending the schema
ALLOWED_TYPES, ALLOWED_STATUSES, and TAG_TAXONOMY in this script must always
mirror the type, status, and Tag Taxonomy sections documented in the repo root
CONTRIBUTING.md. They are independent, hand-maintained copies of the same schema —
if you change one without the other, the validator will start rejecting (or silently
accepting) values that disagree with the documented contract. Update both in the
same commit.
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.

