mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-22 08:01:32 +01:00
`./setup --host codex` now adds gstack's skill-routing hint and destructive-command check to Codex's `~/.codex/hooks.json`, next to your own hooks, so Codex users get the same guardrails Claude Code users have. Codex runs a hook only after you trust it, so nothing fires until you accept gstack's hooks at Codex's startup prompt or in `/hooks`; `gstack-doctor` shows whether you have. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: p1/red-team#1 reader=red-team
12 lines
659 B
TypeScript
Executable File
12 lines
659 B
TypeScript
Executable File
#!/usr/bin/env -S bun --no-env-file --config=/dev/null
|
|
/**
|
|
* codex-skill-route-hook — the skill-routing hook on Codex (GST-3172). The same UserPromptSubmit hook as Claude
|
|
* Code's (hosts/claude/hooks/skill-route-hook.ts) with host codex: it scans ${CODEX_HOME:-~/.codex}/skills, names
|
|
* skills as Codex does (gstack-review), words the hint for Codex, and never routes a prompt that starts with `$`
|
|
* (a Codex skill mention) or `/`. Same switch (skill_routing), same deadline, same trace log.
|
|
* Docs: docs/skill-routing-and-contracts.md#codex.
|
|
*/
|
|
import { runSkillRouteHook } from '../../claude/hooks/skill-route-hook.ts';
|
|
|
|
runSkillRouteHook('codex');
|