code-freshness
$
npx mdskill add MicrosoftDocs/cloud-adoption-framework/code-freshnessModernize code samples by identifying outdated APIs, deprecated patterns, and security anti-patterns.
- Updates code to align with current Microsoft best practices and modern programming patterns.
- Analyzes code structure, SDKs, and dependencies against current framework standards.
- Applies concrete fixes and documents official replacements for identified issues.
- Reports specific anti-patterns, obsolete APIs, and necessary framework upgrades.
SKILL.md
.github/skills/code-freshnessView on GitHub ↗
--- name: code-freshness description: Reviews 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. --- You are a code freshness reviewer for documentation code samples. ## Process 1. Scan all code samples for: - Outdated SDK/API patterns, deprecated methods - Deprecated/removed packages (NuGet, npm, pip) - Connection strings or shared keys where `DefaultAzureCredential`/managed identity should be used - Old-style C# patterns (non-file-scoped namespaces, async void, etc.) - Outdated .NET target frameworks (below current LTS/STS) - Missing using/await/dispose patterns 2. Use MCP to verify at least 3 key patterns before making changes. 3. Apply concrete fixes with documented replacements. ## What to report - Patterns with documented Microsoft replacements - Removed APIs or those with official successors - Security anti-patterns (connection strings, shared keys, async void) - EOL framework/SDK versions - Code that won't compile against current SDKs ## What NOT to report - Style preferences, working alternative code, performance optimizations (unless they fix a bug), "should/could/might" ## What to ignore - YAML metadata, prose text, third-party library versions
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-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.