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.

npx skills add https://github.com/openai/codex --skill path-types

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 Strings 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

It 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.

More skills from openai

user-context
openai
Load or manage the Data Analytics plugin's durable source-routing preferences, onboarding logic, setup progress, and semantic-layer registry.
official
notion-research-documentation
openai
Research Notion content and synthesize into structured briefs, reports, or comparisons with citations. Search and fetch Notion pages using targeted queries, then organize findings by theme with inline source citations and a references section Choose from four output formats (quick brief, research summary, comparison, comprehensive report) based on scope and user goal Create and update Notion pages using built-in templates; link sources directly and track changes as new information arrives...
official
rcsb-pdb-skill
openai
Submit compact RCSB PDB requests for core metadata, Search API queries, and FASTA downloads. Use when a user wants concise RCSB summaries; save raw JSON or…
official
pdf
openai
PDF reading, creation, and validation with visual rendering and programmatic generation. Render PDF pages to PNG for visual inspection of layout, spacing, and typography before delivery using Poppler ( pdftoppm ) Generate PDFs programmatically with reportlab for reliable formatting; extract text and metadata with pdfplumber or pypdf Enforce quality standards: no clipped text, overlapping elements, broken tables, or rendering artifacts; ASCII hyphens only, human-readable citations Use...
official
test-coverage-improver
openai
Improve test coverage in the OpenAI Agents JS monorepo: run `pnpm test:coverage`, inspect coverage artifacts, identify low-coverage files and branches, propose…
official
playwright
openai
Terminal-driven browser automation with element snapshots and interactive UI workflows. Operates via playwright-cli wrapper script (requires npx ); supports headless and headed modes for visual debugging Core workflow: open page, snapshot for stable element references, interact using refs, re-snapshot after navigation or DOM changes Includes form filling, clicking, typing, multi-tab management, screenshot/PDF capture, and trace recording for flow debugging Element refs (e.g., e3 , e15 )...
official
ukb-topmed-phewas-skill
openai
Fetch compact UKB-TOPMed PheWAS summaries for single variants by accepting rsID, GRCh37, or GRCh38 input and resolving to the required GRCh38 query. Use when a…
official
code-review-context
openai
Model visible context
official