path-types

Selects Rust path types for app-server and exec-server protocol code in the Codex repository.

5|1|Updated Jun 26, 2026
One-click install
npx skills add https://github.com/looooonk/better-codex --skill path-types-looooonk
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: path-types
Source: https://github.com/looooonk/better-codex/tree/main/.codex/skills/path-types
Command: npx skills add https://github.com/looooonk/better-codex --skill path-types-looooonk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When writing or migrating Rust code in the Codex repository, developers face ambiguity about which path type to use—PathUri, LegacyAppPathString, AbsolutePathBuf, or plain String—across app-server, exec-server, and shared dependencies. Choosing incorrectly breaks backwards compatibility with existing clients or violates the ongoing URI migration. ## Core Features & Use Cases - Type selection rules by layer: Defines which path type belongs in app-server protocol types, exec-server protocol types, shared dependencies, and model-generated tool call arguments. - Migration requirements checklist: Lists constraints such as legacy native-path compatibility, file:// URIs in exec-server APIs, fail-closed versus fail-open error handling, and avoiding URI persistence in rollouts or databases. - Use Case: When adding a new field carrying a filesystem path to an app-server protocol struct, apply this guidance to use LegacyAppPathString at the boundary and convert to PathUri internally, keeping existing clients working. ## Quick Start Ask the agent to apply the path-types guidance when defining a new path-bearing type in the Codex repository, for example: "Add a working directory field to this app-server request type following the path-types rules."

Frequently Asked Questions about path-types

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose a Rust path type for Codex protocol code?▼

Use LegacyAppPathString in app-server protocol types for backwards compatibility, converting to PathUri internally. Use PathUri in exec-server protocol types, and AbsolutePathBuf or PathBuf for host-local logic such as config values.

What path type should model tool call arguments use in Rust?▼

Tool call arguments that the model generates should be deserialized as regular Strings with feature-specific path handling code. Model arguments may contain raw relative or absolute paths for any operating system.

Should I migrate existing Codex code to the new path types?▼

Only change existing code when explicitly requested, keeping edits minimal and proportional. The rules describe the target state of an ongoing migration, so apply them when defining new types by default.

Can PathUri values be stored in rollouts or databases?▼

No. URIs should not yet be stored in rollouts, databases, or other persistent storage during the migration. Path reasoning must also work before the related environment has come online.

How should path conversion errors be handled in Codex?▼

Fail closed for security-relevant paths and fail open for UI or diagnostics. Migration should not add significant new failure modes, though some previously infallible code paths will need to surface errors.