Skills

Theme Rebase

Rebase all theme-* branches onto main, one commit per theme, preserving each theme's...

Install

npx skills add yournextstore/yournextstore --skill theme-rebase -g -a claude-code -y
Category
AI and agents
Updated
4d ago
License
MIT
Context cost
Lightabout 1,066 tokens
Runs scripts
Yes, review before use

What it does

Rebase all theme-* branches onto main, one commit per theme, preserving each theme's visual identity. A script does the mechanics and a headless agent resolves only what needs judgment; pushes with backup tags. Run as a scheduled task or one-off.

Rebase theme branches onto main

Each theme-* branch is one commit on top of main: the theme's own theme NNN: … commit (README, "Themes"). theme-rebase.sh rebuilds every theme that way on the current main. For each theme, in its own worktree, it:

  1. squash-merges the theme onto main: one 3-way merge, however many commits the branch has;
  2. settles what needs no judgment: bun.lock, package.json, and every path only copied commits touched, which take main's side; then runs the codemods over the merged files and over both sides of each remaining conflict, so a rewrite main made everywhere stops conflicting with the theme's edits around it;
  3. starts one headless Claude session for what is left, with rules.md as its instructions;
  4. runs bun run check and bun run build, resuming the session once on a failure;
  5. commits with the theme commit's message and author, and sends anything doubtful to review.

Nothing leaves the machine until push.

Run it

S=.agents/skills/theme-rebase/theme-rebase.sh
bash $S run theme-002 theme-003   # or --all
bash $S push                      # the last run's ok themes, one at a time
bash $S clean [theme…]            # drop leftover worktrees and theme-rebase/* branches
SettingDefault
JOBS3themes in parallel
AGENTclaudenone: stop at needs-agent instead of starting a session
BUILD10 skips bun run build
AGENT_BUDGET10USD cap per agent session
AGENT_MODELclaude-sonnet-5-5claude-opus-5-5 for a theme Sonnet got wrong

The build reads live store data, so it needs YNS_API_KEY in .env. A free census of what a run would hit: AGENT=none BUILD=0 bash $S run --all.

Roll a large run out in batches of about 20: run, read the table, push, then the next batch. A scheduled run is run --all, then push, then the table as the report.

Statuses

Read the whole SKILL.md on GitHub

More in AI and agents