Claude Code Plugins

Community-maintained marketplace

Feedback
5
0

Rebuilds the dist folder for a GitHub PR (typically dependabot PRs). Use when asked to rebuild dist for a PR, update dist for dependabot, or prepare a PR for merge by rebuilding.

Install Skill

1Download skill
2Enable skills in Claude

Open claude.ai/settings/capabilities and find the "Skills" section

3Upload to Claude

Click "Upload skill" and select the downloaded ZIP file

Note: Please verify skill by going through its instructions before using it.

SKILL.md

name rebuild-dist-for-pr
description Rebuilds the dist folder for a GitHub PR (typically dependabot PRs). Use when asked to rebuild dist for a PR, update dist for dependabot, or prepare a PR for merge by rebuilding.

Rebuild Dist for PR

Automates the process of checking out a PR branch, rebuilding the dist folder, and preparing a commit.

Workflow

Required input: PR number (e.g., 42)

Step 1: Fetch and checkout the PR branch

gh pr checkout <PR_NUMBER>

Step 2: Install dependencies

npm install

Step 3: Build and package

npm run build && npm run package

Step 4: Check if dist changed

git status --porcelain dist/

If no output, dist is unchanged—inform the user and stop.

Step 5: Stage dist changes

git add dist/

Step 6: Show staged changes and pause

Show the user what will be committed:

git diff --cached --stat

STOP HERE and ask the user for confirmation before pushing.

Step 7: Commit and push (after user confirms)

git commit -m "rebuild dist"
git push

Error handling

  • If gh pr checkout fails, verify the PR number and that gh is authenticated
  • If npm install fails, check for lockfile issues
  • If build fails, show the error output to the user