一键导入
path-types
Choose Rust types for operating system paths across the Codex repository. Use when defining new path-bearing types or explicitly migrating existing ones.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Choose Rust types for operating system paths across the Codex repository. Use when defining new path-bearing types or explicitly migrating existing ones.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | path-types |
| description | Choose Rust types for operating system paths across the Codex repository. Use when defining new path-bearing types or explicitly migrating existing ones. |
Apply this guidance when defining new types. Change existing code only when explicitly requested, and keep edits minimal and proportional. Treat these rules as the target state of an ongoing migration; if compliance is difficult, ask the user how to proceed.
LegacyAppPathString for backwards compatibility during the URI
migration. At the protocol boundary, convert it to PathUri and use PathUri internally. For
host-local logic, such as some config values, use AbsolutePathBuf or PathBuf instead.PathUri. Internally, use PathUri or AbsolutePathBuf as
appropriate.PathUri or separate APIs that decouple their use
cases.Strings with feature-specific path handling code.Keep these requirements in mind while migrating code to conform with the above guidelines:
PathUri or LegacyAppPathString over local helpersPathUri values as URIs in diagnosticsIt is OK if the conversion between paths and URIs is somewhat lossy as long as it will do the right thing for real users.
Migrating to URIs should not add significant new failure modes. We will need to surface errors in some places that were previously infallible but it should be kept to a minimum.