tanshilongmario/codex-light-shortcut/build-codex-status-light
Claude Code and agent skill by tanshilongmario/codex-light-shortcut
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Build, install, test, or diagnose a macOS Codex status light that maps Codex lifecycle hooks to Apple Shortcuts/HomeKit scenes. Use when Codex needs to create or repair working, waiting-for-approval, and completed light effects; configure hooks.json; prevent concurrent tasks from overwriting approval state; inspect hook trust, state, or logs; or verify real Apple Home shortcut behavior.
Install
npx vskill@latest install tanshilongmario/codex-light-shortcut/build-codex-status-lightSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Build Codex Status Light
Create a reliable global status light using Codex hooks and Apple Shortcuts. Track each Codex session independently and aggregate with waiting > working > completed.
Workflow
- Confirm macOS and inspect existing files before changing anything:
~/.codex/hooks.json~/.codex/config.toml~/.codex/codex-light/- The project-local equivalents, if present
- Run
/usr/bin/shortcuts listand confirm these shortcuts, or map the user's equivalents:
Codex-执行中Codex-等待Codex-完成
- Read references/architecture-and-diagnostics.md before changing an existing implementation or diagnosing concurrency.
- Copy
scripts/codex-light-hookto an absolute, stable location such as~/.codex/codex-light/codex-light-hookand make it executable. - Merge the following handlers into the active hook layer without deleting unrelated hooks:
SessionStart→codex-light-hook resetUserPromptSubmit→codex-light-hook workingPermissionRequest→codex-light-hook waitingPostToolUse→codex-light-hook workingStop→codex-light-hook completed
- Use absolute command paths in hook configuration. Preserve existing configuration and user changes.
- Ask the user to review new or changed hooks through
/hooks. Never bypass trust or edit trusted hashes directly. - Run
scripts/test-state-priority.shbefore testing physical lights. - Trigger the three shortcuts directly, one at a time, when the user has authorized a real light test. Finish on
Codex-完成unless requested otherwise. - Validate one real approval flow and inspect
state/events.logto confirm another task'sworkingevents cannot replace an activewaitingstate.
Hook configuration shape
Use one matcher group per event. Omit matcher to cover every supported tool:
Safety and verification
- Treat Apple Shortcut execution as a real external side effect; announce it before testing.
- Use an isolated temporary
CODEX_HOMEand/usr/bin/truefor logic tests. - Do not overwrite
hooks.jsonblindly. Merge and validate JSON. - Do not kill arbitrary processes. Only stop a PID after verifying its command belongs to
shortcuts run Codex-.... - Launch shortcut animations asynchronously so hooks never delay a Codex turn.
- Report the observed aggregate and per-session states, not only command exit codes.
Diagnosis order
- Confirm the task is actually
waitingOnApproval. - Check
state/events.logforPermissionRequest/waiting. - Check
state/sessions/<session-id>andstate/current. - Check hook enablement and trust with
/hooks. - Check shortcut names and run the waiting shortcut directly.
- Check
state/shortcut.logand the recorded PID.
If the task is waiting but no waiting event exists, diagnose hook coverage, trust, or whether the approval predates hook loading. If a waiting event exists but current becomes working while another task remains pending, replace last-event-wins state with per-session aggregation.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskill/build-codex-status-light/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/tanshilongmario/codex-light-shortcut/build-codex-status-light)