rust-api-design
Skill76 starsChanged 9 days agoApache-2.0View on GitHub
设计、修改、重构或审查 TGOSKits 的公共与共享 Rust 接口、类型化错误、软件包和模块边界、依赖、特征、宏或领域对象时使用。普通私有实现仍使用 rust-code-quality;涉及新能力时还需使用 feature-development。
6 other projects use a version of this.
Adopted by
Most recently taken up by
- adxptived/Rust-Skillstheir own version, first seen Oct 17, 2026
- takurot/rust-skills-comprehensivetheir own version, first seen Oct 15, 2026
- full-stack-skills/rust-skillstheir own version, first seen Oct 15, 2026
- Lu1sDV/skillsmdtheir own version, first seen Oct 13, 2026
- jscott3201/yet-more-skillstheir own version, first seen Sep 7, 2026
- botirkhaltaev/botir-skillstheir own version, first seen Jul 24, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- full-stack-skills/rust-skills★ 8same name
- botirkhaltaev/botir-skills★ 4same name
- jscott3201/yet-more-skills★ 4same name
- Lu1sDV/skillsmd★ 2same name
- adxptived/Rust-Skills★ 1same name
- takurot/rust-skills-comprehensive★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- arceos-test-adapterSkill
- arch-platform-portingSkill
- board-linux-starry-debugSkill
- board-uboot-fsck-repairSkill
- crates-io-ownerSkill
- cross-kernel-driverSkill
- feature-developmentSkill
- humanizerSkill
- markdown-doc-writerSkill
- multi-arch-layeringSkill
- qemu-gdb-debuggingSkill
- reassign-pr-reviewersSkill
- resolve-github-issueSkill
- review-open-prsSkill
- review-single-prSkill
- rust-code-qualitySkill
- rust-concurrency-safetySkill
- rust-unsafe-safetySkill
- starry-syscall-compatibilitySkill
- starry-test-suitSkill
- test-qualitySkill
- update-std-testsSkill
The file
Files
Rust 公共接口设计
1. 适用方式
当改动改变调用方可见类型、方法、错误、功能开关、软件包布局、重新导出、依赖来源或跨层能力边界时使用本技能。先完整阅读 类型与接口,再在涉及软件包、模块、条件编译、依赖或宏时完整阅读 模块与依赖。
公共不只指 pub。工作区内多个软件包依赖的私有约定、驱动和操作系统之间的适配契约、配置文件格式及测试运行器输入同样属于共享接口。
2. 设计顺序
先确定调用方、所有者、有效状态、失败语义和兼容边界,再选择类型和方法。现有项目边界能够表达所需语义时优先扩展,不并行创建第二套登记表、错误体系或配置来源。
新增或扩展能力时同时使用 feature-development。同一契约需要跨多个目标架构归纳共同性、保留特异性或集中条件编译选择时使用 multi-arch-layering。锁、原子操作、异步执行或共享生命周期使用 rust-concurrency-safety;接口要求调用方维护内存安全前置条件时使用 rust-unsafe-safety;驱动与操作系统适配边界继续使用 cross-kernel-driver。
3. 验收条件
接口改动应让调用方无需穿透内部对象或猜测状态即可完成领域操作。成功、暂不可用、不支持和失败能够被类型区分;资源与能力的所有权、生命周期和线程安全保证可从类型与文档判断;功能开关组合、重新导出和发布依赖在项目任务工具覆盖的配置中一致。
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.

