rust-filesystem
Skill0 starsChanged 2 months agoMITView on GitHub
File identity. Use when Rust CLI traversal, paths, temporary files, replacement, or deletion must preserve data and behave correctly across filesystem boundaries.
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- rust-buildSkill
- rust-cli-interfaceSkill
- rust-cli-testingSkill
- rust-concurrencySkill
- rust-debuggingSkill
- rust-designSkill
- rust-distributionSkill
- rust-errorsSkill
- rust-idiomaticSkill
- rust-implementSkill
- rust-ioSkill
- rust-memorySkill
- rust-performanceSkill
- rust-processesSkill
- rust-testingSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
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 10
Use Path and OsStr through filesystem operations.
- Distinctive: line 12
When traversal changes, preserve or define its relevant policy for symlinks, hidden entries, ignored paths, cycles, and errors from …
- Distinctive: line 18
Do not truncate an input through an aliased output path before processing it.
≈ “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 Filesystem
File identity. Distinguish a path spelling from the object the operation actually opens or changes. Honor supplied requirements and preserve settled choices outside the requested change; resolve only what the task leaves open.
Use Path and OsStr through filesystem operations; lossy display is not a round-trip representation. Preserve the supported platforms' path, case, permission, and link behavior. Directory iteration order is not a sorting guarantee; make deterministic output explicit only where required.
When traversal changes, preserve or define its relevant policy for symlinks, hidden entries, ignored paths, cycles, and errors from individual entries. Bound open handles and retained traversal state. Reuse existing traversal facilities when their semantics match rather than rebuilding their policy accidentally.
Choose open options from the intended effect. Check-then-create can race; use atomic exclusive creation when replacing an existing object is forbidden. Lexical normalization or a prior canonicalization does not by itself enforce containment against concurrent path changes. Use handle-relative or platform facilities when the threat model requires them.
For replacement that must preserve the old file on failure, stage through a securely created temporary file on the destination filesystem and use the appropriate commit operation. Inspect replacement, metadata, and platform semantics. Atomic visibility and crash durability are separate promises; flush buffers and perform the required file and directory synchronization for the latter.
Do not truncate an input through an aliased output path before processing it. Keep cleanup ownership explicit, including errors during staging or commit; retain recoverable data when recovery is the contract.
For review, explain the file-identity or preservation risk without editing. For implementation, exercise the relevant existing-target, link, alias, permission, or interrupted-write case in owned fixtures and inspect resulting files independently. Read-only traversal does not require a replacement or crash-durability campaign. When durability is promised, retain its real requirements and name the platform and failure boundary actually exercised; ordinary success is not crash proof.
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.

