Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

harn-language

БесплатноБез исполняемых скриптовНе проверен

Use for Harn language syntax, typechecking, modules, imports, and idiomatic script authoring.

burin-labsот burin-labs★ 34 звезды на GitHub

Об этом скилле

Harn language

Use this skill when writing, reviewing, or explaining .harn source code.

Pair it with harn-testing for fixtures and harn-diagnostics for user-facing errors.

Start here

  • Read docs/llm/harn-quickref.md before editing .harn files.
  • In a Harn worktree, run make setup once and use HARN_BIN_NO_BUILD=1 ./scripts/harn_bin.sh -- <command> for narrow CLI checks. This resolves the lane-local binary without starting a hidden Cargo build. Outside the repository, use the installed, pinned harn executable.
  • Use docs/llm/harn-triggers-quickref.md when trigger manifests are involved.
  • Read spec/HARN_SPEC.md as the assembled language reference.
  • Default new script entrypoints to fn main(harness: Harness) { ... } and route side effects through harness.*.
  • Use harness.fs.mkdtemp_in_workspace(prefix?) for scratch files that must be visible under sandbox policy; avoid composing .harn/tmp paths by hand.
  • Use typed std/fs conditional replacement for shared state or artifacts that must not overwrite a newer observation; branch on the closed receipt.
  • Use bounded std/jsonl pages for file-backed logs and transcripts. Apply a SchemaContract<T> when consumers need typed records and named rules.
  • For connector credentials, read canonical ids such as provider/access-token through harness.secrets from a package script; the runner scopes the default provider from the nearest harn.toml.
  • Edit the authoritative chapters under spec/chapters/*.md for spec changes; never hand-edit the generated spec/HARN_SPEC.md or docs/src/language-spec.md projections.
  • Regenerate and verify every spec projection with make sync-language-spec.
  • Check user-visible behavior with conformance fixtures under conformance/tests/.
  • Keep examples small enough for agents to copy without hidden setup.
  • Prefer existing syntax and stdlib helpers over new host-side shortcuts.
  • Put platform spellings, policy rows, and other closed configuration in one typed data-only module. Import that value into the evaluator and mechanically project it downstream instead of duplicating lists or host branches.

Syntax checklist

  • Imports go first.
  • pipeline is the usual entry-point construct.
  • fn is for reusable pure or host-backed logic.
  • const binds a value that never changes; let binds one that may.
  • Builtin methods have one name each (len, contains, lower, upper, windows, chunks, map_keys, merge). Mutating methods (push, pop, insert, extend, sort, reverse, set add/remove, dict remove) change a let binding in place; sorted(), reversed(), and xs + [v] return new values.
  • Use explicit type annotations at boundaries.
  • Use match for variant-sensitive behavior.
  • Use for for straightforward iteration.
  • Use parallel each for bounded fan-out work.
  • Use parallel settle when collecting settled outcomes matters.
  • Use settle_with_abort from std/abort when outcomes matter and branches poll or wait, so one branch's doomed verdict can stop the rest.
  • Always set max_concurrent on broad parallel work.
  • Use triple-quoted strings for long prompts in Harn source.
  • Heredoc syntax is for LLM tool-call argument JSON, not general strings.
  • Keep comments factual and close to non-obvious logic.

Decode at the boundary

Untyped data (JSON text, a GraphQL response, a dict from another API) gets decoded once where it enters. After that, read typed fields with ..

type WorkflowRun = {headBranch: string, conclusion: string?, url: string}
type WorkflowRuns = list<WorkflowRun>

const runs = json_decode(child.stdout, schema_of(WorkflowRuns))?   // text
const pr = schema_parse(payload, schema_of(Snapshot))?             // a value
  • json_decode and schema_parse return Result<T, {message, errors, issues}>. match or postfix ? keeps T; unwrap returns a dynamic value. Use schema_expect to throw instead.
  • Unknown fields pass. name: T? may be null; name?: T may be absent.
  • Declare a GraphQL response type next to its query and decode payload.data with it.
  • command_run, harness.process.exec/shell, and buffered harness.net requests already return typed, never-nil records: write result.stdout, not result?.stdout ?? "". Keep the type when you wrap them; a wrapper that returns dict erases it.
  • A ?. chain over an untyped value (HARN-LNT-080) or to_string(x ?? "") on a field means a decode is missing.

Types and boundaries

  • Treat unknown as the type for untrusted inputs.
  • Use SchemaContract<T> for deterministic cross-field rules after structural validation. Capture typed context in the rule closure; do not replace it with an open dictionary.
  • Use ArtifactDescriptor<T> when a producer and consumer share a durable JSON artifact. Bind its relative name and SchemaContract<T> once, then reuse the descriptor for reads and wr
Полный SKILL.md на GitHub

Установить harn-language в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл harn-language?

Use for Harn language syntax, typechecking, modules, imports, and idiomatic script authoring.

Как установить скилл harn-language?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл harn-language запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить harn-language с