code-verifier
$
npx mdskill add MicrosoftDocs/cloud-adoption-framework/code-verifierVerifies code samples for syntax and API correctness against official Microsoft/Azure examples.
- Helps ensure code samples are executable and use valid APIs in documentation.
- Integrates with Microsoft/Azure SDKs and uses microsoft_code_sample_search for verification.
- Checks for syntax errors, invalid arguments, and pseudo-code to validate correctness.
- Reports issues like compilation errors and API mismatches without style or formatting feedback.
SKILL.md
.github/skills/code-verifierView on GitHub ↗
--- name: code-verifier description: Verifies code samples against official Microsoft/Azure examples and syntax rules. Use when asked to verify code correctness or validate API usage. --- You are a code verifier for documentation code samples. Ensure code samples are syntactically correct and use valid, existing APIs. ## Process 1. Identify every code block (Python, C#, PowerShell, CLI, JavaScript, etc.). 2. For Azure/Microsoft SDKs, verify the methods and classes actually exist using `microsoft_code_sample_search`. 3. Check for "pseudo-code" that pretends to be real code (e.g., `client.do_magic_thing()`). 4. Meaningful placeholders are fine (e.g., `<resource-group-name>`), but made-up API calls are not. ## What to check - Syntax errors that would prevent compilation/execution - Invalid arguments or parameters for well-known CLI commands - Mismatched opening/closing brackets/braces - Variable name inconsistencies (defining `myVar` but using `my_var`) ## What NOT to report - Style (linting) issues unless they break execution - Comments or docstrings - Formatting simplifications
More from MicrosoftDocs/cloud-adoption-framework
- acronym-checkEnsures abbreviations are expanded on first use per Microsoft style. Use when asked to check acronyms or abbreviations in documentation.
- active-voiceRewrites passive voice to active/imperative and enforces second person. Use when asked to fix passive voice or improve writing directness.
- api-consistencyEnsures Azure REST API and CLI consistency across a document. Use when asked to check API calls, CLI parameters, or REST consistency.
- azure-validationValidates portal navigation paths, detects contradictions against Microsoft Learn documentation, and checks alignment with current Azure implementation standards. Use when asked to verify Azure portal instructions or validate content accuracy.
- check-accessibilityChecks image accessibility compliance per Microsoft Learn standards. Use when asked to review images for alt text, lightbox paths, or complex image markup.
- check-relevanceAssesses whether guidance is still relevant and framed for modern Azure approaches. Use when asked to check if content is still current or strategically relevant.
- cloud-adoptionHow to adopt and integrate the Microsoft Azure cloud into your organization. Strategy, policies, organizational readiness, architecture, platform landing zone, governance, security, health, and operations.
- code-expertIdentifies definite errors in code samples including syntax errors, missing imports, and deprecated APIs. Use when asked to review code samples for correctness.
- code-freshnessReviews code samples for modern patterns, deprecated APIs, outdated dependencies, and alignment with current Microsoft best practices. Use when asked to update or modernize code samples.
- error-checkIdentifies severe factual errors in content. Use when asked to fact-check documentation for major inaccuracies.