agentleFS
BinayakDotelBinayakDotel/skills-marketplace/skills/preview-pr/SKILL.md

preview-pr

Skill1 starsChanged 36 days agoMITView on GitHub

Start an open pull request in its existing worktree for optional hands-on review, open the relevant page, and give the reviewer a short feature-specific checklist. Use when the user says /preview-pr.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Do not merge, close, or approve the PR.

    line 21

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

/preview-pr #PR

This is an optional human review step. Do not change code, ticket status, or the PR. Read AGENTS.md for the repo's base branch, worktree layout, and run commands.

  1. Identify. Require a PR number. Use gh pr view <pr> --json state,baseRefName,headRefName,body,files,url and require an open ticket PR targeting the repo's ticket base. Find its existing worktree with git worktree list --porcelain; never check the PR branch out in the primary checkout. If the worktree is absent, explain that /implement creates it.
  2. Plan the review. Read the linked ticket's acceptance criteria and Decisions, then the PR's changed paths and relevant route files. Pick the live route that exercises the change. For a shared shell or navigation change, start at / and test more than one destination. For a dynamic route, use a real record if known; do not invent a slug. A fixture route may help visual comparison but is not proof that a live workflow works. Include worker or external-service prerequisites when applicable.
  3. Choose the backend with the user. Inspect the repo's run recipe before starting it. If it deploys backend code, recommend the existing dev deployment only when the PR leaves that backend unchanged and compatible; recommend an isolated deployment when it changes backend functions, schema, or auth. Explain which deployment the recipe would update. Wait for the user's explicit choice before any backend push or deployment creation. If the user chooses a shared deployment for backend changes, name that effect plainly before proceeding. Reuse an isolated deployment recorded in .run/preview-deployment; never create a second one merely because the skill was rerun. Repos without a deployed backend need no deployment choice.
  4. Prepare the worktree. Install dependencies once if missing, using the repo's documented package command. Never read, print, or copy .env*. For a shared, frontend-only preview, if the worktree lacks .env.local, an ignored symlink to the primary checkout's .env.local is allowed after checking that the target exists; do not overwrite an existing file. For an isolated Convex deployment, do not use that symlink: Convex's --select writes deployment settings to .env.local. Follow the repo's project facts to select an existing dev/pr-<number> deployment or create it with npx convex deployment create --type dev <team>:<project>:dev/pr-<number> --select. Record its non-secret reference in the ignored .run/preview-deployment file. Account for its auth configuration, required environment variables, and test data. Stop and explain any setup the user must supply.
  5. Switch the local server. Find the running project server using git worktree list and the process records used by this repo's just run. Stop that known server from its own worktree using just stop, as the user requested. Some stop recipes kill any listener on the app port, so if the listener is not a known project server, stop and report it rather than killing it. Do not restart the previous server later.
  6. Start. For a shared frontend-only preview, use the repo's frontend-only recipe such as just run-web; it must not push backend code. For an isolated deployment, or a shared deployment explicitly chosen for backend changes, use the repo's full just run recipe after environment setup. If the repo lacks a suitable recipe, use its documented equivalent and record the process so it can be stopped. Check the HTTP response and relevant logs; report a startup failure instead of claiming the preview is ready. Once ready, write the PR number to the ignored .run/preview-pr file in this worktree.
  7. Open and hand over. Open the chosen local URL in the user's browser when supported and give it as a clickable link. If authentication redirects the browser, tell the user how to reach the page after sign-in. Give 3–6 plain-language checks tied to the PR and ticket, including the expected result. Name any test data or external service that is required. End with /stop-preview as the cleanup command. Leave the server running for the reviewer.

Do not merge, close, or approve the PR. Do not use this skill on a merged PR.

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.