harn-language
БесплатноБез исполняемых скриптовНе проверенUse for Harn language syntax, typechecking, modules, imports, and idiomatic script authoring.
от 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.mdbefore editing.harnfiles. - In a Harn worktree, run
make setuponce and useHARN_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, pinnedharnexecutable. - Use
docs/llm/harn-triggers-quickref.mdwhen trigger manifests are involved. - Read
spec/HARN_SPEC.mdas the assembled language reference. - Default new script entrypoints to
fn main(harness: Harness) { ... }and route side effects throughharness.*. - Use
harness.fs.mkdtemp_in_workspace(prefix?)for scratch files that must be visible under sandbox policy; avoid composing.harn/tmppaths by hand. - Use typed
std/fsconditional replacement for shared state or artifacts that must not overwrite a newer observation; branch on the closed receipt. - Use bounded
std/jsonlpages for file-backed logs and transcripts. Apply aSchemaContract<T>when consumers need typed records and named rules. - For connector credentials, read canonical ids such as
provider/access-tokenthroughharness.secretsfrom a package script; the runner scopes the default provider from the nearestharn.toml. - Edit the authoritative chapters under
spec/chapters/*.mdfor spec changes; never hand-edit the generatedspec/HARN_SPEC.mdordocs/src/language-spec.mdprojections. - 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.
pipelineis the usual entry-point construct.fnis for reusable pure or host-backed logic.constbinds a value that never changes;letbinds 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, setadd/remove, dictremove) change aletbinding in place;sorted(),reversed(), andxs + [v]return new values. - Use explicit type annotations at boundaries.
- Use
matchfor variant-sensitive behavior. - Use
forfor straightforward iteration. - Use
parallel eachfor bounded fan-out work. - Use
parallel settlewhen collecting settled outcomes matters. - Use
settle_with_abortfromstd/abortwhen outcomes matter and branches poll or wait, so one branch's doomed verdict can stop the rest. - Always set
max_concurrenton 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_decodeandschema_parsereturnResult<T, {message, errors, issues}>.matchor postfix?keepsT;unwrapreturns a dynamic value. Useschema_expectto throw instead.- Unknown fields pass.
name: T?may benull;name?: Tmay be absent. - Declare a GraphQL response type next to its query and decode
payload.datawith it. command_run,harness.process.exec/shell, and bufferedharness.netrequests already return typed, never-nil records: writeresult.stdout, notresult?.stdout ?? "". Keep the type when you wrap them; a wrapper that returnsdicterases it.- A
?.chain over an untyped value (HARN-LNT-080) orto_string(x ?? "")on a field means a decode is missing.
Types and boundaries
- Treat
unknownas 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 andSchemaContract<T>once, then reuse the descriptor for reads and wr
Установить 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), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic