# Path Types

Choose Rust types for operating system paths across the Codex repository.

- Repository: https://github.com/openinterpreter/openinterpreter (68772 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add openinterpreter/openinterpreter --skill path-types -g -a claude-code -y`
Codex: `npx skills add openinterpreter/openinterpreter --skill path-types -g -a codex -y`
Cursor: `npx skills add openinterpreter/openinterpreter --skill path-types -g -a cursor -y`
Gemini CLI: `npx skills add openinterpreter/openinterpreter --skill path-types -g -a gemini-cli -y`

## Description

Choose Rust types for operating system paths across the Codex repository. Use when defining new path-bearing types or explicitly migrating existing ones.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Path Types

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.

- In app-server protocol types, use `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.
- In exec-server protocol types, use `PathUri`. Internally, use `PathUri` or `AbsolutePathBuf` as
  appropriate.
- In dependencies shared by both servers, use `PathUri` or separate APIs that decouple their use
  cases.
- Tool call arguments that the model is expected to generate should be deserialized as regular
  `String`s with feature-specific path handling code.

## Migration requirements

Keep these requirements in mind while migrating code to conform with the above guidelines:

* existing app-server clients keep sending and receiving legacy native-path strings
* app-server can retain and manipulate foreign-platform path URIs
* exec-server APIs use file:// URIs
* local-only operation must not change model-visible text
* model tool arguments may contain raw relative or absolute paths for any OS
* path reasoning must work before the related environment has come online
* URIs cannot explicitly encode the executor’s path convention or operating system
* users must not configure the environment’s OS/path convention explicitly
* URIs should not yet be stored in rollouts, databases, or other persistent storage
* path conversion errors: fail-closed for security-relevant paths, fail-open for UI/diagnostics
* prefer small focused methods on `PathUri` or `LegacyAppPathString` over local helpers
* represent `PathUri` values as URIs in diagnostics

The rest: https://github.com/openinterpreter/openinterpreter/blob/HEAD/.codex/skills/path-types/SKILL.md
