likec4-cli-codegen-regression
БесплатноБез исполняемых скриптовНе проверенUse when changing or reviewing LikeC4 CLI code generation, exporters, output file naming, include-path codegen behavior, or `likec4 gen` commands. Trigger for…
от lza6★ 19 звёзд на GitHubОб этом скилле
LikeC4 CLI Codegen Regression
Protect likec4 gen output contracts with focused tests. The most important invariant is that multi-file generators write every emitted view under the requested output directory.
Ground rules
- Start in
packages/likec4/src/cli/codegen. - Add a regression test before implementation when fixing a bug.
- Test every affected multi-file format, not only the format that exposed the issue.
- Treat external include-path views and Windows paths as first-class edge cases.
Output-path invariants
For likec4 gen dot, d2, mermaid or mmd, and plantuml:
--outdiror-odefines the containment root for all generated files.- Source-relative view paths must never escape the output root.
- Absolute source paths, parent-relative paths, and Windows drive-root paths must not create files outside
--outdir. - A view coming from an external include path should still be emitted under
--outdir. - Define and assert the resulting output naming contract for escaped or external source paths; containment-only checks are not enough.
- Single-file generators such as model, react, or webcomponent should keep their existing
--outfilebehavior.
Regression matrix
Cover the smallest matrix that proves the contract:
| Case | Expected result |
|---|---|
| view in project folder | file under --outdir |
| view in nested project folder | nested file under --outdir |
| view from external include path | file under --outdir, not beside the included source |
source path with .. relation to project |
sanitized or re-rooted under --outdir |
| Windows drive-style source path | no drive-root escape such as C: output outside --outdir |
| absolute source path | no absolute-root escape outside --outdir |
Formats to consider:
.dot.d2.mmd.puml
Test shape
Use a temp workspace fixture:
workspace/
project-a/
likec4.config.ts
project-view.c4
shared/
included-view.c4
out/
Configure project-a to include ../shared. Run each generator with --outdir workspace/out.
Assert:
- expected files exist inside
workspace/out - escaped or external source paths use the explicitly chosen output naming contract
- no generated file exists under
project-a,shared, or the temp workspace root outsideout - all generated paths pass an
isInside(outdir, filepath)style check
If the real fixture cannot produce absolute or Windows drive-style sourcePath values, extract a small path-resolution helper and cover those cases with pure unit tests.
Focused commands
pnpm --filter likec4 test -- codegen
pnpm --filter likec4 typecheck
pnpm exec dprint check packages/likec4/src/cli/codegen
git diff --check
If touching shared path utilities, also run the package tests that own those utilities.
Установить likec4-cli-codegen-regression в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл likec4-cli-codegen-regression?
Use when changing or reviewing LikeC4 CLI code generation, exporters, output file naming, include-path codegen behavior, or `likec4 gen` commands. Trigger for bugs around `--outdir`, generated files escaping output folders, dot/d2/mermaid/plantuml output, or external include-path views.
Как установить скилл likec4-cli-codegen-regression?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл likec4-cli-codegen-regression запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic