codex-chatgpt-control
Skill0 starsChanged 3 months agoMITView on GitHub
Use when Codex agents need to operate visible ChatGPT web sessions through the codex-chatgpt-control SDK, including prompts, threads, files, downloads, reports, browser bridge blockers, and local source smokes.
- Installs packages
In this repository160 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ab-testingSkill
- ad-creativeSkill
- adsSkill
- agent-reachSkill
- agents-sdkSkill
- ai-seoSkill
- analyticsSkill
- animation-vocabularySkill
- apk-reverseSkill
- apple-designSkill
- ask-sonnerSkill
- asoSkill
- ast-grepSkill
- audit-orchestratorSkill
- background-browser-operatorSkill
- better-colorsSkill
- better-typographySkill
- better-uiSkill
- binary-diffSkill
- brandkitSkill
- checkpoint-quality-loopSkill
- chronicleSkill
- churn-preventionSkill
- cline-orchestratorSkill
- cloudflare-email-serviceSkill
- cloudflareSkill
- codebase-designSkill
- codex-conductorSkill
- coding-agent-sessionsSkill
- cold-emailSkill
- co-marketingSkill
- community-marketingSkill
- compact-landingSkill
- competitor-profilingSkill
- competitorsSkill
- composio-cliSkill
- computer-useSkill
- content-strategySkill
- context7-mcpSkill
- copy-editingSkill
- copywritingSkill
- create-hookSkill
- croSkill
- customer-researchSkill
- design-taste-frontendSkill
- design-taste-frontend-v1Skill
- diagram-generatorSkill
- diffui-designerSkill
- directory-submissionsSkill
- domain-modelingSkill
- durable-objectsSkill
- edr-bypass-reSkill
- emailsSkill
- emil-design-engSkill
- engineering-acceptance-reviewSkill
- extract-design-systemSkill
- find-animation-opportunitiesSkill
- find-skillsSkill
- firmware-pentestSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 12 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill when a user explicitly asks to run a visible ChatGPT web workflow with the codex-chatgpt-control SDK.
- Distinctive: line 14
Do not auto-invoke visible ChatGPT-control workflows.
- Distinctive: line 15
Only run browser-control only when the user request contains an explicit trigger such as:
- Very specific: line 20
If no explicit trigger is present, do not call ask, askInThread, askWithFiles, askAndDownload, run, or any other browser-control command.
- Distinctive: line 22
Every response from this skill must include one explicit mode marker:
- Very specific: line 28
Prefer the SDK facade from createChatGPT({ agent }).
- Distinctive: line 29
Use ChatGPT web through a compatible Codex/browser bridge.
- Very specific: line 30
Treat globalThis.agent as host-provided.
- Distinctive: line 31
Stop on login, captcha, rate-limit, selector-drift, upload/download permission, or ambiguous confirmation blockers.
- Distinctive: line 32
Ask for explicit user confirmation before public, destructive, third-party, paid, account-level, or externally visible actions.
- Very specific: line 38
When mode: manual_handoff, include every field exactly in this order:
- Very specific: line 62
When you actually run controls (after an explicit trigger), include mode: controlled_run and the normal run result.
- Distinctive: line 87
If either gate is missing, stop with a permission blocker and tell the user which gate to check.
- Distinctive: line 110
Prefer normal package imports in projects that depend on the published npm package:
- Distinctive: line 145
Ask in a new or selected thread:
- Very specific: line 167
When the user says the ChatGPT thread is already open, pass existingTab: true or an exact existing-tab policy such as existingTab: { url: …
- Distinctive: line 182
Run a diagnostic before long workflows:
- Distinctive: line 192
Use Markdown by default for human-readable answers and saved artifacts:
- Very specific: line 201
Use format: "normalized_text" only for compact assertions, polling checks, or simple exact-string smoke tests.
- Distinctive: line 232
When a run fails, report the structured blocker.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
codex-chatgpt-control
Use this skill when a user explicitly asks to run a visible ChatGPT web workflow with the codex-chatgpt-control SDK.
This skill is for visible, user-directed ChatGPT workflows only. It is not an OpenAI API wrapper, does not call hidden ChatGPT endpoints, and must not bypass login, captcha, product permissions, file permissions, or user confirmation.
Manual-first policy (required)
- Do not auto-invoke visible ChatGPT-control workflows.
- Only run browser-control only when the user request contains an explicit trigger such as:
- "use ChatGPT now"
- "invoke codex-chatgpt-control"
- "run this in ChatGPT"
- or another direct equivalent instruction to perform the run in this environment.
- If no explicit trigger is present, do not call
ask,askInThread,askWithFiles,askAndDownload,run, or any other browser-control command. - For those cases, return a
Manual ChatGPT handoffand pause for pasteback. - Every response from this skill must include one explicit mode marker:
mode: manual_handoffwhen returning a handoffmode: controlled_runwhen you actually run the visible workflow
Required Posture
- Prefer the SDK facade from
createChatGPT({ agent }). - Use ChatGPT web through a compatible Codex/browser bridge. Do not use private ChatGPT network calls.
- Treat
globalThis.agentas host-provided. If it is missing, report a bridge blocker rather than inventing browser state. - Stop on login, captcha, rate-limit, selector-drift, upload/download permission, or ambiguous confirmation blockers.
- Ask for explicit user confirmation before public, destructive, third-party, paid, account-level, or externally visible actions.
- Redact run reports by default. Raw prompt/response content is opt-in only.
- Attach only files the user approved.
Manual ChatGPT Handoff format
When mode: manual_handoff, include every field exactly in this order:
GoalContextConstraintsDesired output formatAssumptionsAcceptance criteriaCopy-ready final prompt
Suggested output shape:
mode: manual_handoff
Goal: ...
Context: ...
Constraints: ...
Desired output format: ...
Assumptions: ...
Acceptance criteria: ...
Copy-ready final prompt: |
...When you actually run controls (after an explicit trigger), include mode: controlled_run and the normal run result.
Runtime Requirements
Deterministic local checks need:
- Node.js 20 or newer
- npm
- a source checkout of
codex-chatgpt-control
Real browser-control runs also need:
- Chrome with a signed-in visible ChatGPT web session
- a compatible Codex/browser bridge exposing
globalThis.agent - permission to use or open a visible ChatGPT tab
Ordinary shells should not have globalThis.agent. A browser_bridge_unavailable blocker from an ordinary shell is an expected safe result for browser-required calls.
File Upload Permissions
File attachment workflows need two separate permission gates:
- Chrome extension gate: open
chrome://extensions, choose the Codex/browser bridge extension, open Details, and enable Allow access to file URLs. - Codex app gate: in Codex settings, allow Google Chrome uploads under Computer Use > Google Chrome > Permissions > Uploads. Use the narrowest setting that fits the workflow; unattended smoke tests may need the always-allow setting.
If either gate is missing, stop with a permission blocker and tell the user which gate to check.
Source Setup
From a source checkout:
cd packages/node
npm ci
npm test
npm run build
npm run bundle
npm run bundle:backendThen use the built bundle from a bridge-enabled host runtime:
import { createChatGPT } from "/absolute/path/to/codex-chatgpt-control/packages/node/dist/codex-chatgpt-control.bundle.mjs";
const chatgpt = createChatGPT({ agent: globalThis.agent });Prefer normal package imports in projects that depend on the published npm package:
import { createChatGPT } from "codex-chatgpt-control";Basic Runner Flow
const reviewer = chatgpt.agent({
name: "reviewer",
instructions: "Review carefully and return Markdown."
});
const result = await chatgpt.runner.run(reviewer, {
input: "Review this design.",
thread: { type: "new" },
response: { format: "markdown" }
});
if (!result.ok) {
console.log(JSON.stringify(result.interruptions ?? result, null, 2));
} else {
console.log(result.output_text);
}Instructions are visible prompt text by default. Use instructionsMode intentionally:
visible_prefix: include instructions in the submitted user message.visible_setup_message: submit instructions as a separate visible setup turn.metadata_only: keep instructions local; they are not sent to ChatGPT.
Common Workflows
Ask in a new or selected thread:
await chatgpt.ask({
prompt: "Reply with the word hi.",
wait: true,
read: { format: "markdown" }
});Continue an existing thread:
await chatgpt.askInThread({
thread: { type: "url", url: "https://chatgpt.com/c/<conversation-id>" },
existingTab: true,
prompt: "Continue from the latest answer.",
wait: true,
read: { format: "markdown" }
});When the user says the ChatGPT thread is already open, pass existingTab: true or an exact existing-tab policy such as existingTab: { url: "https://chatgpt.com/c/<conversation-id>" }. A thread: { type: "url" } selector by itself means "navigate to this URL"; it does not express "claim the user-open tab".
Attach approved files:
await chatgpt.askWithFiles({
thread: { type: "new" },
files: ["/absolute/path/to/approved-file.pdf"],
prompt: "Summarize this file.",
wait: true,
read: { format: "markdown" },
report: { enabled: true, includeContent: false }
});Run a diagnostic before long workflows:
const diagnostic = await chatgpt.doctor({
check: ["bridge", "login", "upload", "download", "clipboard"]
});Response Capture
Use Markdown by default for human-readable answers and saved artifacts:
const latest = await chatgpt.messages.waitAndRead({
role: "assistant",
format: "markdown"
});Use format: "normalized_text" only for compact assertions, polling checks, or simple exact-string smoke tests.
Python Client
The Python package is a protocol client over the Node backend. Build the backend first:
cd packages/node
npm run bundle:backendThen run Python from packages/python:
python -m pip install -e .[dev]
python scripts/live_smoke.py --mode ordinary-shellPoint Python at an explicit backend command:
from codex_chatgpt_control import Agent, BackendClient, Runner, StdioBackendTransport
backend = BackendClient(StdioBackendTransport(
command=["node", "../node/dist/codex-chatgpt-control-backend.mjs"]
))
runner = Runner(backend)Blocker Handling
When a run fails, report the structured blocker. Do not retry blindly.
Common blockers:
browser_bridge_unavailable: no bridge-enabled host runtime is available.login_required: the visible ChatGPT session is not signed in.captcha: user action is required.permission: upload/download/clipboard permission is missing.selector_drift: ChatGPT UI changed and selectors need review.rate_limit: wait or ask the user how to proceed.
Validation
For source changes, run:
cd packages/node
npm test
npm run build
npm run bundle
npm run bundle:backend
npm run contract:validate
npm run parity:fixturesFor Python parity changes, also run:
cd packages/python
python -m unittest discover -s tests
python -m compileall -q src examples
python scripts/live_smoke.py --mode ordinary-shellDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

