askcodex
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseaskcodex
askcodex
You have the CLI. It sends one request to an OpenAI model through the user's
ChatGPT/Codex subscription and returns a text answer, an image, or a transcript. Turn the user's
request into a complete brief, run one focused call, check the result against the brief, and hand
the user the useful output with its saved path.
askcodexCanonical copy: in https://github.com/JairoTorregrosa/askcodex (this is a mirror; change
it there, then re-sync). Local delta: the description's not-for clause points to second-opinion.
skill/你可以使用 CLI。它通过用户的 ChatGPT/Codex 订阅向 OpenAI 模型发送一次请求,并返回文本答案、图像或转录文本。将用户请求整理成完整的任务说明,执行一次聚焦调用,根据任务说明检查结果,并将有用输出及其保存路径交给用户。
askcodex规范副本:https://github.com/JairoTorregrosa/askcodex 中的 (这是一个镜像;应在该处修改,然后重新同步)。本地差异:description 中的“不适用”条款指向 second-opinion。
skill/Context you must respect
必须遵守的事项
- This skill describes askcodex 0.3.0 or later. Check once per session. 0.2.x has no
askcodex --version,--schemaor--verbosity, prints the ~700 KB raw catalog inside--background, and gives errors withoutmodels --json; 0.1.x also hides the GPT-6 models. If it is older, tell the user to update instead of working around it: in an askcodex checkout,error.backend; without one, download the latest release binary from https://github.com/JairoTorregrosa/askcodex/releases (verifygit pull && ./install.sh), or clone it and runSHA256SUMS(needs Rust 1.88+)../install.sh - Every call is one-shot and stateless. sends only the prompt and optional
ask: the model gets no tools, files, browsing, repository, or earlier conversation. A file path in a prompt is just text; paste the contents instead.--instructions - Everything in a prompt, a reference image or an audio file leaves the machine for OpenAI's backend. Before you paste logs, exports, code or documents, always remove credentials, tokens, keys and passwords, even when the user supplied them for the task: replace them with placeholders. Also remove personal or customer data the task does not need; if the task needs it, or you cannot tell, ask the user first.
- Every call spends the user's subscription quota. GPT-6 Astra is the most expensive model.
- A second model's answer is input to your work. Verify its facts, review its code, and look at its images before you report success.
- askcodex uses the credentials saved to
codex login; it reads no API key. Never print credentials.~/.codex/auth.json
- 本 skill 适用于 askcodex 0.3.0 或更高版本。每个会话检查一次 。0.2.x 不支持
askcodex --version、--schema或--verbosity,并且会在--background中打印约 700 KB 的原始目录,错误信息中也不含models --json;0.1.x 还会隐藏 GPT-6 模型。如果版本过旧,应告知用户更新,而不是绕过限制:在 askcodex 的 checkout 中执行error.backend;如果没有 checkout,则从 https://github.com/JairoTorregrosa/askcodex/releases 下载最新的 release binary(校验git pull && ./install.sh),或 clone 仓库后运行SHA256SUMS(需要 Rust 1.88+)。./install.sh - 每次调用都是一次性且无状态的。只发送 prompt 和可选的
ask:模型无法使用工具、文件、浏览功能、仓库或之前的对话。prompt 中的文件路径只是文本;应改为粘贴文件内容。--instructions - prompt 中的所有内容、参考图像或音频文件都会离开本机并发送到 OpenAI 后端。在粘贴日志、导出数据、代码或文档前,务必移除凭据、token、密钥和密码,即使用户为任务提供了这些内容,也应替换为占位符。同时移除任务不需要的个人或客户数据;如果任务确实需要这些数据,或者无法判断,应先询问用户。
- 每次调用都会消耗用户的订阅配额。GPT-6 Astra 是价格最高的模型。
- 第二个模型的答案是后续工作的输入。报告成功之前,务必核实其事实、审查其代码,并查看其图像。
- 使用
askcodex保存于codex login的凭据;它不读取 API key。绝不打印凭据。~/.codex/auth.json
Facts already verified (2026-10-02)
已核实事实(2026-10-02)
- lists what the account can use, with each model's description, Codex's default effort and any retirement date. On 2026-10-02:
askcodex models --no-refresh,gpt-6.1-sol,gpt-6-astra,gpt-6-sol,gpt-6-luna,gpt-5.6-sol,gpt-5.6-terra,gpt-5.6-luna,gpt-daybreak-blue-latest(retires 2026-10-14), and the hiddengpt-5.5andgpt-reserve. All take text;codex-auto-reviewsends text only. OpenAI ships models every few days: trust the live catalog over this list.ask - defaults to
askatgpt-6.1-sol. The catalog lists it for every plan; if a plan refuses it with a model-availability error (OpenAI's Codex docs have offered Free and Go only Luna), passmedium. askcodex never switches models on its own.--model gpt-6-luna - takes
--effort,low,medium,high,xhigh, ormax. The catalog also listsnone, which is Codex's multi-agent mode; the backend rejects it. A level a model does not take fails with HTTP 400 (ultraonnoneandgpt-6-astra;gpt-6.1-solandgpt-6-solaccept it although the catalog omits it).gpt-6-luna - sets answer length and detail. Unset, the backend answers at
--verbosity low|medium|high; Codex itself asks formedium. On the same promptlowused 240 output tokens andlow513.high - makes the backend enforce a JSON Schema in strict mode, even against a prompt that asks for prose. Strict rules: every property in
--schema FILE,requiredon every object, and an optional value adds"additionalProperties": falseto its own type ("null",["string","null"]; an["integer","null"]must listenumtoo). A schema that breaks them fails before generation withnulland a message naming the key. Witherror.backend.code: "invalid_json_schema",--jsonis the parsed answer. askcodex re-checks its structure against the schema, so an answer that does not parse or does not match is a.result.jsonfailure, never a result.response_invalid - and
image createreturn one PNG per call of about 1.57 megapixels; the prompt sets the aspect ratio.image editor--background transparentforces the background (both honored); unset, the prompt decides. The result reports the file's realopaque,widthandheight. There is no model, size, quality, format, or count flag, because the backend ignores those fields.alpha_channel - takes a WAV file up to 25 MiB and has no model or language selector.
transcribe
- 会列出账户可用的模型,包括每个模型的描述、Codex 默认 effort 和退役日期。截至 2026-10-02,模型包括:
askcodex models --no-refresh、gpt-6.1-sol、gpt-6-astra、gpt-6-sol、gpt-6-luna、gpt-5.6-sol、gpt-5.6-terra、gpt-5.6-luna、gpt-daybreak-blue-latest(将于 2026-10-14 退役),以及隐藏的gpt-5.5和gpt-reserve。所有模型都接受文本;codex-auto-review也只发送文本。OpenAI 每隔几天就会发布模型;应以实时模型目录为准,而不是此列表。ask - 默认使用
ask,effort 为gpt-6.1-sol。模型目录显示所有套餐均可使用它;如果某个套餐因模型不可用错误而拒绝该模型(OpenAI 的 Codex 文档曾注明 Free 和 Go 套餐仅提供 Luna),则传入medium。--model gpt-6-luna绝不会自行切换模型。askcodex - 接受
--effort、low、medium、high、xhigh或max。模型目录还列出none,这是 Codex 的 multi-agent 模式;后端会拒绝它。模型不支持某个 effort 时会触发 HTTP 400(ultra和gpt-6-astra不支持gpt-6.1-sol;none和gpt-6-sol接受gpt-6-luna,尽管模型目录未列出)。none - 用于设置答案长度和详细程度。未设置时,后端以
--verbosity low|medium|high作答;Codex 自身要求使用medium。对于同一个 prompt,low使用了 240 个输出 token,而low使用了 513 个。high - 会让后端在 strict 模式下强制执行 JSON Schema,即使 prompt 要求输出 prose 也仍然如此。严格规则:每个属性都必须列入
--schema FILE;每个 object 都要设置required;可选值需要在其自身类型中加入"additionalProperties": false("null"、["string","null"];["integer","null"]也必须列出enum)。违反这些规则的 schema 会在生成前失败,并返回null以及一条指明具体 key 的消息。使用error.backend.code: "invalid_json_schema"时,--json是解析后的答案。.result.json会再次对照 schema 检查结构,因此无法解析或不匹配的答案属于askcodex失败,绝不会作为结果返回。response_invalid - 和
image create每次调用返回一个约 1.57 百万像素的 PNG;宽高比由 prompt 决定。image edit或--background transparent可强制设置背景(两者均受支持);未设置时由 prompt 决定。结果会报告文件实际的opaque、width和height。它没有 model、size、quality、format 或 count flag,因为后端会忽略这些字段。alpha_channel - 接受最大 25 MiB 的 WAV 文件,并且没有 model 或 language 选择器。
transcribe
Do this
执行步骤
-
Pick the command and read its guide before you write the prompt:
Result Command Read first Answer, analysis, writing, code, or review (addaskcodex ask "prompt" --model <slug> --effort <level>for a concise answer)--verbosity lowprompting-text.md and the model's guide below Classification or extraction you will parse , then readaskcodex ask - --schema /tmp/askcodex/<name>.schema.json --json < brief.txt.result.jsonSame as above New image (addaskcodex image create "prompt" -o /tmp/askcodex/<name>-v1.pngfor a cutout)--background transparentprompting-images.md and model-gpt-image-2.md Image edit from one to five PNG references askcodex image edit "prompt" -i ref.png -o /tmp/askcodex/<name>-v2.pngSame as a new image Audio transcript askcodex transcribe recording.wavtranscription.md Which models exist, their default effort, what retires (a short list with descriptions)askcodex models --no-refreshNothing; no prompt is involved Quota, account, auth status /askcodex usage/whoami, each withauth status--json --no-refreshNothing -
For, pick the model and read its guide:
askThe task Model Guide Most work: coding, review, debugging, analysis, drafting (default)gpt-6.1-solmodel-gpt-6.1-sol.md The hardest or most consequential single deliverable gpt-6-astramodel-gpt-6-astra.md Clear, repeatable extraction, classification, or transformation gpt-6-lunamodel-gpt-6-luna.md Authorized defensive security work gpt-daybreak-blue-latestmodel-gpt-daybreak-blue-latest.md Reproducing a GPT-6 Sol result gpt-6-solmodel-gpt-6-sol.md Reproducing a GPT-5.6 result ,gpt-5.6-sol,gpt-5.6-terragpt-5.6-lunasol, terra, luna Anything on gpt-5.5move to (gpt-6.1-solif the plan refuses it)gpt-6-lunamodel-gpt-5.5.md prompting.md indexes every guide. Pinand--modelwhenever you compare outputs or need to reproduce one.--effort -
Write a complete brief: the deliverable, its audience, the constraints, what "done" means, the source material itself, what must stay unchanged, and the output format.
-
Run one focused request. Createfirst and give every artifact a descriptive name with a version suffix, so an edit never overwrites a useful result. For a long-running job, run it in the background or in tmux and save its output to a file.
/tmp/askcodex/ -
Inspect the result against the brief. Make the next request about one specific observed problem, and keep the last useful version.
-
选择命令,并在编写 prompt 前阅读相应指南:
结果 命令 先阅读 答案、分析、写作、代码或评审 (需要简洁答案时添加askcodex ask "prompt" --model <slug> --effort <level>)--verbosity lowprompting-text.md 和下方的模型指南 需要解析的分类或提取 ,然后读取askcodex ask - --schema /tmp/askcodex/<name>.schema.json --json < brief.txt.result.json同上 新图像 (抠图时添加askcodex image create "prompt" -o /tmp/askcodex/<name>-v1.png)--background transparentprompting-images.md 和 model-gpt-image-2.md 使用一至五张 PNG 参考图编辑图像 askcodex image edit "prompt" -i ref.png -o /tmp/askcodex/<name>-v2.png与新图像相同 音频转录 askcodex transcribe recording.wavtranscription.md 哪些模型可用、默认 effort 以及何时退役 (返回带描述的简短列表)askcodex models --no-refresh无需阅读;不涉及 prompt 配额、账户、认证状态 /askcodex usage/whoami,每个命令都添加auth status--json --no-refresh无需阅读 -
对于,选择模型并阅读其指南:
ask任务 模型 指南 大多数工作:编码、评审、调试、分析、起草 (默认)gpt-6.1-solmodel-gpt-6.1-sol.md 最困难或后果最严重的单项交付物 gpt-6-astramodel-gpt-6-astra.md 清晰、可重复的提取、分类或转换 gpt-6-lunamodel-gpt-6-luna.md 经授权的防御性安全工作 gpt-daybreak-blue-latestmodel-gpt-daybreak-blue-latest.md 复现 GPT-6 Sol 的结果 gpt-6-solmodel-gpt-6-sol.md 复现 GPT-5.6 的结果 、gpt-5.6-sol、gpt-5.6-terragpt-5.6-lunasol、terra、luna 所有基于 的任务gpt-5.5改用 (如果套餐拒绝,则使用gpt-6.1-sol)gpt-6-lunamodel-gpt-5.5.md prompting.md 索引了所有指南。只要需要比较输出或复现结果,就应明确固定和--model。--effort -
编写完整的任务说明,包括交付物、受众、约束条件、“完成”的标准、源材料本身、必须保持不变的内容以及输出格式。
-
执行一次聚焦的请求。先创建,并为每个产物提供描述性名称和版本后缀,确保编辑时不会覆盖有用结果。对于长时间运行的任务,在后台或 tmux 中运行,并将输出保存到文件。
/tmp/askcodex/ -
根据任务说明检查结果。下一次请求应只针对观察到的一个具体问题,并保留最后一个有用版本。
Handle the output
处理输出
- Images: always pass . With
-o /tmp/askcodex/<name>-vN.png,--json,.result.widthand.result.heightcome from the saved file;.result.alpha_channelonly says transparency is possible, so look at the image before you call it a cutout.alpha_channel: true - Long text answers: , then
--json > /tmp/askcodex/<name>.json. Keep large JSON and image payloads out of the conversation.jq -r .result.text /tmp/askcodex/<name>.json - ,
--json, and--eventsare global flags and work after the subcommand.--no-refresh - Semantic success output is
--json. Read{schema_version:1,command,result}. Do not pass.result(it adds the raw backend response, ~700 KB for--backend) unless the user is debugging the protocol.models - gives one final envelope with
ask --json,.result.model,.result.effort,.result.verbosity,.result.text(possibly null), and.result.usagewith.result.json. The catalog is at--schema(slug, description, default_reasoning_level, upgrade); quota windows are at.result.models..result.rate_limit - prints newline-delimited JSON:
--eventssendsaskevents and one finaltext_deltaevent on success; other commands send their result. Check the exit status: partial text is not success. Do not combineresultwith--events.--json - prints the text, or
transcribewith.result.text.--json - Stdin prompts () and
-accept up to 16 MiB of UTF-8. File inputs must be regular files (symlinks to them work; devices and FIFOs do not).raw --body -accepts up to five PNG references totaling 25 MiB; renaming a JPEG toimage editdoes not convert it, and the CLI checks the file signature. These caps are client memory limits, not server limits..png - is for a backend operation the user explicitly needs. It accepts only the backend origin, leaves JSON and stream bytes unwrapped, and does not support
raw <METHOD> <PATH> --body '<JSON>'.--events - prints the CLI reference locally, without credentials or network.
reference
- 图像:始终传入 。使用
-o /tmp/askcodex/<name>-vN.png时,--json、.result.width和.result.height来自已保存的文件;.result.alpha_channel仅表示可能存在透明度,因此在称其为抠图前应查看图像。alpha_channel: true - 长文本答案:运行 ,然后执行
--json > /tmp/askcodex/<name>.json。不要在对话中放入大型 JSON 和图像数据。jq -r .result.text /tmp/askcodex/<name>.json - 、
--json和--events是全局 flag,放在子命令后也可以使用。--no-refresh - 的语义化成功输出为
--json。读取{schema_version:1,command,result}。不要传入.result,因为它会附加原始后端响应(对--backend而言约为 700 KB),除非用户正在调试协议。models - 最终返回一个 envelope,其中包含
ask --json、.result.model、.result.effort、.result.verbosity、.result.text(可能为 null),使用.result.usage时还包含--schema。模型目录位于.result.json(包含 slug、description、default_reasoning_level、upgrade);配额窗口位于.result.models。.result.rate_limit - 打印换行分隔的 JSON:
--events成功时发送ask事件和一个最终的text_delta事件;其他命令发送各自的结果。检查退出状态:部分文本不表示成功。不要将result与--events组合使用。--json - 打印文本;使用
transcribe时则打印--json。.result.text - Stdin prompt()和
-最多接受 16 MiB 的 UTF-8。文件输入必须是普通文件(指向普通文件的 symlink 可以,设备文件和 FIFO 不行)。raw --body -最多接受五张 PNG 参考图,总大小为 25 MiB;将 JPEG 重命名为image edit并不会转换格式,而且 CLI 会检查文件签名。这些上限是客户端内存限制,而非服务器限制。.png - 用于用户明确需要的后端操作。它只接受后端 origin,不对 JSON 和流字节进行包装,并且不支持
raw <METHOD> <PATH> --body '<JSON>'。--events - 会在本地打印 CLI 参考文档,不使用凭据,也不访问网络。
reference
Rules
规则
-
On a nonzero exit, report the error and fix its cause before another attempt. Do not loop, fabricate a result, or silently switch models.
-
Withor
--json, a failure prints--eventson stderr and no success result. Never turn a partial stream into a completed answer.{schema_version:1,error:{code,message, http_status?,backend?}}carries the backend's own reason, filtered: onlyerror.backend,code,type,param,messageanddetail(orerror), each cut to 400 bytes. When it is absent or reads as cut off, tell the user the full cause could not be read instead of guessing. Act on it:incomplete_details.reasonThe diagnostic says Cause Next step ,backend.code: "unsupported_value"backend.param: "reasoning.effort"The model does not take that effort Pick a level from the model's guide and retry once backend.code: "invalid_json_schema"The file breaks a strict rule--schemaFix the key the message names; no answer was generated backend.detail: "... not supported when using Codex with a ChatGPT account."Unknown slug, or a model this plan cannot use Check ; ask the user before using another modelaskcodex modelsor another policy codebackend.code: "cyber_policy"A safety classifier blocked the request Report it; do not reword the request to get around it backend.incomplete_detailsThe answer was cut short Report it; narrow the task or ask for less output, then retry once (HTTP 429)code: "rate_limited"Quota or rate limit Check and tell the useraskcodex usage --json --no-refresh -
Usefor read-only account and auth checks.
--no-refreshrotates the credentials and rewrites the auth file; run it only when the user asks for a refresh.askcodex auth refresh -
Write into a project directory only when the user asks for that destination.
-
退出码非零时,报告错误并先修复原因,然后再进行下一次尝试。不要循环调用、捏造结果或悄悄切换模型。
-
使用或
--json时,失败会在 stderr 上打印--events,且不会产生成功结果。绝不能把部分流当作已完成的答案。{schema_version:1,error:{code,message,http_status?,backend?}}包含经过筛选的后端原因,仅保留error.backend、code、type、param、message和detail(或error),每项最多截断为 400 字节。如果该字段缺失或看起来被截断,应告知用户无法读取完整原因,而不是猜测。采取以下措施:incomplete_details.reason诊断信息 原因 下一步 、backend.code: "unsupported_value"backend.param: "reasoning.effort"模型不接受该 effort 从模型指南中选择一个 level,然后重试一次 backend.code: "invalid_json_schema"文件违反严格规则--schema修复消息指出的 key;没有生成任何答案 backend.detail: "... not supported when using Codex with a ChatGPT account."slug 未知,或当前套餐无法使用该模型 运行 检查;改用其他模型前先询问用户askcodex models或其他 policy codebackend.code: "cyber_policy"安全分类器拦截了请求 报告该情况;不要通过改写请求来绕过限制 backend.incomplete_details答案被截断 报告该情况;缩小任务或要求更少输出,然后重试一次 (HTTP 429)code: "rate_limited"配额或速率限制 运行 并告知用户askcodex usage --json --no-refresh -
对只读的账户和认证检查使用。
--no-refresh会轮换凭据并重写认证文件;仅当用户要求刷新时才运行。askcodex auth refresh -
只有当用户指定目标位置时,才将文件写入项目目录。
Report
汇报
Tell the user the command you ran, the outcome, the artifact path if one was saved, and any
limitation that affects the result. For , add the model and effort. For an image, give the
file's real dimensions and never name a serving model: the backend does not report one. Show an
image when the user needs to judge it visually.
ask告知用户所运行的命令、执行结果、保存产物时的路径,以及影响结果的任何限制。对于 ,还要说明模型和 effort。对于图像,给出文件的实际尺寸,绝不能指明提供服务的模型,因为后端不会报告该信息。如果用户需要目视判断,则展示图像。
askInstall
安装
The binary is . From a checkout, installs it without
touching credentials; , , or also installs this
skill, and checks credentials without refreshing. See
the repository and the
generated command reference.
~/.local/bin/askcodex./install.sh--skills agents--skills claude--skills all--check-auth