CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

python-to-lean4-translator

Translate Python programs to equivalent Lean4 code while preserving semantics and ensuring type safety. Use when users ask to convert, translate, or port Python code to Lean4, or when they need to verify Python algorithms using Lean4's theorem proving capabilities. Handles functions, classes, data structures, control flow, and ensures the generated Lean4 code is well-typed, executable, and can successfully run.

Quality

84%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

67%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A well-structured, highly actionable skill body with clear sequencing, executable examples, and real, clearly signaled reference files. The main improvements are trimming duplication between the body and the reference files and adding an explicit fix-and-retry loop to the verification workflow.

Suggestions

Remove the inlined type-mapping table and condensed pattern examples that duplicate references/type_mappings.md and references/common_patterns.md, keeping only one or two illustrative pairs in the body and pointing to the references.

Add an explicit error-recovery step to the Translation Process (e.g., "If the compiler or #eval fails, return to Step 4 to fix type or termination issues, then re-verify") to create a feedback loop.

Cut the redundant Overview paragraph (it repeats the opening line) and drop explanations of Lean4 basics Claude already knows, such as "Lean4 is strongly typed. Every translation must...".

DimensionReasoningScore

Conciseness

The body is mostly efficient — paired Python/Lean4 code examples carry the content — but there is noticeable slack: the Overview and opening paragraph say the same thing twice, "Lean4 is strongly typed" explains a basics Claude already knows, and the inlined type-mapping table and pattern examples duplicate content in references/type_mappings.md and references/common_patterns.md. This fits the level-3 anchor (mostly efficient but includes some unnecessary explanation or could be tightened) better than level 4, where only minor trimming would be needed.

3 / 5

Actionability

Concrete, executable Python→Lean4 code pairs appear throughout (functions, control flow, list operations, structures, exceptions, IO), plus a full worked example and import list. Minor gaps keep it below level 5: e.g., the factorial example omits the "termination_by" handling the skill itself prescribes for recursion, and Required Imports aren't tied to which constructs need them.

4 / 5

Workflow Clarity

The five-step Translation Process is clearly sequenced, and Step 5 plus the Verification Checklist provide explicit validation checkpoints (#eval, compiler check). It falls short of the level-5 anchor because there is no explicit error-recovery feedback loop (e.g., "if compilation or #eval fails, return to Step 4 and fix types/termination before proceeding") — error handling on failure is only implicit.

4 / 5

Progressive Disclosure

Structure is good: well-organized sections, one-level-deep references that all exist (references/type_mappings.md, references/common_patterns.md, references/advanced_features.md), signaled both inline and in an Additional Resources section. The gap preventing level 5 is that the body inlines substantial content (the type table and many pattern examples) that largely duplicates the reference files rather than keeping the overview lean and deferring detail.

4 / 5

Total

15

/

20

Passed

Description

92%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong description: concrete third-person capabilities paired with an explicit "Use when" clause covering natural trigger synonyms. The only weakness is minor missing natural variations such as "Lean" without the 4 or "formalize".

DimensionReasoningScore

Specificity

The description lists multiple concrete actions — "Translate Python programs to equivalent Lean4 code", "preserving semantics", "ensuring type safety", "Handles functions, classes, data structures, control flow", "well-typed, executable" — giving comprehensive coverage of the skill's capabilities in third person, matching the level-5 anchor for multiple specific concrete actions.

5 / 5

Completeness

Both what ("Translate Python programs to equivalent Lean4 code while preserving semantics and ensuring type safety") and when ("Use when users ask to convert, translate, or port Python code to Lean4, or when they need to verify Python algorithms") are explicitly and concretely answered, matching the level-5 anchor.

5 / 5

Trigger Term Quality

"Use when users ask to convert, translate, or port Python code to Lean4" provides good synonym coverage (convert/translate/port) plus a secondary trigger in "verify Python algorithms using Lean4's theorem proving capabilities". A few natural terms users might say are missing (e.g., "Lean" without the 4, "formalize", ".py"), so it fits the level-4 anchor rather than the comprehensive level-5 anchor.

4 / 5

Distinctiveness Conflict Risk

The Python-to-Lean4 niche is highly specific with distinct triggers (convert/translate/port Python to Lean4, theorem proving), so conflict risk with other skills is minimal — a clear match for the level-5 anchor.

5 / 5

Total

19

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository

ArabelaTso/Skills-4-SE

Path

skills/python-to-lean4-translator/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.