python-data-boundaries
Skill4 starsChanged 2 months agoApache-2.0View on GitHub
Use for Python serialization, numerical conversion, timestamps, units, missing values, or untrusted data entering protocol, building, and storage APIs. Not a generic dataframe or schema-framework migration.
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-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
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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 29
Use independent examples for wire/JSON compatibility, including Unicode and malformed encodings.
- Distinctive: line 33
Read domain examples when touching building or native data.
≈ “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
Python Data Boundaries
Preserve meaning at Python, wire, and native boundaries. Read the actual domain contract before choosing coercion, normalization, or rejection. A shorter representation is not automatically equivalent.
Define the value domain
Identify accepted Python types, encoded representation, Rust destination types, and round-trip expectations. Distinguish absent, explicit null, false, zero, empty, unavailable, and domain sentinels such as Haystack Marker/NA/Remove. Do not use truthiness to select a default when zero or false is valid.
Check subclass relationships before conversion: Python bool is an int subclass and datetime is a date subclass. Decide whether subclasses and objects with conversion methods are accepted; conversion can execute Python code. Keep protocol ranges and maximum collection sizes explicit. Python's arbitrary-size integers do not fit every Rust integer, float, timestamp, or wire field.
For numeric values, test exact integer boundaries, values beyond binary64's consecutive-integer range, signed zero, NaN/infinity, overflow, and rounding. Preserve units and scale with the value. Do not silently convert engineering units, truncate timestamps, or use an epsilon where byte/bit determinism is the contract. Approximate numerical comparisons need a justified tolerance and separately tested exact/discrete cases.
Treat time as data with a policy
Separate wall-clock timestamps from monotonic deadlines. Define timezone awareness, UTC normalization, source zone retention, ambiguous/nonexistent local times, and supported resolution. Test DST folds, offsets, pre-epoch times, and conversion overflow. Do not infer an IANA zone from a numeric offset or silently interpret naive datetimes as local time.
For historian and protocol data, preserve quality/status flags and observation versus ingestion time. Missing samples are not zero measurements. Sorting, duplicate resolution, and aggregation need explicit policies rather than accidental dict or floating-point behavior.
Bound and validate serialization
Enforce input byte/element/depth budgets at the appropriate layer before expensive work. Python's JSON defaults are not a strict domain validator: non-finite tokens and duplicate names need deliberate handling. Distinguish JSON syntax acceptance from schema and application validity. Do not deserialize untrusted pickle or execute arbitrary objects to interpret a data file.
Use independent examples for wire/JSON compatibility, including Unicode and malformed encodings. A Python-to-Rust-to-Python round trip through the same converter is useful but cannot by itself detect shared coercion mistakes. Keep conversion ownership explicit and measure copies before removing them.
Report the preserved contract, intentional losses or rejections, boundary tests, and compatibility implications. Do not replace a repository's chosen schema library solely to satisfy this skill.
Read domain examples when touching building or native data.
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.

