harn-diagnostics
БесплатноБез исполняемых скриптовНе проверенUse for Harn diagnostics, looking up any HARN-* error code, the full code index/catalog, explain output, repair metadata, and fix application safety.
от burin-labs★ 34 звезды на GitHubОб этом скилле
Harn diagnostics
Use this skill when changing errors, warnings, explain output, repair metadata,
or fix application behavior. Use it also when you need to look up what a
HARN-<CAT>-<NNN> code means.
Pair it with harn-language for syntax and type contracts and harn-agent for autonomy gating.
Code index (look up any HARN-* code)
Every diagnostic harn check, harn lint, and harn fmt emit carries a stable
HARN-<CAT>-<NNN> code. The code registry is the single source of truth. It is
crates/harn-parser/src/diagnostic_codes.rs, plus the per-code explanation in
crates/harn-parser/src/diagnostic_codes/explanations/<CODE>.md. Everything
below is generated from it, so never hand-maintain a parallel list.
- Look up one code:
harn explain HARN-TYP-014(human-readable) orharn explain HARN-TYP-014 --json(structured: category, summary, repair, safety class, related codes). - Full index of every code:
harn explain --catalog(add--format markdownor--format json). This is the complete cheat sheet — one entry per code with its summary, repair, and safety class. - Committed artifacts (kept in sync by CI):
docs/src/diagnostics.md— the rendered index, grouped by category.docs/diagnostics-catalog.json—schemaVersion: 1structured contract consumed by downstream tooling (IDE diagnostic panels, hosted error pages). Tools should read this, not regex prose.
- Regenerate after changing the registry or an explanation:
make sync-diagnostics-catalog(CI guard:make check-diagnostics-catalog).
The category prefixes below are the mental map for the index; harn explain
resolves any individual code.
Start here
- Parser diagnostics live primarily in
crates/harn-parser/. - Typechecker diagnostics live in
crates/harn-parser/src/typechecker/. - Lint diagnostics live in
crates/harn-lint/. - CLI rendering and
harn explainlive undercrates/harn-cli/src/commands/. - Repair planning and apply flows live under
crates/harn-cli/src/commands/fix.rs. - Conformance
.errorfixtures are the executable spec for intentional failures. - LSP diagnostics should derive from the same core metadata as CLI diagnostics.
- Do not fork diagnostic meaning between CLI, LSP, and docs.
Diagnostic categories
TYPcovers type mismatch and typechecker failures.PARcovers parser syntax failures.NAMcovers naming and resolution failures.CAPcovers capability and trust-boundary failures.LLMcovers LLM provider and model-call failures.ORCcovers orchestration and workflow failures.STDcovers stdlib and builtin failures.PRMcovers prompt-template failures.MODcovers module-system and import failures.LNTcovers lint findings.FMTcovers formatter findings.IMPcovers import and package integration failures.OWNcovers ownership and lifetime-style constraints.RCVcovers recovery and resume failures.MATcovers match and exhaustiveness failures.- Codes use the stable
HARN-<CAT>-<NNN>format.
Message rules
- Keep messages stable, specific, and actionable.
- Point at the smallest useful span.
- Do not blame the user; describe the invalid construct.
- Mention the expected shape before the found shape when useful.
- Include a short help string only when it reduces guesswork.
- Avoid diagnostics that require reading compiler internals.
- Prefer one primary error over many cascading errors.
- Preserve existing code identifiers unless the old code was wrong.
- Keep warnings clearly distinguishable from blocking errors.
- Update explanations when changing a diagnostic's meaning.
Structured metadata
- Preserve
code. - Preserve
severity. - Preserve source spans.
- Preserve labels and notes.
- Preserve related spans.
- Preserve machine-applicable
FixEditvalues. - Preserve repair ids and summaries.
- Preserve repair safety classes.
- Preserve structured diagnostic details used by LSP code actions.
- Avoid parsing human-readable messages in downstream tools.
Repair safety
- Format-only edits can be auto-applied when they are byte-local and deterministic.
- Syntax-local repairs can be auto-applied only when they cannot change intent.
- Type or semantic repairs should usually be propose-only.
- Cross-file edits need higher review.
- Capability, network, shell, and mutation repairs need explicit approval.
harn fix --planshould explain why each repair is or is not safe.harn fix --applymust respect the declared safety ceiling.- Do not hide skipped or rejected repairs.
- Keep repairs idempotent.
- Add tests for both plan and apply surfaces when safety behavior changes.
Cross-surface alignment
- CLI rendering should show the stable code.
harn explainshould resolve every registered code.- LSP diagnostics should expose matching codes and repair metadata.
- JSON surfaces should keep codes machine-readable.
- Conformance
.errorfiles should lock user-visible failure
Установить harn-diagnostics в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл harn-diagnostics?
Use for Harn diagnostics, looking up any HARN-* error code, the full code index/catalog, explain output, repair metadata, and fix application safety.
Как установить скилл harn-diagnostics?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл harn-diagnostics запускает скрипты?
Нет, скилл состоит только из инструкций (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