edict-program-writer

edict-program-writer is a skill for Claude Code, Codex from Sowiedu/Edict. It costs 106 tokens per session (2,409 once invoked), scanned A, original, MIT.

A guide for writing Edict programs as JSON abstract syntax trees, structured data that represents code.

In plain words
What is it for?
Use it to create, validate, compile, and run Edict programs, including programs with functions, records, enums, types, and constants.
Why use it?
It explains the required structure, identifiers, node types, and checks needed to avoid compiler errors when producing Edict programs.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/sowiedu/edict/edict-program-writer
Any agent
npx skills add Sowiedu/Edict --skill edict-program-writer
Clone the repo
git clone --depth 1 https://github.com/Sowiedu/Edict

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for edict-program-writer

README.md
[![agentmods](https://agentmods.dev/badge/skills/sowiedu/edict/edict-program-writer.svg)](https://agentmods.dev/skills/sowiedu/edict/edict-program-writer)
Your own site
<a href="https://agentmods.dev/skills/sowiedu/edict/edict-program-writer"><img src="https://agentmods.dev/badge/skills/sowiedu/edict/edict-program-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 106 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,409 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00106 $0.02409
Opus 5 $0.00053 $0.01205
Sonnet 5 $0.00021 $0.00482
Haiku 4.5 $0.00011 $0.00241

Measured 5d ago against content hash 2e81cad690f3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

edict-program-writer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agent/skills/edict-program-writer/SKILL.md · 199 lines

How it starts

The opening of the file, as written. The whole thing — 199 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Writing Edict Programs

Edict programs are JSON objects — not text files. You produce an AST directly as structured JSON. There is no syntax to learn, only a schema to conform to.

The Loop

  1. Call edict_schema to get the JSON Schema (or read schema/edict-schema.json)
  2. Write a program as a JSON AST conforming to the schema
  3. Call edict_check (or edict_compile) — if errors come back, fix and resubmit
  4. Call edict_run to execute the compiled WASM

Program Structure

Every program is a module:

{
  "kind": "module",
  "id": "mod-myprogram-001",
  "name": "myprogram",
  "imports": [],
  "definitions": [ ... ]
}

The optional schemaVersion field tracks which schema version the AST targets. You don't need to include it — programs without schemaVersion are treated as v1.0 and auto-migrated to the current version by the compiler. If you include it, set it to the current version (check via edict_version).

A module contains definitions: functions (fn), records (record), enums (enum), type aliases (type), and constants (const).

Every module needs a main function that returns Int (exit code).

ID Conventions

Every AST node needs a unique id string. Convention: {kind}-{descriptive-name}-{counter}

Kind Prefix Example
Module mod- mod-hello-001
Function fn- fn-main-001
Parameter param- param-n-001
Literal lit- lit-zero-001
Call call- call-print-001
Identifier ident- ident-x-001
Binary op binop- binop-add-001
If if- if-check-001
Let let- let-result-001
Match match- match-shape-001
Record def rec- rec-point-001
Enum def enum- enum-shape-001

IDs must be globally unique within a module. Duplicate IDs cause a duplicate_id error.

Type System

Type JSON representation
Basic { "kind": "basic", "name": "Int" } — also Float, String, Bool
Array { "kind": "array", "element": <TypeExpr> }
Option { "kind": "option", "inner": <TypeExpr> }
Result { "kind": "result", "ok": <TypeExpr>, "err": <TypeExpr> }
Named { "kind": "named", "name": "Point" } — references a record/enum
Tuple { "kind": "tuple", "elements": [<TypeExpr>, ...] }
Function { "kind": "fn_type", "params": [...], "effects": [...], "returnType": <TypeExpr> }
Unit { "kind": "unit_type", "base": "Float", "unit": "usd" }
Refined { "kind": "refined", "id": "...", "base": <TypeExpr>, "variable": "x", "predicate": <Expr> }

Read the full file on GitHub · 199 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 199 lines · 106 tokens per session scan A 2e81cad690f3

Subscribe to this mod's changes

edict-program-writer is a skill published in the GitHub repository Sowiedu/Edict (11 stars, last pushed 7d ago), licensed MIT. It adds 106 tokens to every session and 2,409 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

sounio-pgo

Work on the profile-guided optimization pipeline: counter injection, .sprof file output, strategy promotion, inlining, layout, const-fold/DCE, and register allocation; use when editing any sprint 38–52+ IR optimization files.

Sounio-lang/sounio · 55 tokens

automatic-differentiation-advanced

Extend Sounio's automatic differentiation capabilities to higher‑order derivatives, Hessians, differentiation through control flow, and GPU‑accelerated gradient computation, enabling state‑of‑the‑art scientific machine learning.

Sounio-lang/sounio · 50 tokens

epistemic-uncertainty-quantification

Extend Sounio's epistemic types with advanced uncertainty quantification methods, such as confidence intervals, non‑Gaussian distributions, and Dempster‑Shafer evidence combination, positioning the language at the state‑of‑the‑art in measurement science.

Sounio-lang/sounio · 62 tokens

formal-verification-epistemic

Integrate formal verification tools (SMT solvers, Lean) to prove properties of epistemic programs, such as uncertainty bounds, confidence guarantees, and provenance integrity, establishing Sounio as a language with mathematically verified scientific claims.

Sounio-lang/sounio · 55 tokens

safe-refactoring

Perform systematic, safety‑preserving refactoring of code in any language, using dependency analysis, invariant detection, and verification techniques to avoid introducing bugs.

Sounio-lang/sounio · 34 tokens

sounio-native-codegen

Work on the native x86-64 code generation backend: register allocation, instruction encoding, peephole optimization, frame sizing, ELF output, and the compileirfunction pipeline; use when editing any sprint 52–65+ native/.sio files.

Sounio-lang/sounio · 59 tokens