跳到正文
Skillpedia
通用编程48k · #4206

codex-profiles

它能做什么

这个程序可以帮你把不同的 Codex“工作区”分开管理。你可以在不同账号或项目之间切换,而不会混淆它们的设置和信息。

适用场景

  • ✓你既用 Codex 处理工作,又用于个人事务时。
  • ✓你同时进行需要不同配置的多个项目时。
  • ✓你希望确保一个账号不会影响另一个账号时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/codex-profiles/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/codex-profiles/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我想用 Codex 处理工作,同时让我的个人使用设置与之分开。”

每周 5 个新技能,1 分钟读完。

工作原理

它会在你的电脑上为 Codex 创建独立的文件夹。每个文件夹都保存着某个“工作区”的登录信息、设置和历史记录。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Codex Profiles

Overview

Use codex-profiles when a user wants separate Codex CLI or Codex Desktop contexts for work, personal, school, client, or project-specific activity. The tool wraps Codex's CODEX_HOME support so each profile has its own Codex home directory for auth, config, sessions, connectors, plugins, caches, logs, and local state.

This skill is for profile selection and operational safety around that boundary. It is not an official OpenAI project, and it does not provide full OS-level isolation.

When to Use This Skill

  • Use when the user wants to keep multiple Codex accounts or project contexts separate on one machine.
  • Use when a workflow needs a different CODEX_HOME without manually exporting environment variables.
  • Use when diagnosing which Codex profile is active or whether profiles are logged in.
  • Use when the user asks about Codex account switching without copying auth.json.
  • Use when launching Codex Desktop from a profile, only after confirming the user accepts app/process disruption.

How It Works

Step 1: Confirm Scope and Installation

First check whether the user wants CLI-only profile switching or Codex Desktop profile launching. Desktop operations can quit, launch, clone, or rebuild app instances, so get explicit approval before running them.

If the tool is already installed, inspect the live command surface:

codex-profile --help
codex-profile doctor
codex-profile list
codex-profile status

If it is not installed, prefer package-manager installs the user can inspect and control:

npm install -g codex-profile
brew install Ducksss/tap/codex-profile

Do not run remote install scripts automatically. If the user asks for a source install, clone the repository and inspect its install instructions first.

Step 2: Create or Select a Profile

Create a new isolated Codex home only when the user names the intended profile:

codex-profile init work
codex-profile path work

Ask the user to log in once per profile when needed:

codex-profile login work

Do not copy, parse, print, or migrate auth.json tokens between profiles.

Step 3: Run Codex CLI With a Profile

Use the CLI profile wrapper for ordinary agent work:

codex-profile cli work
codex-profile cli work exec "run tests and summarize failures"

For one-off shell sessions, prefer the tool's environment or shell activation commands after checking --help:

codex-profile env work
codex-profile shell-init --help

Step 4: Use Desktop Profile Commands Carefully

Codex Desktop launch flows can affect running app state. Before running them, state which profile, app mode, and workspace will be used, then wait for approval.

codex-profile app work ~/Dev/project
codex-profile app work --instance ~/Dev/project

Use --instance only when the user wants side-by-side Desktop profiles and accepts the additional local app clone and separate Electron user-data boundary.

Examples

Example 1: Read-Only Profile Audit

codex-profile list
codex-profile status
codex-profile doctor

Use this before changing profile state. It should not expose token contents.

Example 2: CLI Task in a Work Profile

codex-profile cli work exec "inspect this repository and run its test suite"

Confirm the profile name is intentional before running long tasks.

Example 3: Manual CODEX_HOME Equivalent

If the wrapper is unavailable, explain the underlying boundary instead of improvising token movement:

CODEX_HOME="$HOME/.codex-work" codex
CODEX_HOME="$HOME/.codex-work" codex exec "review this change"

Best Practices

  • Keep profile names explicit and boring, such as work, personal, client-a, or school.
  • Use status, list, and doctor before destructive or Desktop actions.
  • Treat each profile as a separate local Codex home, not as a full sandbox.
  • Keep secrets inside the account/profile that owns them; do not copy auth files between profiles.
  • Prefer CLI profile commands for routine work and reserve Desktop app commands for user-approved context switches.
  • Verify behavior against the installed codex-profile --help, because command flags can change.

Limitations

  • codex-profiles is community-maintained and is not an official OpenAI tool.

…

常见问题

这会隔离我电脑上的所有内容吗?

不会,它只隔离 Codex 自身的信息(例如登录信息和设置)。浏览器历史记录、SSH 密钥等其他内容不会被隔离。

我可以用它在 Codex 中切换账号吗?

可以,它的设计目的就是安全地管理不同的账号或项目上下文,无需手动复制登录文件。

这是官方的 Codex 程序吗?

不是,这是一个由社区维护的项目,并非 Codex 或 OpenAI 的官方工具。

详情

作者的原始描述

Use codex-profiles to run Codex CLI or Codex Desktop with isolated CODEX_HOME profiles for separate accounts, projects, and local state.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#4206
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能