cross-language-contracts
Skill4 starsChanged 2 months agoApache-2.0View on GitHub
Change or verify a contract shared by Rust, Python, and TypeScript consumers using independent fixtures and compatibility cases. Use for cross-language drift and schema evolution, not a single-language internal refactor.
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-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-python-bindingsSkill
- 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 33
Read fixture design and sources for concrete cases.
≈ “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
Cross-Language Contract Verification
Identify the producer, transport or binding, authoritative schema, generated artifacts, and actual consumers. Cover the languages and versions that participate in the requested change; do not require all three languages when only two are involved. A matching type declaration is not evidence that the shipped runtime path implements it.
State the observable contract
Record the few decisions that can diverge: accepted values, rejection behavior, missing versus null, enum evolution, numeric range and precision, bytes, timestamps and timezone meaning, units, ordering, and resource identity. Include error categories and partial or unknown outcomes where callers act on them. Keep language-specific exceptions or representations behind an explicit adapter rather than forcing identical internal types.
For PyO3, verify Python signatures and stubs against the loaded extension, including defaults, conversion failures, and exceptions. Ownership, cancellation, free-threading, and native ABI qualification still need their existing specialists when those contracts change; a serialization fixture cannot establish thread safety.
Build independent evidence
Reuse a small shared corpus of literal accepted and rejected examples. Preserve raw wire bytes or JSON text for cases where parsing can erase evidence, such as duplicate object names or large numeric tokens. Document the intended result independently of the implementation under test. A serializer reading its own output can reproduce the same mistake on both sides.
Exercise each affected reader against the same cases and each affected producer through a different consumer or an independent expected representation. Compare semantic values where order or formatting is intentionally unspecified; compare exact bytes only when canonical encoding is actually promised. Generated-code compilation, runtime fixture execution, and artifact import tests answer different questions.
Evolve without accidental drift
Change the owning schema or implementation first, then regenerate through the existing command and inspect the resulting public surface. Keep handwritten adapters out of generated output. Test old-producer/new-consumer and new-producer/old-consumer behavior only where those combinations are supported. Adding an optional field or enum case is not automatically harmless to strict readers or exhaustive consumers.
Preserve unknown fields or reject them according to the contract, not a parser's convenient default. Do not silently translate missing telemetry into zero, arbitrary integers into rounded JavaScript numbers, or a local timestamp into a known instant. Reuse existing version negotiation and migration policy rather than inventing a new protocol.
Keep validation proportionate
Start with the changed boundary and a representative installed consumer. Expand to native wheel or release matrices when ABI or support promises require it, using the repository's native-only test posture. Run the available language checks and name unrun ones. Do not replace independent expected values with newly generated output simply to make a failing fixture pass.
Read fixture design and sources for concrete cases.
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.

