rust-python-bindings
Skill4 starsChanged 2 months agoApache-2.0View on GitHub
Plan or implement a mixed Rust/Python binding change: map PyO3 contracts and select ownership, async, free-threading, buffer, or wheel checks. Use for the boundary as a whole, not pure Rust or pure Python work.
In this repository81 other files it gives its agents.
- agent-cli-designSkill
- agent-tool-boundariesSkill
- behavior-first-implementationSkill
- bounded-prototypeSkill
- bounded-pr-sliceSkill
- building-fdd-validationSkill
- context-efficiencySkill
- cross-language-contractsSkill
- cross-platform-agent-instructionsSkill
- design-interviewSkill
- diagnosis-loopSkill
- domain-languageSkill
- edge-cloud-syncSkill
- handoff-continuitySkill
- immutable-pr-reviewSkill
- memory-context-hygieneSkill
- module-designSkill
- orchestrateSkill
- owner-decision-gateSkill
- parallel-portfolioSkill
- pr-gate-loopSkill
- pyo3-async-lifecycleSkill
- pyo3-buffer-performanceSkill
- pyo3-free-threadingSkill
- pyo3-ownership-errorsSkill
- pyo3-wheel-releaseSkill
- python-api-typingSkill
- python-async-concurrencySkill
- python-ci-releaseSkill
- python-data-boundariesSkill
- python-packaging-environmentsSkill
- python-performanceSkill
- python-pytestSkill
- python-reviewSkill
- python-test-designSkill
- python-threading-workersSkill
- python-workflowSkill
- react-components-stateSkill
- react-performanceSkill
- repository-groundingSkill
- rust-api-designSkill
- rust-async-concurrencySkill
- rust-build-diagnosticsSkill
- rust-ci-releaseSkill
- rust-memory-layoutSkill
- rust-nextestSkill
- rust-numerics-simdSkill
- rust-performanceSkill
- rust-protocol-codecsSkill
- rust-reviewSkill
- rust-storage-durabilitySkill
- rust-test-designSkill
- rust-unsafe-ffiSkill
- rust-workflowSkill
- rust-workspace-dependenciesSkill
- shadcn-react-componentsSkill
- shadcn-svelte-componentsSkill
- simplify-existing-codeSkill
- source-verificationSkill
- svelte-components-runesSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
When installed, use the specialist that matches the work:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Rust Python Bindings
Read local instructions, the actual PyO3/async-bridge/maturin versions, Python support policy, and build path. Keep language-independent behavior in Rust and conversion, Python exceptions, and Python-facing lifecycle in the binding. This entry is the map for a mixed task, not a requirement to invoke every specialist.
Map the exposed contract
Locate Cargo and Python manifests, workspace/default-member/excluded-crate status, module registration, public imports, stubs, interpreter selection, and existing tests. Separate distribution, Rust crate, and Python import names. A Rust workspace gate cannot validate an excluded binding, Python behavior, or installed package contents.
For each changed crossing, identify owner and borrow duration, thread/loop affinity, mutation, conversions, errors, and cleanup. Preserve domain identity, units, precision, null/sentinel distinctions, and protocol side-effect semantics. Do not remove a correct owned copy just to claim zero-copy, retain borrowed Python references beyond attachment, or weaken safe-core policy for binding macros.
Select only relevant checks
When installed, use the specialist that matches the work:
| Concern | Skill |
| Bound/Py ownership, pyclass borrows, conversions, exceptions, stubs | pyo3-ownership-errors |
| Tokio/asyncio, blocking wrappers, cancellation, close/drop | pyo3-async-lifecycle |
| Module declarations, shared state, post-import GIL, concurrency | pyo3-free-threading |
| Boundary profiling, batching, NumPy/buffers, ownership and retention | pyo3-buffer-performance |
| Maturin, ABI, native wheels, sdist, installed typed consumers | pyo3-wheel-release |
They are optional depth, not mandatory dependencies. If unavailable, apply the relevant checks below and use primary documentation. Do not add new agents, model settings, approval rounds, or unrequested CI.
Baseline safeguards
Extract or retain valid owned inputs before detached/async work, then attach to use Python APIs. Attachment is not application mutual exclusion on GIL-disabled Python. Release borrow guards and core locks before reentrant callbacks. Since PyO3 0.28 module support defaults changed; neither adding nor omitting gil_used=false is proof of concurrency correctness.
Trace each runtime's owner, admission/close, task cancellation, callbacks, and final destruction. The async bridge can cancel its wrapped Rust future, but already-sent writes, independently spawned tasks, and blocking work have their own lifetime. Keep immediate abort distinct from graceful shutdown and finalizer behavior.
Validate the actual Python interface: exceptions, arguments/defaults, returned awaitables, context managers, top-level/submodule imports, and type consumers. For support claims use the intended interpreter and verify post-import GIL state. Stable ABI, free-threading, and subinterpreters are distinct promises.
Build and test an explicit installed wheel outside the checkout when packaging or release claims matter. Use native hosts/containers for promised platforms, not emulation/cross-compilation as substitute evidence. Coordinate build ownership and keep expensive matrices in established release lanes.
Report the change, Rust and Python checks separately, artifact and interpreter evidence, and unrun platform/concurrency cases. Read verification notes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

