Delegate ui to claude
Skill Ben2W/delegate-ui-to-claude/skills/delegate-ui-to-claude
Codex skill that implements frontend code, then runs Claude Code for design refinement
npx -y skills add Ben2W/delegate-ui-to-claude --skill delegate-ui-to-claudeAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use Claude Code as a headless frontend design refinement pass after Codex scaffolds or implements UI code. Use whenever Codex is asked to create, modify, polish, redesign, review, or verify user-facing frontend code, visual design, layout, styling, responsive behavior, accessibility, components, pages, or interactions; Codex may write the functional frontend implementation, but must ask Claude Code to rewrite/refine the design with embedded frontend-design instructions before finalizing user-facing UI work.
SKILL.md
6.4 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
Delegate UI To Claude
Overview
Let Codex build the frontend functionality, structure, data wiring, and initial UI code. Then route the result through Claude Code using a non-interactive claude --print invocation so Claude performs a design rewrite/refinement pass with this skill's bundled references/frontend-design.md.
The wrapper can opportunistically give Claude a local preview URL. A preview URL is helpful but never required: if no URL is available and no obvious dev server can be started, the wrapper continues with source-level refinement and build/static checks.
Required Behavior
- Codex may scaffold, implement, and modify frontend code directly, including components, routes, state, data fetching, accessibility semantics, tests, and build wiring.
- Before finalizing user-facing UI work, delegate a design refinement pass to Claude Code headlessly. Use
scripts/delegate-ui-to-claude.shor an equivalentclaude --printcommand. - Treat Claude Code as the design specialist. Ask it to improve visual hierarchy, typography, spacing, color, motion, layout, responsiveness, and interaction polish while preserving the behavior Codex implemented.
- Do not ask Claude Code to load
$frontend-design,$web-design-guidelines, or any other external design skill. The frontend design instructions are bundled with this skill and must be included directly in Claude's prompt. - If Claude Code is unavailable, stop and report the blocker unless the user explicitly authorizes Codex to do the UI implementation directly.
- After Claude finishes, inspect the diff yourself. Codex may make functional fixes, integration fixes, and small cleanup edits. If the result still needs meaningful visual/design changes, delegate another design pass to Claude Code.
- The wrapper defaults to
--output-format stream-jsonwith partial messages and emits heartbeat status while Claude runs, so long design passes do not appear stalled.
Workflow
- Clarify the frontend task: target pages/components, expected behavior, design constraints, and relevant verification commands.
- Codex implements the functional frontend first. For a new UI, scaffold the working page/component/app before calling Claude. For existing UI, make required functional or structural changes before calling Claude.
- Confirm the repository path and working tree state. Preserve user changes and do not ask Claude to revert unrelated files.
- Run the wrapper from the repository root for the design pass. Resolve the script relative to this skill directory; for common Codex installs, use one of these paths:
script_path="${CODEX_HOME:-$HOME/.codex}/skills/delegate-ui-to-claude/scripts/delegate-ui-to-claude.sh"
[ -x "$script_path" ] || script_path="$HOME/.agents/skills/delegate-ui-to-claude/scripts/delegate-ui-to-claude.sh"
[ -x "$script_path" ] || script_path=".agents/skills/delegate-ui-to-claude/scripts/delegate-ui-to-claude.sh"
"$script_path" <<'TASK'
Describe the frontend work Codex already implemented and the design goals for Claude's refinement pass.
Include target files or routes when known.
Include expected verification commands when known.
TASK
Preview URL behavior:
- If
CLAUDE_UI_URLis set and reachable, the wrapper passes it to Claude. - If no URL is provided,
CLAUDE_UI_START_SERVER=autotries to start an obvious packagedevscript and passes the detected local URL only if it becomes reachable. - If no preview URL is available, the wrapper continues and explicitly tells Claude not to block on browser verification.
- Set
CLAUDE_UI_START_SERVER=neverto skip server probing, orCLAUDE_UI_START_SERVER=alwaysto fail when no preview server can be started. - Set
CLAUDE_UI_DEV_CMDfor custom server startup. It may include{host},{port}, and{url}placeholders, for example:CLAUDE_UI_DEV_CMD='npm run dev -- --host {host} --port {port}'. - Set
CLAUDE_UI_HEARTBEAT_SECONDS=0to disable wrapper heartbeat output.
- Review Claude's output and the local diff with
git diff --statand targeted file reads. - Run the relevant checks yourself when practical: lint, typecheck, tests, build, and visual verification for significant UI work.
- If the UI needs design revision, delegate the follow-up back to Claude Code with the same wrapper and a precise diff-aware prompt. If it needs functional revision, Codex may make that fix directly.
- Final response: summarize what Codex implemented, what Claude refined, and list verification run or skipped.
Direct Claude Command
If the wrapper is unavailable, use this command shape and paste the full contents of references/frontend-design.md where indicated:
claude --print \
--permission-mode acceptEdits \
--output-format stream-json \
--include-partial-messages \
--add-dir "$PWD" \
-- \
'You are Claude Code running headlessly as a frontend design refinement pass after Codex has implemented the functional UI.
Apply these frontend-design instructions directly:
<paste references/frontend-design.md here>
Rewrite/refine the existing frontend design directly in this repository. Preserve existing behavior, data flow, framework conventions, and public APIs. Improve visual hierarchy, typography, spacing, color, motion, layout, responsiveness, and interaction polish. Run relevant checks when practical, and do not commit changes unless explicitly requested.'
The -- separator is required. In current Claude Code CLI versions, --add-dir accepts multiple directory values and can otherwise consume the prompt as another directory.
Use CLAUDE_UI_PERMISSION_MODE=bypassPermissions only when the user explicitly requests fully autonomous execution in a trusted workspace. Default to acceptEdits.
Bundled Design Instructions
The wrapper reads references/frontend-design.md and includes it directly in the prompt to Claude Code. Keep that reference file aligned with the desired frontend design behavior.
What ships with it: 3 files
13.7 KB alongside SKILL.md, 1 of them executable
agents/
- openai.yaml258 B
references/
- frontend-design.md4.2 KB
scripts/
- delegate-ui-to-claude.shruns9.3 KB