Community编程与开发github.com

路径类型

为 Codex 仓库中的操作系统路径选择 Rust 类型。适用于定义新的路径承载类型或显式迁移现有类型。

路径类型 是什么?

该技能为 Codex 仓库中操作系统路径的 Rust 类型选择提供准则,适用于定义新类型或显式迁移现有类型的情况。它规定了协议类型、内部逻辑及工具参数中路径类型的选用规则,例如在 app-server 协议中使用 `LegacyAppPathString` 实现向后兼容,在 exec-server 协议中使用 `PathUri`,并推荐在内部使用 `PathUri` 或 `AbsolutePathBuf`。迁移时必须满足多项要求,包括保持现有客户端兼容、URI 格式统一、本地操作不改变模型可见文本、工具参数可包含任意 OS 路径以及在诊断中表示 URI。该技能支持通用编程场景(如 Codex/AI Agent 开发),通过最小改动渐进式迁移,并规定路径转换错误处理策略(安全路径失败闭合,UI/诊断失败开放)。

兼容平台~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/openai/codex/tree/main/.codex/skills/path-types

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

路径类型 是做什么的?

在定义新类型时应用此指南。仅在明确请求时更改现有代码,并保持编辑最小且适中。将这些规则视为持续迁移的目标状态;如果难以符合,请询问用户如何继续。

  • 在 app-server 协议类型中,使用 LegacyAppPathString 以在 URI 迁移期间保持向后兼容。在协议边界处,将其转换为 PathUri,并在内部使用 PathUri。对于主机本地逻辑(例如某些配置值),改用 AbsolutePathBuf 或 PathBuf。
  • 在 exec-server 协议类型中,使用 PathUri。在内部,酌情使用 PathUri 或 AbsolutePathBuf。
  • 在两个服务器共享的依赖项中,使用 PathUri 或解耦其用例的独立 API。
  • 模型预期生成的工具调用参数应反序列化为常规 String,并附带特定功能的路径处理代码。

迁移要求

在迁移代码以符合上述指南时,请牢记以下要求:

  • 现有 app-server 客户端继续发送和接收遗留本机路径字符串
  • app-server 可以保留和操作跨平台路径 URI
  • exec-server API 使用 file:// URI
  • 本地操作不得改变模型可见文本
  • 模型工具参数可能包含任意操作系统的原始相对或绝对路径
  • 路径推理必须在相关环境上线之前工作
  • URI 不能显式编码执行器的路径约定或操作系统
  • 用户不得显式配置环境的操作系统/路径约定
  • URI 不应存储在回滚、数据库或其他持久存储中
  • 路径转换错误:对于安全相关路径失败闭合,对于 UI/诊断失败开放
  • 优先使用 PathUri 或 LegacyAppPathString 上小而专注的方法,而非局部辅助函数
  • 在诊断中将 PathUri 值表示为 URI

只要能为真实用户做正确的事情,路径与 URI 之间的转换有一定损失是可以接受的。

迁移到 URI 不应增加显著的新故障模式。我们需要在以前无故障的地方显示错误,但应保持最少。

Individual skills in this repo

This repo contains 19 individual skills — each has its own dedicated page.

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep watching open PRs so fresh review feedback is surfaced promptly. Use when the user asks Codex to monitor a PR, watch CI, handle review comments, or keep an eye on failures and feedback on an open PR.

code-review

Run a final code review on a pull request

code-review-change-size

Change size guidance (800 lines)

code-review-context

Model visible context

code-review-testing

Test authoring guidance

codex-bug

Diagnose GitHub bug reports in openai/codex. Use when given a GitHub issue URL from openai/codex and asked to decide next steps such as verifying against the repo, requesting more info, or explaining why it is not a bug; follow any additional user-provided instructions.

codex-issue-digest

Run a GitHub issue digest for openai/codex by feature-area labels, all areas, and configurable time windows. Use when asked to summarize recent Codex bug reports or enhancement requests, especially for owner-specific labels such as tui, exec, app, or similar areas.

codex-pr-body

Update the title and body of one or more pull requests.

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG/vector/code-native assets, extending an established icon or logo system, or building the visual directly in HTML/CSS/canvas.

openai/babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep watching open PRs so fresh review feedback is surfaced promptly. Use when the user asks Codex to monitor a PR, watch CI, handle review comments, or keep an eye on failures and feedback on an open PR.

openai-docs

Use when the user asks how to build with OpenAI products or APIs, asks about Codex itself or choosing Codex surfaces, needs up-to-date official documentation with citations, help choosing the latest model for a use case, or model upgrade and prompt-upgrade guidance; use OpenAI docs MCP tools for non-Codex docs questions, use the Codex manual helper first for broad Codex self-knowledge, and restrict fallback browsing to official OpenAI domains.

openai/test-tui

Guide for testing Codex TUI interactively

plugin-creator

Create and scaffold plugin directories for Codex with a required `.codex-plugin/plugin.json`, optional plugin folders/files, valid manifest defaults, and personal-marketplace entries by default. Use when Codex needs to create a new personal plugin, add optional plugin structure, generate or update marketplace entries for plugin ordering and availability metadata, or update an existing local plugin during development with the CLI-driven cachebuster and reinstall flow.

pushing-ci-changes

Pushing GitHub Actions changes, resolving push rejection, requesting upload exceptions.

remote-tests

Testing against remote executors in integration tests.

skill-creator

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Codex's capabilities with specialized knowledge, workflows, or tool integrations.

skill-installer

Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).

test-tui

Guide for testing Codex TUI interactively

update-v8-version

Update Codex's pinned `v8` / `rusty_v8` versions, validate the release-candidate path, and investigate failed V8 canary or artifact builds. Use when asked to bump V8, update `rusty_v8` artifacts, prepare or validate a V8 release candidate, check `v8-canary`, or diagnose why a V8 version update no longer builds.

相关技能