Borrowing it
Nothing to install: this file belongs to plclub/hs-to-rocq. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/plclub/hs-to-rocq/master/.claude/commands/new-example.mdgit clone --depth 1 https://github.com/plclub/hs-to-rocqWrote 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.
[](https://agentmods.dev/commands/plclub/hs-to-rocq/new-example)<a href="https://agentmods.dev/commands/plclub/hs-to-rocq/new-example"><img src="https://agentmods.dev/badge/commands/plclub/hs-to-rocq/new-example.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.02349 |
| Opus 5 | $0.00000 | $0.01175 |
| Sonnet 5 | $0.00000 | $0.00470 |
| Haiku 4.5 | $0.00000 | $0.00235 |
Grade C, and why
new-example scanned grade C with 1 finding 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 7d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf $(OUT) hs-spec How it starts
The opening of the file, as written. The whole thing — 306 lines — stays where its author put it; the contents beside it link to each section on GitHub.
New hs-to-rocq Example
Create a new hs-to-rocq example that translates a Haskell library to Coq. This skill sets up the directory structure, configures the build system, and iteratively translates the library following the Translation Principles from CLAUDE.md.
Arguments
The argument should be the library name and its Git repository URL, e.g.:
/new-example mtl https://github.com/haskell/mtl.git
If only a name is given, ask the user for the repository URL.
Phase 1: Setup
1.1 Create directory structure
examples/<name>/
├── Makefile
├── README.md
├── edits # Start empty
├── <name>/ # Git submodule
├── lib/ # Generated output (created by make)
├── module-edits/ # Per-module edits (created as needed)
└── theories/ # Proofs (created later if needed)
1.2 Add Git submodule
git submodule add <REPO_URL> examples/<name>/<name>
Pin to a specific tag/commit if the user specifies one. Ask:
- "Which version/tag/commit of the library should I use?"
1.3 Identify Haskell source files
Explore the submodule to find:
- The
src/orlib/directory containing Haskell sources - The
.cabalfile to understand module structure and dependencies - Which modules are "exposed" (public API) vs internal
Ask the user:
- "I found N modules. Should I translate all of them, or start with a subset?"
1.4 Create Makefile
Use the graph/containers Makefile as a template. The Makefile must:
include ../../common.mk
ifeq (,$(wildcard <name>))
$(error Please run git submodule update --init examples/<name>/<name>)
endif
OUT=lib
MODULES = \
Module/Path/One \
Module/Path/Two
VFILES_GEN = $(addprefix $(OUT)/,$(addsuffix .v,$(MODULES)))
VFILES = $(VFILES_GEN)
all: vfiles coq
vfiles: $(OUT)/edits $(OUT)/_CoqProject $(OUT)/README.md $(VFILES)
$(OUT)/_CoqProject: Makefile
mkdir -p $(OUT)
> $@
echo '-Q . ""' >> $@
echo '-Q ../../../base ""' >> $@
$(foreach f,$(addsuffix .v,$(MODULES)),echo '$(f)' >> $@;)
$(OUT)/edits:
ln -fs ../edits $(OUT)/edits
$(OUT)/README.md:
mkdir -p $(OUT)
> $@
echo 'This directory contains generated Coq files. Do not edit directly.' >> $@
coq: $(OUT)/_CoqProject $(VFILES)
cd $(OUT) && coq_makefile -f _CoqProject -o Makefile
$(MAKE) -C $(OUT)
HS_TO_ROCQ_OPTS := \
-e ../../base/edits \
-e edits \
--iface-dir ../../base/ \
--iface-dir $(OUT) \
-N \
-i <name>/<src-path>
.SECONDEXPANSION:
$(VFILES_GEN): $(OUT)/%.v : $$(wildcard module-edits/$$*/preamble.v) \
$$(wildcard module-edits/$$*/midamble.v) \
$$(wildcard module-edits/$$*/edits) \
$$(wildcard module-edits/$$*/flags) \
edits $(OUT)/README.md
$(HS_TO_ROCQ) $(addprefix -e , $(wildcard module-edits/$*/edits)) \
$(addprefix -p , $(wildcard module-edits/$*/preamble.v)) \
$(addprefix --midamble , $(wildcard module-edits/$*/midamble.v)) \
$(HS_TO_ROCQ_OPTS) \
-o $(OUT) \
<name>/<src-path>/$*.hs
test -e $@
clean:
rm -rf $(OUT) hs-spec
theories: coq
@if test -f theories/_CoqProject; then \
cd theories && coq_makefile -f _CoqProject -o Makefile && $(MAKE); \
fi
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.
- 7d ago First seen · 306 lines · 0 tokens per session scan C 52766849e42a
new-example is a command published in the GitHub repository plclub/hs-to-rocq (96 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,349 tokens. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.
Other commands, from other repositories
verify-math
Verify a self-authored mathematical result end to end by routing claims across adversarial review, numerical falsification, symbolic or CAS checks, and Lean, then aggregating one report. Use when a theorem, proposition, conjecture, or paper-wide mathematical argument needs the appropriate combination of verification…
replication-package
Scaffold or audit a social-science replication package at a target directory, and audit the manuscript and its archived research objects against FAIR principles.
diff
Quantitative volume comparison between a CadQuery model and a reference STEP file.
simulation-calibrator
Test and refine simulation accuracy with validation loops, bias detection, and continuous improvement frameworks.
arg-diagram
ARG academic-paper diagram mode — standalone structural & conceptual diagram generation.
graphite-morphology-classify
Classify graphite in a cast-iron micrograph per ASTM A247 / ISO 945-1, quantify nodularity, and read the matrix — the single most diagnostic observation in a cast-iron case.