agentleFS
skillberry-aiskillberry-ai/cap-evolve/.claude/skills/dashboard-change/SKILL.md

dashboard-change

Skill70 starsChanged 7 days agoApache-2.0View on GitHub

Prepare a cap-evolve dashboard (dashboard/frontend) PR for review by attaching before/after screenshots instead of a real end-to-end optimization run. Use for any change under dashboard/frontend/src/** - components, routes, styles, new tabs/panels. Not for backend (dashboard/backend) or core logic changes, which need the testing skill's real-run tier.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 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.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Only screenshot tabs your change actually touches, plus one overview tab — don't flood the PR with every tab if only one panel changed.

    line 46
  2. Distinctive:

    If Playwright MCP produced the screenshots directly into a running session that can attach images to the PR comment natively, use that path …

    line 74
  3. Very specific:

    Don't dispatch benchmarks.yml/integration-tests.yml for a dashboard-only change — the screenshots are the evidence.

    line 80
  4. Very specific:

    If the change also touches dashboard/backend/ or reduce_run's output shape, that's a code change too — run testing's unit tier (and the …

    line 84

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Dashboard change

A dashboard-only change doesn't need a real optimization run to review — it needs to be seen. This skill gets screenshots of the changed UI (light + dark, before and after) into the PR so reviewers can judge it without running anything.

1. Build

cd dashboard/frontend && npm ci && npm run build && npm test

dist/ is committed — if it changed, it's part of the diff. CI fails on a stale dist/.

2. Get before/after screenshots

Preferred: Playwright MCP, if connected in this session. Serve the dashboard locally, navigate to each changed tab/route, and capture a screenshot at 1920x1080 in both data-theme="light" and the default (dark) — the theme tokens in src/index.css (--primary, --accepted, --rejected, …) must render correctly in both.

Fallback: the repo's own screenshot tool, no MCP needed:

# serve the committed static export (fixture data, works offline)
python3 scripts/tools/shoot_dashboard.py --out /tmp/dash-after

# or point it at a live dev server for a specific run
cap-evolve dashboard --base <some run dir> --port 7878 --no-open &
python3 scripts/tools/shoot_dashboard.py --live http://127.0.0.1:7878 --run <run-name> --out /tmp/dash-after

It captures every tab the UI actually renders (the tab set comes from buildTabs() in src/routes/RunDeepDive.tsx), one PNG per tab, dark and at full content height by default. Run it once on the branch before your change (git stash or a sibling worktree on main) into /tmp/dash-before, and once after, so the PR shows a real diff, not just the new state.

Only screenshot tabs your change actually touches, plus one overview tab — don't flood the PR with every tab if only one panel changed.

3. Attach to the PR

Push the PNGs to an orphan assets branch (keeps the main history free of binary diffs) and link them from a PR comment:

pr=<N>
git worktree add --orphan -b pr-assets/pr-$pr ../wt-pr-assets-$pr
cp /tmp/dash-before/*.png /tmp/dash-after/*.png ../wt-pr-assets-$pr/
git -C ../wt-pr-assets-$pr add -A
git -C ../wt-pr-assets-$pr commit -s -m "screenshots for PR #$pr"
git -C ../wt-pr-assets-$pr push -u origin pr-assets/pr-$pr

repo=$(gh repo view --json nameWithOwner --jq .nameWithOwner)
{
  echo "## Dashboard screenshots"
  for f in /tmp/dash-after/*.png; do
    name=$(basename "$f")
    echo "### $name"
    echo "![${name}](https://raw.githubusercontent.com/$repo/pr-assets/pr-$pr/$name)"
  done
} > /tmp/pr-$pr-screenshots.md
gh pr comment "$pr" --body-file "/tmp/pr-$pr-screenshots.md"

If Playwright MCP produced the screenshots directly into a running session that can attach images to the PR comment natively, use that path instead of the orphan-branch upload — same end result, fewer steps.

4. No real end-to-end run needed

Don't dispatch benchmarks.yml/integration-tests.yml for a dashboard-only change — the screenshots are the evidence. Move straight to review-cycles once they're attached.

If the change also touches dashboard/backend/ or reduce_run's output shape, that's a code change too — run testing's unit tier (and the backend's own tests) before review, in addition to the screenshots.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.