ethanplusai/codex-on-crack / plugins/codex-on-crack/skills/crack
crack
UnverifiedLead substantial Codex builds with one configured implementation worker and lead acceptance. Use when the user requests codex-on-crack, names a model to delegate work to, asks to run subagents through Claude, or requests a lead/worker split. Keep host-only work direct; honor explicit external model choices. Workers must not invoke this orchestrator.
scripts/lib/routing.mjs
View on GitHub// Codex's bounded role overrides inherit the parent provider. A catalog is not a route.
import { CrackError } from './io.mjs';
import { routerProvider } from './catalog.mjs';
function fail(message) {
throw new CrackError('provider_incompatible', message,
'Use an already compatible parent profile. This package never rewrites providers, endpoints, or authentication.');
}
function loopback(value) {
try {
const u = new URL(value);
return ['http:', 'https:'].includes(u.protocol) && ['127.0.0.1', 'localhost', '[::1]'].includes(u.hostname)
&& !u.username && !u.password && !u.search && !u.hash
&& /^\/(?:v1|_codex-router\/[A-Za-z0-9_-]+\/v1)\/?$/.test(u.pathname);
} catch { return false; }
}
export function checkRouting({ config, roles, models, codexHome, env = process.env }) {
if (['OPENAI_BASE_URL', 'CODEX_OPENAI_BASE_URL', 'CODEX_CHATGPT_BASE_URL'].some((k) => env[k])) {
fail('An endpoint environment override prevents static provider verification.');
}
const parent = config.model_provider ?? 'openai';
const endpoint = parent === 'openai' ? config.openai_base_url : config.model_providers?.[parent]?.base_url;
const entries = new Map(models.map((m) => [m.model, m]));
for (const role of roles) for (const rung of role.rungs) {
if (config.agents?.[rung.agent] !== undefined) {
throw new CrackError('role_conflict', `An inline ${rung.agent} definition competes with the generated role.`,
'Reconcile the role definitions without changing unrelated agents.');
}
if (!rung.model.includes('/')) {
if (parent !== 'openai' || endpoint || config.model_providers?.openai
|| ![undefined, 'https://chatgpt.com/backend-api/'].includes(config.chatgpt_base_url)) {
fail('A native worker requires the built-in OpenAI parent provider and endpoint.');
}
const declared = entries.get(rung.model)?.declaredProvider;
if (declared && declared !== 'openai') fail('The native model metadata declares another provider.');
} else {
if (!loopback(endpoint)) fail('A routed worker requires a recognized loopback Router parent endpoint.');
const requested = routerProvider(codexHome, rung.model);
if (requested && requested !== parent) {
const otherEndpoint = config.model_providers?.[requested]?.base_url;
if (!otherEndpoint || otherEndpoint !== endpoint) fail('The Router role provider does not match the effective parent route.');
}
}
}
return ['Provider checks are static; verify active project/UI/managed overrides and client-recorded child routing before sending private work.',
'Role instructions forbid nested delegation and read-only edits; these are not additional sandbox guarantees.'];
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 470k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |