Ok Script Tasks
AliceJump/ok-gf2
Create and modify automation task classes for the ok-script Python library in ok-gf2, including BaseTask one-time tasks, TriggerTask background tasks, task config UI metadata, registration in…
Translate Python programs to equivalent Lean4 code while preserving semantics and ensuring type safety.
$ npx skills add ArabelaTso/Skills-4-SE --skill python-to-lean4-translator -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ArabelaTso/Skills-4-SE python-to-lean4-translator --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/python-to-lean4-translator .claude/skills/python-to-lean4-translator && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "python-to-lean4-translator" agent skill from https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/python-to-lean4-translator into .claude/skills/python-to-lean4-translator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-to-lean4-translator", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/python-to-lean4-translatorType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ArabelaTso/Skills-4-SE --skill python-to-lean4-translator -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ArabelaTso/Skills-4-SE python-to-lean4-translator --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/python-to-lean4-translator .agents/skills/python-to-lean4-translator && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "python-to-lean4-translator" agent skill from https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/python-to-lean4-translator into .agents/skills/python-to-lean4-translator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-to-lean4-translator", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ArabelaTso/Skills-4-SE --skill python-to-lean4-translator -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ArabelaTso/Skills-4-SE python-to-lean4-translator --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/python-to-lean4-translator .cursor/skills/python-to-lean4-translator && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "python-to-lean4-translator" agent skill from https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/python-to-lean4-translator into .cursor/skills/python-to-lean4-translator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-to-lean4-translator", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ArabelaTso/Skills-4-SE.git --path skills/python-to-lean4-translator--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ArabelaTso/Skills-4-SE --skill python-to-lean4-translator -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ArabelaTso/Skills-4-SE python-to-lean4-translator --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/python-to-lean4-translator .gemini/skills/python-to-lean4-translator && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "python-to-lean4-translator" agent skill from https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/python-to-lean4-translator into .gemini/skills/python-to-lean4-translator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-to-lean4-translator", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ArabelaTso/Skills-4-SE python-to-lean4-translatorInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ArabelaTso/Skills-4-SE --skill python-to-lean4-translator -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/python-to-lean4-translator .github/skills/python-to-lean4-translator && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "python-to-lean4-translator" agent skill from https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/python-to-lean4-translator into .github/skills/python-to-lean4-translator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-to-lean4-translator", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ArabelaTso/Skills-4-SE --skill python-to-lean4-translator -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ArabelaTso/Skills-4-SE python-to-lean4-translator --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/python-to-lean4-translator .opencode/skills/python-to-lean4-translator && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "python-to-lean4-translator" agent skill from https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/python-to-lean4-translator into .opencode/skills/python-to-lean4-translator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-to-lean4-translator", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
python-to-lean4-translatorTranslate Python programs to equivalent Lean4 code while preserving semantics and ensuring type safety.
Python To Lean4 Translator is an agent skill from ArabelaTso/Skills-4-SE. 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.
Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/advanced_features.md`, `references/common_patterns.md` and `references/type_mappings.md`).
It sits in Development, covering Translation and Type safety. It works with Python. The repository describes itself as: A curated list of 180+ useful Claude Skills for Software Engineering and resources for customizing AI for SE workflows. The licence is Apache-2.0.
12 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 4f38503. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
pythonFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Python To Lean4 Translator loads about 2.2k tokens when it runs, and up to ~7.1k if it reads all its reference files. Until then it costs about 110 tokens; SKILL.md has 651 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from ArabelaTso/Skills-4-SE at commit 4f38503, republished under its Apache-2.0 licence (© ArabelaTso). 651 words, ~2,174 tokens.
.claude/skills/python-to-lean4-translator/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.Translate Python programs into equivalent, executable Lean4 code while preserving program semantics and ensuring type safety.
This skill provides systematic guidance for translating Python code to Lean4, handling type inference, function translations, data structures, control flow, and ensuring well-typed, executable output.
Python Input → Analyze Structure → Map Types → Translate Constructs → Verify → Output Lean4
├─ Identify types and signatures
├─ Map Python constructs to Lean4 equivalents
├─ Handle type conversions
├─ Ensure totality and termination
└─ Validate executabilityLean4 is strongly typed. Every translation must:
Option for nullable values, Except for error handlingThe translated code must maintain the same computational behavior, preserve function input-output relationships, keep the same algorithmic complexity, and handle edge cases equivalently.
Generated Lean4 code must compile without errors, be executable (use #eval to verify), terminate (prove termination for recursive functions), and follow Lean4 syntax and conventions.
| Python Type | Lean4 Type | Notes |
|---|---|---|
int | Int or Nat | Use Nat for non-negative integers |
float | Float | Lean4's floating point type |
bool | Bool | Direct mapping |
str | String | Direct mapping |
None | Option α | Use none for None, some x for values |
list | List α | Homogeneous lists |
tuple | Product types α × β or custom structure | |
dict | Std.HashMap or List (α × β) | Requires import |
set | Std.HashSet or List α | Requires import |
For detailed type system information, see references/type_mappings.md.
Simple function:
def add(a: int, b: int) -> int:
return a + bLean4:
def add (a : Int) (b : Int) : Int :=
a + bRecursive function:
def factorial(n: int) -> int:
if n <= 1:
return 1
else:
return n * factorial(n - 1)Lean4:
def factorial (n : Nat) : Nat :=
if n ≤ 1 then
1
else
n * factorial (n - 1)If-else:
if condition:
result = value1
else:
result = value2Lean4:
let result := if condition then value1 else value2For loops (list iteration):
total = 0
for x in items:
total += xLean4 (using fold):
let total := items.foldl (· + ·) 0List comprehension:
squares = [x * x for x in range(10)]Lean4:
let squares := (List.range 10).map (fun x => x * x)Filter:
evens = [x for x in numbers if x % 2 == 0]Lean4:
let evens := numbers.filter (fun x => x % 2 == 0)Python class:
class Rectangle:
def __init__(self, width: int, height: int):
self.width = width
self.height = height
def area(self) -> int:
return self.width * self.heightLean4:
structure Rectangle where
width : Int
height : Int
def Rectangle.area (r : Rectangle) : Int :=
r.width * r.heightAnalyze usage to infer types, use sum types for multiple possible types, use Option for nullable values, and document type assumptions.
Use immutable bindings with let, thread state through function parameters, or use monadic state (StateM) if needed.
Convert Python exceptions to Except or Option:
def divide(a: int, b: int) -> float:
if b == 0:
raise ValueError("Division by zero")
return a / bLean4:
def divide (a b : Int) : Except String Float :=
if b = 0 then
Except.error "Division by zero"
else
Except.ok (a.toFloat / b.toFloat)Use structural recursion when possible, add termination_by clause for complex recursion:
def fibonacci (n : Nat) : Nat :=
match n with
| 0 => 0
| 1 => 1
| n + 2 => fibonacci n + fibonacci (n + 1)
termination_by nUse IO monad for I/O operations:
def greet(name: str):
print(f"Hello, {name}!")Lean4:
def greet (name : String) : IO Unit :=
IO.println s!"Hello, {name}!"Identify all functions, classes, and global variables. Infer types from usage and annotations. Identify dependencies and imports. Note any dynamic behavior or side effects.
Map Python types to Lean4 types. Identify where Option, Except, or sum types are needed. Plan structure definitions for classes. Determine function signatures.
Start with data structures (classes → structures). Translate pure functions first. Handle control flow (convert loops to recursion). Translate functions with side effects using IO. Add necessary imports.
Add explicit type annotations. Resolve type mismatches. Handle implicit conversions. Add termination proofs for recursive functions.
Check syntax with Lean4 compiler. Test with #eval for simple cases. Verify output matches Python behavior. Document any semantic differences.
Common imports for translated code:
import Std.Data.HashMap
import Std.Data.HashSet
import Init.Data.List.Basic
import Init.Data.Option.BasicPython:
def is_prime(n: int) -> bool:
if n < 2:
return False
for i in range(2, int(n ** 0.5) + 1):
if n % i == 0:
return False
return True
def primes_up_to(limit: int) -> list[int]:
return [n for n in range(2, limit + 1) if is_prime(n)]Lean4:
def isPrime (n : Nat) : Bool :=
if n < 2 then
false
else
let rec checkDivisors (i : Nat) : Bool :=
if i * i > n then
true
else if n % i = 0 then
false
else
checkDivisors (i + 1)
checkDivisors 2
def primesUpTo (limit : Nat) : List Nat :=
(List.range (limit + 1)).drop 2 |>.filter isPrime
-- Test
#eval primesUpTo 20 -- [2, 3, 5, 7, 11, 13, 17, 19]#eval to test each function as you translateOption or Except instead of exceptionsBefore finalizing translation:
#eval produces expected results for test casesOption or Except appropriatelyIOFor complex translations, refer to:
© ArabelaTso, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 3 other files (references) in skills/python-to-lean4-translator of ArabelaTso/Skills-4-SE.
Open the folder on GitHubat commit 4f38503
Python To Lean4 Translator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Python To Lean4 Translator this skillArabelaTso/Skills-4-SE | 253 | — | ~2.2k | Automated safety check: Pass | Apache-2.0 | |
| Ok Script TasksAliceJump/ok-gf2 | 274 | — | ~1k | Automated safety check: Pass | None | |
| Python Scala Oopbenchflow-ai/skillsbench | 1.8k | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| Minimizing Ty Ecosystem Changesastral-sh/ruff | 50k | — | ~4.6k | Automated safety check: Pass | MIT | |
| Kedro Babysitkedro-org/kedro | 11k | — | ~4k | Automated safety check: Pass | Custom licence | |
| Dignified Python Standardsdocling-project/docling | 69k | — | ~1.5k | Automated safety check: Pass | Apache-2.0 |
AliceJump/ok-gf2
Create and modify automation task classes for the ok-script Python library in ok-gf2, including BaseTask one-time tasks, TriggerTask background tasks, task config UI metadata, registration in…
benchflow-ai/skillsbench
Guide for translating Python classes, inheritance, and object-oriented patterns to Scala.
astral-sh/ruff
A skill your agent uses when a user says "minimize this ty ecosystem change", "reproduce this ecosystem result", "investigate a primer difference", "investigate a mypyprimer difference"…
kedro-org/kedro
Run Kedro's local lint / format / type-check / tests on changed files (uses the project's pre-commit hooks, ruff, mypy, pytest, lint-imports, detect-secrets, Make targets — in the right venv), or…
docling-project/docling
Applies opinionated production Python conventions chosen by the project's Python version: modern type syntax, pathlib, explicit checks and interface guidance.
ariebovenberg/whenever
Instructions for using whenever's internal Rust FFI abstractions
ArabelaTso/Skills-4-SE
Generate prioritized CVE watchlists and actionable security recommendations for repositories.
ArabelaTso/Skills-4-SE
Automatically migrate Python web applications between frameworks (Flask → FastAPI, Django → FastAPI).
ArabelaTso/Skills-4-SE
Generate test cases using metamorphic testing by applying transformations based on metamorphic properties.
ArabelaTso/Skills-4-SE
Instruments programs to capture execution traces specifically for reproducing reported bugs, enabling consistent replay and diagnosis of failures.
ArabelaTso/Skills-4-SE
Automatically migrate Spring MVC applications to Spring Boot.
ArabelaTso/Skills-4-SE
Instrument programs (Python, C/C++, Java) to capture snapshots of key program states at runtime, including variables, memory, and call stacks.
Works with
Categories
Translate Python programs to equivalent Lean4 code while preserving semantics and ensuring type safety. Python To Lean4 Translator is an agent skill from ArabelaTso/Skills-4-SE. Translate Python programs to equivalent Lean4 code while preserving semantics and ensuring type safety.
Python To Lean4 Translator fits situations like: users ask to convert; port Python code to Lean4; they need to verify Python algorithms using Lean4s theorem proving capabilities.
Run `npx skills add ArabelaTso/Skills-4-SE --skill python-to-lean4-translator -a claude-code`. Or copy the skill folder (skills/python-to-lean4-translator in ArabelaTso/Skills-4-SE) into .claude/skills/python-to-lean4-translator in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ArabelaTso/Skills-4-SE --skill python-to-lean4-translator -a codex`. Or copy the skill folder (skills/python-to-lean4-translator in ArabelaTso/Skills-4-SE) into .agents/skills/python-to-lean4-translator in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ArabelaTso/Skills-4-SE --skill python-to-lean4-translator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/python-to-lean4-translator, .gemini/skills/python-to-lean4-translator, .github/skills/python-to-lean4-translator and .opencode/skills/python-to-lean4-translator in your project.
Going by SKILL.md and its folder, Python To Lean4 Translator needs the command-line tools its instructions call (python). Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Python To Lean4 Translator is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.2k tokens (SKILL.md is roughly 8.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.9k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Python To Lean4 Translator: Ok Script Tasks (AliceJump/ok-gf2, 274 stars), Python Scala Oop (benchflow-ai/skillsbench, 1.8k stars), Minimizing Ty Ecosystem Changes (astral-sh/ruff, 50k stars) and Kedro Babysit (kedro-org/kedro, 11k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
ArabelaTso (a GitHub user) maintains it in ArabelaTso/Skills-4-SE, which has 253 GitHub stars. The repository holds 150 skills in this directory. The repository was last updated on August 21, 2026.
Source: ArabelaTso/Skills-4-SE on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.