| name | codex-integrations |
| description | Codex 整合類 Use Case 技能。涵蓋 ChatGPT 應用開發、Slack 整合 等工作流。觸發條件:當需要使用 Codex 與第三方平台整合、 建構 ChatGPT 應用、從 Slack 觸發任務時啟用。
|
Integrations — Codex Use Cases Skill
概述
整合類專注於將 Codex 與第三方平台連接,包含 ChatGPT 應用開發和 Slack 工作流整合。
本分類包含:
- chatgpt-apps — 建構 ChatGPT 應用(action/canvas/connector)
- slack-coding-tasks — 從 Slack 啟動程式碼任務
Use Case 1: Bring your app to ChatGPT
工作流程
| 步驟 | 動作 | 說明 |
|---|
| 1 | 讀取文件 | $openai-docs 取得最新規格 |
| 2 | 選擇類型 | action / canvas / connector |
| 3 | 搭建原型 | React + Next.js |
| 4 | 實作 Auth | OAuth 2.0 PKCE |
| 5 | 部署 | Vercel + env vars |
| 6 | 驗證 | manifest 合規檢查 |
推薦 Prompt
Role: You are a ChatGPT app developer specializing in OpenAI integrations.
Context: Building a ChatGPT app for {{use_case_description}}.
Task:
1. Fetch the latest ChatGPT apps documentation using $openai-docs skill.
2. Determine the optimal app type:
- Action: for API-backed operations
- Canvas: for interactive visual experiences
- Connector: for data source integration
3. Scaffold the project:
- Framework: React + Next.js (App Router)
- Include: manifest.json, required API routes, OAuth PKCE setup
- Add: health check endpoint at /api/health
4. Implement core functionality with proper error handling.
5. Configure Vercel deployment with environment variables.
6. Run ChatGPT app validation checks.
Constraints:
- Follow ChatGPT apps auth spec (OAuth 2.0 PKCE for browser).
- All API routes must validate request origin.
- Include rate limiting on public endpoints.
- Never hardcode API keys — use environment variables.
Output Format:
- Working Next.js project with all required files
- `DEPLOYMENT.md` with setup instructions
- Validation report confirming manifest compliance
Self-Verification:
Run `next build` to confirm zero errors.
Verify manifest.json against ChatGPT app schema.
Test OAuth flow end-to-end in development mode.
ChatGPT App 類型選擇指南
| 類型 | 適用場景 | 技術要求 |
|---|
| Action | API 操作(查詢、CRUD) | REST API + auth |
| Canvas | 互動視覺體驗 | React + real-time |
| Connector | 資料源整合 | OAuth + data sync |
Tips & 注意事項
- $chatgpt-apps skill: Codex 內建技能,包含 app 開發最佳實踐
- Manifest 合規: ChatGPT 對 manifest.json 格式有嚴格要求
- OAuth PKCE: 瀏覽器端必須使用 PKCE,不可用 client secret
- 環境變數: Vercel 的 env vars 設定要在部署前完成
Use Case 2: Kick off coding tasks from Slack
工作流程
| 步驟 | 動作 | 說明 |
|---|
| 1 | Slack 中 @Codex | 觸發任務 |
| 2 | 分析 thread | 理解問題上下文 |
| 3 | 實作修復 | 自動在 Codex 環境中修改 |
| 4 | 開 PR | 自動建立分支並開 PR |
推薦 Prompt
@Codex analyze the issue in this thread. Specifically:
1. Identify the root cause from the error message or description.
2. Search the codebase in {{environment_name}} for related code.
3. Implement a fix with:
- Minimal diff — change only what's necessary.
- Add or update tests covering the fix.
- Run existing tests to confirm no regressions.
4. Open a PR with: summary, root cause, fix description, test plan.
Tips & 注意事項
- Thread 上下文: 在有問題描述的 thread 中 @Codex 效果最好
- 環境對應: 確保 Codex 環境連結到正確的 repos
- PR 品質: Codex 會自動建立分支和 PR,但建議人工審查
- 速度: 簡單 bug fix 通常 5 分鐘內完成
最佳實踐
- 在 Slack thread 中提供足夠上下文(錯誤訊息、重現步驟)
- 對於複雜任務,先用 Codex App 調試再用 Slack 觸發修復
- 設定 Slack channel 通知在 PR 開啟時提醒團隊
常見問題
Q: Slack 整合需要什麼設定?
需要在 Codex 設定中連接 Slack workspace 和對應的 GitHub repos。
Q: 可以從 Slack 觸發哪些任務?
幾乎所有可以在 Codex 中執行的任務都可以從 Slack 觸發,
包括 bug fix、feature implementation、code review 等。
技術棧速查
| 技術 | 用途 | 相關 Use Case |
|---|
| React + Next.js | ChatGPT App 框架 | chatgpt-apps |
| OAuth 2.0 PKCE | 認證 | chatgpt-apps |
| Vercel | 部署 | chatgpt-apps |
| Slack | 任務觸發 | slack-coding-tasks |
| GitHub | PR 自動建立 | slack-coding-tasks |