agentsclimarketplace

Worktree

Skill MinBZK/storybook/.claude/skills/worktree

Create and setup a git worktree with all necessary files and dependencies. Use when starting work on a new feature branch.From its SKILL.md

Install
npx -y skills add MinBZK/storybook --skill worktree

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 6 stars6 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.

SKILL.md

2.7 KB, as published. Nobody here has run it

Worktree Setup

Maakt een nieuwe git worktree aan met alle benodigde configuratie voor development.

Gebruik

/worktree feat/my-feature

Workflow

Stap 1: Maak worktree aan

git worktree add .worktrees/<branch-name> -b <branch-name>

Of voor een bestaande branch:

git worktree add .worktrees/<branch-name> <branch-name>

Stap 2: Kopieer configuratie bestanden

Vereiste bestanden:

BestandDoel
.envEnvironment variables
.claude/settings.local.jsonClaude Code lokale permissies
# Kopieer .env
cp .env .worktrees/<branch-name>/

# Kopieer .claude folder (voor settings.local.json)
cp -r .claude .worktrees/<branch-name>/

Stap 3: Installeer dependencies

cd .worktrees/<branch-name>
npm install

Stap 4: Build styles en components

npm run build:styles
npm run build

Stap 5: Verifieer setup

# Check dat alles werkt
npm run sb:start
npm run sb:status

Volledige one-liner

BRANCH="feat/my-feature" && \
git worktree add .worktrees/$BRANCH -b $BRANCH && \
cp .env .worktrees/$BRANCH/ && \
cp -r .claude .worktrees/$BRANCH/ && \
cd .worktrees/$BRANCH && \
npm install && \
npm run build

Opruimen na merge

# Verwijder worktree
git worktree remove .worktrees/<branch-name>

# Of forceer verwijdering bij uncommitted changes
git worktree remove .worktrees/<branch-name> --force

Permissies synchroniseren

Wanneer je in een worktree nieuwe permissies toekent, voeg deze ook toe aan de hoofdfolder (niet kopiëren - anders overschrijf je permissies van andere worktrees):

# Bekijk nieuwe permissies in worktree
cat .worktrees/<branch-name>/.claude/settings.local.json

# Voeg handmatig toe aan hoofdfolder .claude/settings.local.json
# OF merge met jq:
jq -s '.[0] * .[1]' .claude/settings.local.json .worktrees/<branch-name>/.claude/settings.local.json > .claude/settings.local.json.tmp && mv .claude/settings.local.json.tmp .claude/settings.local.json

Checklist

  • Worktree aangemaakt in .worktrees/ folder
  • .env gekopieerd
  • .claude/ folder gekopieerd (voor lokale permissies)
  • npm install uitgevoerd
  • npm run build geslaagd
  • Storybook start correct (npm run sb:start)

Troubleshooting

ProbleemOplossing
Permission denied errorsCheck of .claude/settings.local.json is gekopieerd
Build faaltRun npm install eerst
Port conflict bij StorybookGebruik npm run sb:status om poorten te checken

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.