From aradotso-trending-skills-37
Automates OpenAI OAuth registration flows in Chrome extension: captcha retrieval, CPA callback verification, email OTP polling via DuckDuckGo/QQ/163/Inbucket, multi-round batch execution.
npx claudepluginhub joshuarweaver/cascade-ai-ml-agents-misc-1 --plugin aradotso-trending-skills-37This skill uses the workspace's default tool permissions.
> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
Skill by ara.so — Daily 2026 Skills collection.
A Chrome extension that automates the full OpenAI OAuth registration/login flow including email verification, CPA callback handling, and multi-round batch execution. Supports DuckDuckGo, QQ Mail, 163 Mail, and Inbucket as verification code sources.
git clone https://github.com/QLHazyCoder/codex-oauth-automation-extension.git
cd codex-oauth-automation-extension
Load in Chrome:
chrome://extensions/Open the side panel from the Chrome toolbar to configure and run.
background.js # Main orchestrator: steps 1–9, tab management, state
manifest.json # Extension manifest
data/names.js # Random name/birthday data
content/utils.js # Shared helpers: waitForElement, click, stop control
content/vps-panel.js # CPA panel: Step 1 / Step 9
content/signup-page.js # OpenAI signup/login: Steps 2/3/5/6/8
content/duck-mail.js # DuckDuckGo @duck.com address generation
content/qq-mail.js # QQ Mail OTP polling
content/mail-163.js # 163 Mail OTP polling
content/inbucket-mail.js # Inbucket mailbox OTP polling
sidepanel/ # Sidebar UI (HTML/CSS/JS)
| Field | Description | Example |
|---|---|---|
CPA | Your OAuth management panel URL | https://your-host/management.html#/oauth |
Mail | Verification code source | 163 Mail, QQ Mail, or Inbucket |
Email | Registration email (or click Auto for @duck.com) | user@duck.com |
Password | Custom password; leave blank to auto-generate | MyPass123! |
Inbucket | Inbucket host (only when Mail=Inbucket) | your-inbucket-host |
Mailbox | Inbucket mailbox name (only when Mail=Inbucket) | tmp-mailbox |
chrome.storage.session — runtime state (steps, OAuth link, email, password, callback URL, tab info). Cleared when browser closes.chrome.storage.local — persistent config (CPA URL, password, mail service, Inbucket settings). Survives browser restarts.Opens CPA panel → finds Codex OAuth card → clicks login → extracts authorization URL → saves to OAuth field.
Opens the OAuth authorization link → locates and clicks Sign up / Register / 创建账户 button.
Fills registration form with email and password. Auto-generates strong password if field is blank. Actual password used is written back to the sidebar.
Polls the configured mailbox for a 6-digit OTP. Handles Operation timed out errors by auto-clicking retry.
Email matching rules:
openai, noreply, verify, auth, duckduckgo, forwardverify, verification, code, 验证, confirmGenerates random name and birthday. Handles two page variants:
input[name='age'] directlyRe-fetches latest CPA OAuth link, then logs in with the newly registered account.
Same as Step 4 but with login-specific keyword matching.
debugger API to dispatch input events for the clickchrome.webNavigation.onBeforeNavigate for localhost callbackhttp(s)://localhost:<port>/auth/callback?code=...&state=...code and state params认证成功! status badgehttp://localhost:1455/auth* tabsClick Auto in the sidebar to run all 9 steps sequentially for N rounds (set by the number input).
Auto flow:
Step 1 → Step 2 → [Duck email auto-fetch, retry up to 5x]
↓ (if Duck fails) → Pause, wait for manual email input → Continue
Step 3 → Step 4 → Step 5 → Step 6 → Step 7 → Step 8 → Step 9
→ Repeat for N rounds
When Auto is paused and you reopen the sidebar, two options appear:
// Wait for a DOM element with stop-signal support
async function waitForElement(selector, timeout = 30000) {
const start = Date.now();
while (Date.now() - start < timeout) {
// Check stop signal from background
const { stopFlow } = await chrome.storage.session.get('stopFlow');
if (stopFlow) throw new Error('STOPPED');
const el = document.querySelector(selector);
if (el) return el;
await new Promise(r => setTimeout(r, 500));
}
throw new Error(`Timeout waiting for: ${selector}`);
}
// Save OAuth link to session
await chrome.storage.session.set({ oauthLink: extractedUrl });
// Read current email and password
const { currentEmail, currentPassword } = await chrome.storage.session.get([
'currentEmail',
'currentPassword'
]);
// Update step status
await chrome.storage.session.set({
stepStatus: { ...existingStatus, step3: 'done' }
});
// background.js → content script
const [tab] = await chrome.tabs.query({ url: '*://chat.openai.com/*' });
const result = await chrome.tabs.sendMessage(tab.id, {
action: 'FILL_EMAIL',
email: 'user@duck.com',
password: 'GeneratedPass1!'
});
// Only targets unread messages
const unseenEntries = document.querySelectorAll('.message-list-entry.unseen');
// From 2nd poll onwards, click the refresh button
if (pollCount > 1) {
const refreshBtn = document.querySelector('[data-action="refresh"]');
if (refreshBtn) refreshBtn.click();
await sleep(1000);
}
// After reading, delete the email to avoid re-matching
// Attach debugger to tab for synthetic input events
await chrome.debugger.attach({ tabId }, '1.3');
const { x, y } = buttonBounds;
await chrome.debugger.sendCommand({ tabId }, 'Input.dispatchMouseEvent', {
type: 'mousePressed', x, y, button: 'left', clickCount: 1
});
await chrome.debugger.sendCommand({ tabId }, 'Input.dispatchMouseEvent', {
type: 'mouseReleased', x, y, button: 'left', clickCount: 1
});
await chrome.debugger.detach({ tabId });
chrome.webNavigation.onBeforeNavigate.addListener(async (details) => {
// Only main frame, only the auth tab
if (details.frameId !== 0) return;
if (details.tabId !== authTabId) return;
const url = details.url;
// Strict: must be localhost /auth/callback with code + state
if (/^https?:\/\/localhost:\d+\/auth\/callback\?/.test(url)) {
const parsed = new URL(url);
if (parsed.searchParams.get('code') && parsed.searchParams.get('state')) {
await chrome.storage.session.set({ callbackUrl: url });
}
}
});
// From sidebar: send stop
await chrome.runtime.sendMessage({ action: 'STOP_FLOW' });
// In background.js: set flag and broadcast to all content scripts
await chrome.storage.session.set({ stopFlow: true });
const tabs = await chrome.tabs.query({});
for (const tab of tabs) {
chrome.tabs.sendMessage(tab.id, { action: 'STOP_FLOW' }).catch(() => {});
}
// Triggered by sidebar "Auto" button next to Email field
// content/duck-mail.js opens:
// https://duckduckgo.com/email/settings/autofill
// Looks for existing private address or generates new one
const generateBtn = document.querySelector('[data-testid="generate-address"]');
if (generateBtn) generateBtn.click();
await waitForElement('.address-display');
const newAddress = document.querySelector('.address-display').textContent.trim();
// Save config
await chrome.storage.local.set({
cpaUrl: 'https://your-host/management.html#/oauth',
mailService: 'Inbucket', // '163 Mail' | 'QQ Mail' | 'Inbucket'
inbucketHost: 'your-inbucket-host',
inbucketMailbox: 'tmp-mailbox',
customPassword: '', // empty = auto-generate
});
// Load config
const config = await chrome.storage.local.get([
'cpaUrl', 'mailService', 'inbucketHost', 'inbucketMailbox', 'customPassword'
]);
content/signup-page.jshttps://<host>/m/<mailbox>/ is accessiblemanagement.html#/oauth path structurecontent/vps-panel.js selectors are hardcoded to a specific panel layouthttp://localhost:1455/auth*background.js1. Configure sidebar (CPA URL, Mail service, credentials)
2. Run Step 1 manually → verify OAuth link appears
3. Run Steps 2-4 manually → confirm email + OTP flow works
4. If successful, enable Auto with N=5 for a test batch
5. Scale up rounds once flow is stable
Note: Always test single-step flow before enabling Auto. The most fragile steps are Step 8 (OAuth consent click) and Step 4/7 (OTP timing). Use Inbucket for most reliable OTP delivery in automated runs.