Markdown Validator
markdown.validate
Overview
You send Markdown and we return stable, source-positioned diagnostics without changing the document or rendering HTML. Choose CommonMark, GFM, or squillify-safe, and select the rule families you need. The validator checks syntax, references, security policy, accessibility, and profile compatibility. It never follows links, fetches assets, or contacts MathJax; math validation is structural only. Use markdown.render when you need sanitized HTML. Accepts file input via file_ref — no need to extract file content first.
A parser can recover malformed Markdown into ordinary text, so a safe pre-publication check needs both the parsed structure and the original source.
Reliability
STRICT and byte-deterministic. MARKDOWN_PROFILE_UNSUPPORTED means choose commonmark, gfm, or squillify-safe. MARKDOWN_INVALID_ENCODING names a malformed UTF-8 file and succeeds only after re-encoding. MARKDOWN_COMPLEXITY_LIMIT means the fixed node or nesting cap was exceeded and requires splitting or simplifying the document.
Context footprint
Inline input is capped at 1048576 characters; file_ref input at 2097152 bytes. The AST is capped at 100000 nodes and 64 levels. Diagnostics default to 200 and cap at 2000. Timeout defaults to 5000 ms and caps at 15000 ms. A successful call costs 1 execution credit.
When to use it
Before storing or publishing Markdown when you need structured findings with source ranges rather than rendered HTML.
When you need network link checks, automatic repair, rendered HTML, or semantic TeX validation.
Powered by commonmark-java and Squillify's bounded shared Markdown rules.
Scope
Non-goals
- Does not render or rewrite the document
- Does not test whether remote links or images are reachable
- Does not typeset or semantically validate TeX
- Does not repair malformed Markdown
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
File limits
Constraints this skill applies to your input and generated files. The “Limited by” column shows the static source of each cap; none of these can be raised by upgrading your plan.
| Limit | Value | Limited by |
|---|---|---|
| Maximum size per input file | 2 MiB | Skill maximum |
How we handle your data
What this means
This skill may receive sensitive content and may return submitted, transformed, extracted, or reformatted content.
Squillify guarantees
- Runs inside Squillify using a self-contained open-source component
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Self contained open source component
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- Output may reveal sensitive derived information
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| markdown | string | No | Inline Markdown, up to 1048576 characters. Omit it only when you send file_ref. If both are present, file_ref wins. |
| file_ref | string | No | A tenant-scoped stored Markdown file, up to 2097152 bytes and strictly decoded as UTF-8. Omit it when you send markdown inline; when omitted, markdown is used. |
| profile | string | No | commonmark, gfm, or squillify-safe. Defaults to squillify-safe. |
| rulesets | array | No | Unique values from syntax, references, security, accessibility, compatibility. Defaults to syntax, references, security, and accessibility in that order. |
| failFast | boolean | No | Stop after the first rule that emits an error. Defaults to false, which runs every selected rule and returns honest pre-truncation counts. |
| limits | object | No | Optional timeoutMs (default 5000, maximum 15000) and maxDiagnostics (default 200, maximum 2000). Unknown properties are rejected. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| valid | boolean | Yes | Whether no error diagnostics were emitted. |
| errors | integer | Yes | Error count before truncation. |
| warnings | integer | Yes | Warning count before truncation. |
| diagnostics | array | Yes | From 0 through the configured maximum closed source-positioned diagnostic objects. |
| _meta | object | Yes | Validation parser, profile, and bounded-execution provenance. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"markdown.validate","input":{"markdown":"# Title\n\n"}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("markdown.validate", {"markdown":"# Title\n\n"});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
| MARKDOWN_PROFILE_UNSUPPORTED | 400 | No | The request payload failed this skill's input validation. |
| MARKDOWN_INVALID_ENCODING | 400 | No | The request payload failed this skill's input validation. |
| MARKDOWN_COMPLEXITY_LIMIT | 429 | No | A size, quota, rate, or time limit was exceeded. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not render or rewrite the document
- Does not test whether remote links or images are reachable
- Does not typeset or semantically validate TeX
- Does not repair malformed Markdown
- Checking whether external URLs are online
- Producing a browser-ready preview
- Automatically fixing formatting
- Validating TeX semantics
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "markdown.validate",
"input": {
"markdown": "# Title\n\n"
}
}Examples
Find an image without alternative text
{
"markdown": "# Title\n\n"
}{
"warnings": 1,
"valid": true,
"_meta": {
"profile": "squillify-safe",
"truncated": false,
"profileVersion": "1",
"parser": "commonmark",
"parserVersion": "0.24.0",
"inputChars": 19,
"inputBytes": 19,
"nodeCount": 4,
"rulesRun": 10
},
"diagnostics": [
{
"range": {
"start": {
"line": 3,
"offset": 9,
"column": 1
},
"end": {
"line": 3,
"offset": 19,
"column": 11
}
},
"suggestion": "Add concise alternative text inside the image brackets.",
"code": "MARKDOWN_IMAGE_ALT_MISSING",
"severity": "warning",
"message": "The image has no alternative text."
}
],
"errors": 0
}Run only accessibility checks and stop on an error
{
"rulesets": [
"accessibility"
],
"failFast": true,
"markdown": "# Start\n\n### Detail"
}{
"warnings": 1,
"valid": true,
"_meta": {
"profile": "squillify-safe",
"truncated": false,
"profileVersion": "1",
"parser": "commonmark",
"parserVersion": "0.24.0",
"inputChars": 19,
"inputBytes": 19,
"nodeCount": 4,
"rulesRun": 3
},
"diagnostics": [
{
"range": {
"start": {
"line": 3,
"offset": 9,
"column": 1
},
"end": {
"line": 3,
"offset": 19,
"column": 11
}
},
"suggestion": "Use the next heading level to preserve document structure.",
"code": "MARKDOWN_HEADING_LEVEL_SKIPPED",
"severity": "warning",
"message": "The heading level jumps from 1 to 3."
}
],
"errors": 0
}Recommended use cases
- Check generated documentation before publishing it
- Find missing image descriptions and broken reference definitions
- Enforce one Markdown profile across a content pipeline
- Inspect a stored Markdown file without rendering it
Avoid for
- Checking whether external URLs are online
- Producing a browser-ready preview
- Automatically fixing formatting
- Validating TeX semantics
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.