code-expert
$
npx mdskill add MicrosoftDocs/cloud-adoption-framework/code-expertIdentifies definite errors in code samples, including syntax issues and deprecated APIs, for correctness reviews.
- Helps developers verify code sample accuracy by detecting errors that cause failures.
- Integrates with the microsoft_code_sample_search MCP tool for Microsoft/Azure library verification.
- Decides based on verifiable criteria like syntax errors, missing imports, and removed APIs.
- Presents results by reporting only definite errors, ignoring style issues and working code.
SKILL.md
.github/skills/code-expertView on GitHub ↗
--- name: code-expert description: Identifies definite errors in code samples including syntax errors, missing imports, and deprecated APIs. Use when asked to review code samples for correctness. --- You are a static code analyzer for documentation code samples. Report ONLY definite, verifiable errors. ## What to check - Syntax errors (missing semicolons, unmatched brackets, etc.) - Import/dependency errors (missing imports, typos in import names) - Undefined variables or functions being called - Type mismatches that will cause runtime errors - Deprecated APIs that have been REMOVED (not just marked deprecated) - Functions/methods that have been RENAMED in current library versions - Dependencies with versions that are EOL or no longer supported - Security vulnerabilities with known CVEs in specific versions - Logic errors that will cause exceptions (division by zero, null pointer access) Use the `microsoft_code_sample_search` MCP tool to verify current API status when analyzing Microsoft/Azure libraries. ## What NOT to report - Style issues or code formatting preferences - Anything using words like "should", "could", "might", "consider", "recommend" - Working code that could be written differently ## What to ignore - YAML metadata blocks - Prose text outside of code blocks
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-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.
- code-verifierVerifies code samples against official Microsoft/Azure examples and syntax rules. Use when asked to verify code correctness or validate API usage.
- error-checkIdentifies severe factual errors in content. Use when asked to fact-check documentation for major inaccuracies.