Add validate-code-samples skill#26
Conversation
Skill Eval Resultsvalidate-code-samples
Overall: 8/8 expectations passed across runnable evals (100%); 3 evals skipped due to missing external files. Eval 3 detail —
Eval 5 detail —
Assessment: The skill's logic for Check B (subs=true) and Check D (JSON validation in console blocks) is correct for the testable cases. The three skipped evals (JSON error detection, callout marker stripping, and false-positive avoidance for Painless/bulk/ellipsis) require actual file content from an
|
Skill Quality Reviewvalidate-code-samplesOverall: A well-specified, highly actionable validation skill with clear step-by-step structure; a few minor internal consistency issues worth fixing before wider use. Strengths:
Issues:
Suggestions:
|
Skill Quality Reviewvalidate-code-samplesOverall: A well-specified, highly actionable validation skill — all three issues from the previous review have been fixed, but Check F references incorrect MCP tool names that will cause it to fail at runtime. Strengths:
Issues:
Suggestions:
|
Skill Eval Resultsvalidate-code-samples
Overall: 19/26 expectations passed (73%) Eval 1 — JSON error with missing comma:
Eval 2 — Callout marker stripping before JSON parse:
Eval 3 —
Eval 4 — Painless triple-quote + console-result ellipsis ❌:
Eval 5 — Clean file, no issues:
Eval 6 — API deprecation check via Elastic Docs MCP ❌:
Assessment: Core validation logic (Checks A–D) is correct and well-tested. Two issues require fixing:
|
Skill Quality Reviewvalidate-code-samplesOverall: All issues from the previous review have been resolved — the skill is now well-specified, actionable, and correct. Strengths:
No blocking issues found. Suggestions:
|
Skill Quality Reviewvalidate-code-samplesOverall: Well-specified and highly actionable — all previously identified issues remain resolved; no new blocking issues found in this run. Strengths:
No blocking issues found. Suggestions:
|
Skill Eval Resultsvalidate-code-samples
Overall: 25/26 expectations passed (96%); 1 expectation requires live MCP server call to verify at runtime. Eval 1 — JSON error with missing comma:
Eval 2 — Callout marker stripping before JSON parse:
Eval 3 —
Eval 4 — Painless triple-quote + console-result ellipsis (previously failing, now fixed):
Eval 5 — Clean file, no issues:
Eval 6 — API deprecation check via Elastic Docs MCP:
Assessment: The skill is in good shape. Both regressions caught in the previous eval run have been fixed:
The remaining open question (Eval 6, expectation 3) is a data freshness issue — whether the live Elastic Docs MCP currently describes
|
Skill Quality Reviewvalidate-code-samplesOverall: Well-specified and highly actionable — previous suggestions have been addressed; no blocking issues remain. Strengths:
No blocking issues found. Suggestions:
|
Skill Eval Resultsvalidate-code-samples
Overall: 25/29 expectations passed (86%) Assessment: The skill performs well across checks A–E (missing language identifiers, subs=true, callout stripping, Painless triple-quote handling, ellipsis normalization, shebang exemption). The only regression is in eval 6 (Check F — API Validation): the
|
Adds a new review skill that checks every code block in Elastic
documentation markdown files against docs-builder style rules.
Checks performed:
- A: Missing language identifier (with suggested fix)
- B: Variable substitution missing subs=true (and unnecessary subs=true)
- C: Inline comments that should be callouts
- D: Invalid JSON in console/console-result blocks, ellipsis in console blocks
- E: Non-reserved domain names in examples
- F: API Validation via Elastic Docs MCP — confirms endpoints exist and
flags deprecated request body fields
Example invocation:
/validate-code-samples docs/reference/elasticsearch/rest-apis/ --output report.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a new review skill that checks every code block in Elastic
documentation markdown files against docs-builder style rules.
Checks performed:
- A: Missing language identifier (with suggested fix)
- B: Variable substitution missing subs=true (and unnecessary subs=true)
- C: Inline comments that should be callouts
- D: Invalid JSON in console/console-result blocks, ellipsis in console blocks
- E: Non-reserved domain names in examples
- F: API Validation via Elastic Docs MCP — confirms endpoints exist and
flags deprecated request body fields
Example invocation:
/validate-code-samples docs/reference/elasticsearch/rest-apis/ --output report.md
29d36df to
9374f46
Compare
Skill Quality Reviewvalidate-code-samplesOverall: Well-specified, highly actionable, and largely solid — one inconsistency between the Strengths:
Issues:
Suggestions:
|
Skill Eval Resultsvalidate-code-samples
Overall: 21/21 expectations passed across evals 1–5 (100%). Eval 6 skipped due to MCP dependency. Assessment: The skill's logic is sound and well-tested. Key behaviors confirmed working:
|
|
@georgewallace Getting there! Could you address the last review? |
Skill Quality Reviewvalidate-code-samplesOverall: Well-specified and highly actionable — the MCP tool name mismatch in Check F identified in previous reviews is still present and remains the one blocking issue. Strengths:
Issues:
Suggestions:
|
Skill Eval Resultsvalidate-code-samples
Overall: 20/23 expectations passed (87%) — 3 skipped due to MCP dependency The skill is well-structured and handles the core validation checks correctly:
|
Skill Quality Reviewvalidate-code-samplesOverall: A thorough, well-structured validation skill with highly specific checks that encode Elastic-specific documentation conventions not covered by model training data. Strengths:
Issues:
Suggestions:
|
Skill Eval Resultsvalidate-code-samples
Overall: 21/21 expectations passed (100%) across graded evals. Eval 6 skipped. The skill instructions are well-structured and correctly handle all tested edge cases: JSON pre-processing (callout marker stripping, Painless triple-quote replacement, console-result ellipsis normalization), substitution variable detection (both missing and unnecessary
|
Skill Quality Reviewdocs-validate-code-samplesOverall: A thorough, well-structured validation skill with clear triggers, highly actionable step-by-step instructions, and strong coverage of Elastic-specific patterns — minimal changes needed. Strengths:
Issues:
Suggestions:
|
Skill Eval Resultsdocs-validate-code-samples
Overall: 21/21 non-MCP expectations passed (100%) · 5 expectations skipped (require Elastic Docs MCP server) The skill instructions are thorough and well-structured. All testable checks (A–E, G, H) have clear, unambiguous rules. The JSON preprocessing pipeline for Check D is particularly well-specified: callout marker stripping, Painless triple-quote replacement, and
|
Updated version from 1.2.0 to 1.0.0 in SKILL.md.
Skill Quality Reviewdocs-validate-code-samplesOverall: A thorough, well-structured validation skill with clear triggers, highly actionable step-by-step instructions, and strong coverage of Elastic-specific patterns — previous version issue resolved, ready to merge. Strengths:
Suggestions (non-blocking):
|
Skill Eval Resultsdocs-validate-code-samples
Overall: 21/21 expectations passed across runnable evals (100%) Eval detailsEval 1 — JSON error detection (Check D): Eval 2 — Callout marker stripping (Check D pre-processing): Eval 3 — Substitution variable detection (Check B): Eval 4 — Painless triple-quoted string & console-result ellipsis (Check D pre-processing): Eval 5 — Clean file, no issues (Checks A, C, D): Eval 6 — API validation via elastic-docs MCP (Check F): Assessment: The skill is well-designed. The pre-processing pipeline (callout stripping, Painless triple-quote replacement, ellipsis normalisation) prevents false positives. The exemptions (shebang lines, standalone comments) are correctly specified. Eval 6 is the only case that requires the elastic-docs MCP server at runtime — consider adding a note in the eval's
|
Summary
Adds a new
validate-code-samplesskill that checks every code block in Elastic documentation markdown files against docs-builder style rules.Checks performed
docset.ymlsubs section; only flags{{var}}patterns that match defined variable names (no false positives from log output or template syntax)# comment/// commentannotations that should use callout markers insteadconsoleandconsole-resultblocks with full pre-processing (callout marker stripping, Painless triple-quote replacement, NDJSON bulk handling, ellipsis normalization); flags...in copyable console blocksFalse positive handling
<!-- -->){or[)"key": ...value ellipsis inconsole-resultblocks{{var}}ifvaris a key indocset.ymlsubs:Report format
^pointer at the exact error location for JSON errorsExample invocation
🤖 Generated with Claude Code