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.
npx skills add ArabelaTso/Skills-4-SE --skill c-cpp-to-lean4-translatorgit clone --depth 1 https://github.com/ArabelaTso/Skills-4-SEWrote 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/skills/arabelatso/skills-4-se/c-cpp-to-lean4-translator)<a href="https://agentmods.dev/skills/arabelatso/skills-4-se/c-cpp-to-lean4-translator"><img src="https://agentmods.dev/badge/skills/arabelatso/skills-4-se/c-cpp-to-lean4-translator/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/arabelatso/skills-4-se/c-cpp-to-lean4-translator"><img src="https://agentmods.dev/badge/skills/arabelatso/skills-4-se/c-cpp-to-lean4-translator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00085 | $0.02768 |
| Opus 5 | $0.00043 | $0.01384 |
| Sonnet 5 | $0.00017 | $0.00554 |
| Haiku 4.5 | $0.00009 | $0.00277 |
Grade A, and why
c-cpp-to-lean4-translator 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 10d 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.
How it starts
The opening of the file, as written. The whole thing — 442 lines — stays where its author put it; the contents beside it link to each section on GitHub.
C/C++ to Lean4 Translator
Overview
Transform C or C++ programs into equivalent Lean4 code that preserves the original semantics while leveraging Lean4's functional programming paradigm, strong type system, and proof capabilities.
Translation Workflow
Step 1: Analyze Input Code
Understand the C/C++ program structure and semantics:
-
Identify program components:
- Functions and their signatures
- Data structures (structs, classes, arrays)
- Control flow patterns (loops, conditionals)
- Memory management (allocation, pointers)
- I/O operations
- Dependencies and includes
-
Understand semantics:
- What does the program compute?
- What are the inputs and outputs?
- Are there side effects?
- What are the invariants and preconditions?
-
Note translation challenges:
- Pointer arithmetic
- Mutable state
- Imperative loops
- Manual memory management
- Undefined behavior
Step 2: Design Lean4 Structure
Plan the Lean4 equivalent before writing code:
-
Choose appropriate types:
Intfor signed integersNatfor unsigned integers and array indicesFloatfor floating-point numbersArrayfor dynamic arraysListfor linked lists- Custom
structuretypes for structs/classes
-
Determine purity:
- Pure functions: return values directly
- Side effects: use
IOmonad - Mutable state: use
IO.ReforSTmonad
-
Plan control flow translation:
- Loops → Recursive functions
- Mutable variables → Function parameters
- Early returns → Conditional expressions
-
Handle memory:
- Stack allocation → Direct values
- Heap allocation → Automatic memory management
- Pointers → Direct values or references
Step 3: Translate Code
Follow these translation principles:
Functions
Pattern: Pure function
// C/C++
int add(int a, int b) {
return a + b;
}
-- Lean4
def add (a b : Int) : Int :=
a + b
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 10d ago First seen · 442 lines · 85 tokens per session scan A 3e1e46b9078a
c-cpp-to-lean4-translator is a skill published in the GitHub repository ArabelaTso/Skills-4-SE (251 stars, last pushed 20d ago), licensed Apache-2.0. It adds 85 tokens to every session and 2,768 once invoked, about $0.0004 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.
Other skills, from other repositories
cpp-pro
Writes, optimizes, and debugs C++ applications using modern C++20/23 features, template metaprogramming, and high-performance systems techniques. Use when building or refactoring C++ code requiring concepts, ranges, coroutines, SIMD optimization, or careful memory management — or when addressing performance…
cpp
Use when writing modern C++ (17/20/23). Covers RAII, smart-pointer ownership, move semantics, ranges, concepts, and eliminating undefined behavior with sanitizers.
unreal-thirdparty
Expert guide for integrating third-party C/C++ libraries into Unreal Engine 5.x projects and plugins. Covers static linking, dynamic linking (DLL/SO/dylib), Build.cs configuration, ModuleType.External, delay loading, runtime dependency staging, wrapping patterns, cross-platform considerations (Windows/macOS/Linux)…
llama-cpp
Guide for llama.cpp, the C/C++ LLM inference framework by ggml-org. Covers the C API (llama.h), GGUF format, quantization (Q4KM, Q80, IQ4XS), CMake builds, GPU backends (CUDA, Vulkan, Metal, ROCm), HTTP server with OpenAI-compatible API, embeddings, grammar constraints, function calling, LoRA, speculative decoding…
unreal-gas
Expert guide for Unreal Engine 5.x Gameplay Ability System (GAS) C++ development. Covers AbilitySystemComponent, GameplayAbilities, GameplayEffects, Attributes/AttributeSets, GameplayTags, GameplayCues, AbilityTasks, prediction/replication, and common patterns. Use when the user asks about GAS, gameplay abilities…
plooc-integration
Use when integrating, refactoring, or debugging PLOOC object-oriented C - defclass encapsulation, privatemember protection, vtable dispatch, or inheritance-style structs.