Analyze code examples in SKILL.md files for correctness using static analysis and TypeScript compilation
Installation
Details
Usage
After installing, this skill will be available to your AI coding assistant.
Verify installation:
npx agent-skills-cli listSkill Instructions
name: umbraco-skill-code-analyzer description: Analyze code examples in SKILL.md files for correctness using static analysis and TypeScript compilation version: 1.0.0 location: managed allowed-tools: Bash
Umbraco Skill Code Analyzer
Static analysis tool that validates code examples in SKILL.md files.
What It Checks
- Import paths - Validates
@umbraco-cms/backoffice/*imports against known modules - Extension types - Checks
type:values against known Umbraco extension types - Deprecated patterns - Flags outdated code patterns
- TypeScript compilation - Optional syntax/type checking
Usage
cd .claude/skills/umbraco-skill-code-analyzer/scripts
npm install --silent
npx tsx analyze-code.ts
Environment Variables
| Variable | Default | Description |
|---|---|---|
CHECK_TYPESCRIPT | true | Set to false to skip TypeScript compilation |
Output
Produces code-analysis-report.json in project root with structure:
{
"timestamp": "...",
"skillsScanned": 69,
"codeBlocksAnalyzed": 473,
"issuesFound": 34,
"skills": [
{
"skillPath": "...",
"skillName": "...",
"codeBlocks": 5,
"issues": [
{
"line": 33,
"type": "invalid-import",
"value": "@umbraco-cms/backoffice/unknown",
"message": "Unknown import path",
"severity": "warning"
}
]
}
],
"statistics": {
"totalCodeBlocks": 473,
"typescriptBlocks": 368,
"importIssues": 16,
"extensionTypeIssues": 21,
"compilationErrors": 0,
"deprecatedPatterns": 15
}
}
Issue Types
| Type | Severity | Description |
|---|---|---|
invalid-import | warning | Unknown @umbraco-cms/backoffice/* module |
unknown-extension-type | warning | Unrecognized extension type: value |
deprecated-pattern | warning | Outdated code pattern detected |
typescript-error | error | TypeScript compilation failed |
Updating Known Values
The script maintains lists of known modules and extension types. To update:
- Edit
analyze-code.ts - Add to
KNOWN_BACKOFFICE_MODULESset - Add to
KNOWN_EXTENSION_TYPESset
More by umbraco
View allUpdate the IGNORED_ENDPOINTS.md documentation file with current endpoint coverage analysis. Use when documentation needs to be refreshed or when verifying ignored endpoint status.
Count the total number of MCP tools in the Umbraco MCP Server project and provide a breakdown by collection. Use when the user asks about tool counts, tool statistics, or how many tools exist.
Implement entry points in Umbraco backoffice using official docs
Implement UFM (Umbraco Flavored Markdown) components in Umbraco backoffice using official docs
