cj-uxloop
Skill1 starsChanged 32 days agoMITView on GitHub
Run the UX loop on a web app with @damsleth/ux-loop (`uxl`) - capture screenshots, get a scored UX critique, apply fixes safely in a worktree, iterate until the score converges, and gate PRs in CI. Also covers first-time setup (install, `uxl.config.mjs`, required-flow mapping). Use when asked to "run the UX loop", review or improve a UI, audit UX or accessibility from screenshots, compare UX scores between runs, add UX review to CI, set up `uxl`, or troubleshoot `uxl` errors.
- Reads credentials
- Installs packages
In this repository19 other files it gives its agents.
- AGENTS.mdAGENTS.md
- cj-abSkill
- cj-ambitionSkill
- cj-automateSkill
- cj-cloudflare-workerSkill
- cj-code-reviewSkill
- cj-dailySkill
- cj-meetingsSkill
- cj-notesSkill
- cj-nowSkill
- cj-owa-toolsSkill
- cj-thingsSkill
- cj-todoSkill
- cj-video-visionSkill
- cj-voice-dnaSkill
- repo-deepSkill
- repo-depsSkill
- repo-groomSkill
- repo-healthSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
Run from the repo root. current/branch targets need a clean git tree.
- Very specific: line 34
Run: uxl run, or stepwise uxl shots, uxl review, uxl implement.
- Distinctive: line 36
Read the result, do not just report "done":
- Very specific: line 66
Keep capture.flowMapping names equal to real capture.playwright.flows[].name.
- Distinctive: line 73
Never bypass incomplete flow coverage.
- Very specific: line 74
Do not set reuseExistingServer: true unless the user manages the server.
- Very specific: line 75
Do not enable autoCommit, or use --target current, on a dirty tree.
- Very specific: line 76
Treat the score as a trend, not truth: re-run to confirm, and say which score_source produced it.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
cj-uxloop
uxl runs shots -> review -> implement against a real running app. What
it adds over an agent eyeballing a page ad hoc: forced flow coverage, an
objective score (axe-core + heuristics) blended with the LLM critique,
scope-limited edits in a worktree, keep-best rollback, and a PR gate. Use it
for repeatable, comparable runs; for a one-off "does this look right",
just open the page.
Decide first
- No
uxl.config.mjsin the repo root, oruxl flows checkbelow 100%: do Onboarding, then run. - Config exists and coverage is complete: go straight to Running.
- Asked only for a review or a score: stop after
uxl review. Neverimplementunless asked.
Running
Run from the repo root. current/branch targets need a clean git tree.
- Pre-flight:
git statusclean,uxl flows checkcomplete, nothing already bound to the configured port (uxl shotsrefuses to reuse a server). - Pick scope. Default
uxl run --iterations 2 --score-threshold 85. Constrain edits with--scope css-only|text-only|layout-safe|unrestricted(start withcss-onlyorlayout-safeon unfamiliar code). - On a new repo, preview first:
uxl implement --dry-runoruxl diff(patch only, nothing applied). - Run:
uxl run, or stepwiseuxl shots,uxl review,uxl implement. Runner:--runner claude|codex|copilot|openai(openai reviews only). - Read the result, do not just report "done":
.uxl/report.mdand the JSON in.uxl/reports/(score,score_source,kept_iteration,best_score,restored).uxl/shots/: look at a few screenshots yourself- the diff in the worktree/branch (
uxl diff)
- Land it: review the diff, then
uxl apply [--commit]. Bad run:uxl rollback --list, thenuxl rollback --to <timestamp> --yes. - Compare runs:
uxl report --left <old.json> --right <new.json>.
Report to the user: score before/after, what changed (files, one line each), what the loop could not fix, and the path to the diff.
CI
uses: damsleth/ux-loop@v1 runs shots + review on PRs (never implement),
posts a sticky comment, and fails below fail-under. Needs
ANTHROPIC_API_KEY (claude runner) or OPENAI_API_KEY. Local equivalent:
uxl report --format github --fail-under 70 (exit 2 below threshold).
Onboarding
Short path; details in references/onboarding.md.
- Node 22+, a
package.json, run from the repo root. npm i -D @damsleth/ux-loop playwright(addaxe-corefor accessibility metrics,openaionly for the openai runner). If the install 404s, the package is not published yet; install from the repo instead.uxl init(--non-interactivefor automation,--forceonly to replace).- Map flows (mandatory,
uxl shotsfails otherwise):uxl flows check, repair withflows list|add|map|import-playwright --yes, repeat to 100%. Keepcapture.flowMappingnames equal to realcapture.playwright.flows[].name; slug-case ids; leavecapture.onboarding.statuspendinguntil coverage is complete. - Smoke test:
uxl shots, confirm.uxl/shots/manifest.json.
Guardrails
- Never bypass incomplete flow coverage.
- Do not set
reuseExistingServer: trueunless the user manages the server. - Do not enable
autoCommit, or use--target current, on a dirty tree. - Treat the score as a trend, not truth: re-run to confirm, and say which
score_sourceproduced it.
References
- references/onboarding.md: config skeleton, coverage rules, runners, custom capture adapter
- references/troubleshooting.md: error-to-fix playbook
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

