Strict Programming Practices
code-yeongyu/oh-my-openagent
Applies strict, type-first coding rules for Python, Rust, TypeScript and Go, loading the matching language reference before the agent writes or edits any code.
Instructions for using whenever's internal Rust FFI abstractions
$ npx skills add ariebovenberg/whenever --skill rust-ffi -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ariebovenberg/whenever rust-ffi --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/ariebovenberg/whenever.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/rust-ffi .claude/skills/rust-ffi && 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 "rust-ffi" agent skill from https://github.com/ariebovenberg/whenever/tree/main/.agents/skills/rust-ffi into .claude/skills/rust-ffi/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-ffi", 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/ariebovenberg/whenever/tree/main/.agents/skills/rust-ffiType 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 ariebovenberg/whenever --skill rust-ffi -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ariebovenberg/whenever rust-ffi --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ariebovenberg/whenever.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/rust-ffi .agents/skills/rust-ffi && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "rust-ffi" agent skill from https://github.com/ariebovenberg/whenever/tree/main/.agents/skills/rust-ffi into .agents/skills/rust-ffi/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-ffi", 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 ariebovenberg/whenever --skill rust-ffi -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ariebovenberg/whenever rust-ffi --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ariebovenberg/whenever.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/rust-ffi .cursor/skills/rust-ffi && 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 "rust-ffi" agent skill from https://github.com/ariebovenberg/whenever/tree/main/.agents/skills/rust-ffi into .cursor/skills/rust-ffi/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-ffi", 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/ariebovenberg/whenever.git --path .agents/skills/rust-ffi--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 ariebovenberg/whenever --skill rust-ffi -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ariebovenberg/whenever rust-ffi --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ariebovenberg/whenever.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/rust-ffi .gemini/skills/rust-ffi && 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 "rust-ffi" agent skill from https://github.com/ariebovenberg/whenever/tree/main/.agents/skills/rust-ffi into .gemini/skills/rust-ffi/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-ffi", 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 ariebovenberg/whenever rust-ffiInstalls 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 ariebovenberg/whenever --skill rust-ffi -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ariebovenberg/whenever.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/rust-ffi .github/skills/rust-ffi && 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 "rust-ffi" agent skill from https://github.com/ariebovenberg/whenever/tree/main/.agents/skills/rust-ffi into .github/skills/rust-ffi/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-ffi", 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 ariebovenberg/whenever --skill rust-ffi -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ariebovenberg/whenever rust-ffi --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ariebovenberg/whenever.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/rust-ffi .opencode/skills/rust-ffi && 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 "rust-ffi" agent skill from https://github.com/ariebovenberg/whenever/tree/main/.agents/skills/rust-ffi into .opencode/skills/rust-ffi/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-ffi", 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.
rust-ffiInstructions for using whenever's internal Rust FFI abstractions
Rust Ffi is an agent skill from ariebovenberg/whenever. Instructions for using whenever's internal Rust FFI abstractions
Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development, covering Type safety. It works with Rust and Python. The repository describes itself as: ⏰ Type-safe datetimes for Python that get DST right. Rust or pure Python, your choice. The licence is MIT.
Read from SKILL.md and the folder at commit 0e51a9c. 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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are rust).
From 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.
Rust Ffi loads about 2.5k tokens when it runs. Until then it costs about 18 tokens; SKILL.md has 1,045 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 ariebovenberg/whenever at commit 0e51a9c, republished under its MIT licence (© ariebovenberg). 1,045 words, ~2,493 tokens.
.claude/skills/rust-ffi/SKILL.md (or your agent's skills folder).pyo3_ffi, not pyo3The low-level pyo3_ffi module is used, not pyo3 directly.
This avoids overhead, complex abstractions, and gives full control over generated code.
The src/py/ module provides safe wrappers. Key types:
| Type | Purpose |
|---|---|
PyObj | Core wrapper around *mut PyObject. Has .extract() (Copy types), .extract_ref() (ref types), .type_(), .is_none() |
Owned<T> | RAII refcount wrapper. Use Owned::new() to take ownership, .borrow() for non-owning access |
PyClass<T> | A Python class whose instances contain a Rust T; carries module state via .state() → &State |
PyRef<'a, T> | A borrowed extension instance together with access to its T payload |
PyPayload | Trait implemented by Rust values stored inside extension objects |
PyType | A Python type object |
PyReturn | Alias for PyResult<Owned<PyObj>> — the return type of Python-visible functions |
PyErrMarker | Sentinel indicating the Python error indicator is set |
Key helpers in src/py/:
raise_value_err(), raise_type_err(), raise_key_err() — raise Python exceptionswarn_with_class(cls, msg, stacklevel) — emit a Python warning. Takes PyObj, not a raw pointerhandle_kwargs(fname, kwargs, handler) — iterate kwargs with interned string matchinghandle_no_args(fname, args) — reject positional argumentshandle_one_arg(fname, args) — extract exactly one positional arg, or raise TypeErrorhandle_opt_arg(fname, args) — extract zero or one positional arghandle_one_kwarg(fname, key, kwargs) — extract a single optional kwarg by keyraise_mixed_args(fname), raise_unexpected_kwarg(fname, key) — keep common argument errors
consistent in class-specific parsersobj.expect_int(name) — accept a Python int or subclass and raise
TypeError: {name} must be an integer otherwisefind_interned(value, &[(string, value), ...]) — match a PyObj against an
interned-string/value table, returning Optionmatch_interned_str(name, value, &[(string, value), ...]) — like find_interned but
raises on no matchfind_interned_with(value, handler) — compose multiple interned-string matchers while
retaining one global pointer-equality pass before Unicode comparisonfind_interned_by(value, choices, eq) — match one table using the equality function supplied
by find_interned_withmatch_type!(obj, type => |value| {...}, _ => {...}) — match an extension object against differently typed PyClass<T> values; prefix an arm with ref for non-Copy typesCompareOp::from_ffi(op).apply(a, b) — apply a CPython rich-comparison operation to ordered Rust valuesgeneric_alloc(cls, data) — allocate a Python object with the given payloadPyAsciiStrBuilder::format() — build a Python string without intermediate Rust StringPyTuple::with_len() / unsafe .init_item_unchecked() — allocate and initialize tuple slots.to_py() via the ToPy trait — convert Rust values to Python objects.to_tuple() — convert a Python sequence to a tuple (prefer over seq_len+seq_getitem)import(module_name) — import a Python module (don't call PyImport_ImportModule directly)State (in src/pymodule/def.rs) is a large struct stored on the Python module. It holds:
HeapType<T> for each class (date_type, time_delta_type, etc.)exc_repeated, exc_skipped, etc.)warn_deprecation, warn_days_not_always_24h, etc.)str_years, str_hour, str_units, etc.)Access it via cls.state() from any PyClass<T>.
Methods are registered in a static mut METHODS: &[PyMethodDef] array using macros:
method0! — no argsmethod1! — one positional argmethod_vararg! — variable positional argsmethod_kwargs! — positional args + keyword argsclassmethod1!, classmethod_kwargs! — class methodsThe function signatures must match the macro used. For method_kwargs!:
fn my_method(cls: PyClass<MyType>, slf: MyType, args: &[PyObj], kwargs: &mut IterKwargs) -> PyReturnPyAsciiStrBuilder instead of format!() → to_py())i32/i64 over i128 when possiblePositional argument handling:
// No positional args:
handle_no_args("method_name", args)?;
// Exactly one required arg:
let arg = handle_one_arg("method_name", args)?;
// Zero or one optional arg:
let maybe_arg = handle_opt_arg("method_name", args)?;Kwarg handling:
handle_kwargs("method_name", kwargs, |key, value, eq| {
if eq(key, str_some_kwarg) {
// parse value
} else {
return Ok(false); // unrecognized kwarg
}
Ok(true)
})Single optional kwarg shortcut:
let relative_to = handle_one_kwarg("total", state.str_relative_to, kwargs)?;Building deltas from kwargs (shift/add/subtract methods):
Use common::shift_args::parse_datetime_shift_kwargs() for full datetime units or
parse_calendar_shift_kwargs() for calendar-only units. They return a typed
DateTimeShift or CalendarShift; the datetime parser's callback retains
class-specific kwargs such as disambiguate and warning suppression. For a
positional delta, use parse_datetime_shift_arg() or parse_calendar_shift_arg();
these raise the method-specific type error if the argument is not a supported delta.
Instant-like arguments:
Use common::instant::extract_instant() when a non-Instant operand should fall through to another
operation, and parse_instant_arg() for a required Instant, OffsetDateTime, or ZonedDateTime
argument. Both normalize to the domain Instant.
Interned string matching with custom errors:
Use find_interned + manual error message when you need a specific error format.
Use match_interned_str when the default error format is acceptable.
For composed subsets, use find_interned_with(value, |v, eq| ...), call
find_interned_by(v, choices, eq) for table-shaped subsets, and use eq(v, expected) for
individual strings. Do not call top-level find_interned separately for each subset: that would
perform Unicode comparison before later subsets have had their pointer-equality pass.
Error handling:
raise_value_err("msg")? for ValueError.ok_or_value_err("msg")? on Options — for domain errors with specific messages.ok_or_range_err()? on Options — for generic out-of-range errors (preferred)PyErrMarker() (with parens) as the sentinel in PyResult<T>Ord in Rust. Compare via .to_instant() for ordering.
Non-Copy (contains Arc<TimeZone>). Uses Arc::ptr_eq + content equality for timezone comparison.
DST-aware operations resolve PlainDateTime::local_seconds() through
TimeZone::mapping_for_local() and PlainDateTime::resolve_in().EpochSecs to local timezone
lookup. LocalMapping, Disambiguation, and ResolvePolicy define gap/fold handling in the
domain layer. Map ResolveError to Python exceptions only in binding code.Instant has Ord). Offset is an Offset scalar.PlainDateTime::assume_offset() when attaching a validated offset and
assume_offset_unchecked() only when the represented instant is already known to be in range.Ord.CalendarShift and DateTimeShift in the domain layer. Prefer
Date::shift_by() and PlainDateTime::shift_by() once a shift has been parsed. Python-facing
component replacement starts with PlainDateTime::components() and uses
DateTimeComponents in classes::plain_datetime.secs: DeltaSeconds + subsec: SubSecNanos. Use .total_nanos() -> i128.
Has .in_single_unit() and .in_exact_units() for unit decomposition, and owns the pure
parse_iso() implementation; map its parse errors to Python exceptions in the binding.fmt::Precision, round::RoundUnit, and
CalendarUnit/DifferenceUnit/ExactUnit in domain::difference. Keep these domains distinct
unless their parsing and behavior are demonstrably identical. Keep common::fmt free of Python
argument parsing; common::format_args adapts Python format_iso arguments to its pure types.DeltaField<T> with the integer type's MIN value as
the UNSET sentinel. DeltaField has custom Debug showing <unset> for sentinel values and
.as_option() for checked extraction..ok_or_range_err() for out-of-range errors instead of custom messages.// SAFETY: comments for unsafe blocks per the Rust convention (exact casing matters).pub(crate) not pub for internal visibility.© ariebovenberg, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/rust-ffi of ariebovenberg/whenever.
Open the folder on GitHubat commit 0e51a9c
Rust Ffi 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 |
|---|---|---|---|---|---|---|
| Rust Ffi this skillariebovenberg/whenever | 2.4k | — | ~2.5k | Automated safety check: Pass | MIT | |
| Strict Programming Practicescode-yeongyu/oh-my-openagent | 70k | — | ~9.5k | Automated safety check: Pass | Custom licence | |
| Minimizing Ty Ecosystem Changesastral-sh/ruff | 50k | — | ~4.6k | Automated safety check: Pass | MIT | |
| RTK Rust Design Patternsrtk-ai/rtk | 83k | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| 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 |
code-yeongyu/oh-my-openagent
Applies strict, type-first coding rules for Python, Rust, TypeScript and Go, loading the matching language reference before the agent writes or edits any code.
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"…
rtk-ai/rtk
Describes seven Rust design patterns for the RTK CLI filter modules, with when to use each, RTK examples, and notes on when a pattern is overkill.
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.
nexmoe/eve
Universal release workflow. An agent skill from nexmoe/eve.
Categories
Instructions for using whenever's internal Rust FFI abstractions. Rust Ffi is an agent skill from ariebovenberg/whenever.
Rust Ffi fits situations like: tasks that involve Type safety.
Run `npx skills add ariebovenberg/whenever --skill rust-ffi -a claude-code`. Or copy the skill folder (.agents/skills/rust-ffi in ariebovenberg/whenever) into .claude/skills/rust-ffi in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ariebovenberg/whenever --skill rust-ffi -a codex`. Or copy the skill folder (.agents/skills/rust-ffi in ariebovenberg/whenever) into .agents/skills/rust-ffi 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 ariebovenberg/whenever --skill rust-ffi -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rust-ffi, .gemini/skills/rust-ffi, .github/skills/rust-ffi and .opencode/skills/rust-ffi in your project.
SKILL.md names no scripts, command-line tools or credentials: Rust Ffi is instructions for the agent only. 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.
Rust Ffi is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Rust Ffi: Strict Programming Practices (code-yeongyu/oh-my-openagent, 70k stars), Minimizing Ty Ecosystem Changes (astral-sh/ruff, 50k stars), RTK Rust Design Patterns (rtk-ai/rtk, 83k 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.
ariebovenberg (a GitHub user) maintains it in ariebovenberg/whenever, which has 2,407 GitHub stars. The repository was last updated on October 9, 2026.
Source: ariebovenberg/whenever on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.