Pr Local Preview Maintainer logo

Pr Local Preview Maintainer

Community
Undertone0809
pr-local-preview-maintainer

Use when checking out, running, previewing, reviewing, or validating a GitHub pull request locally in a safe worktree, including PR preview URLs, local screenshots, readiness checks, logs, and cleanup instructions.

Overview

PublisherUndertone0809
Repositoryrudder
Skill namepr-local-preview-maintainer
Stars
290
Forks
31
Bundled files
1
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Undertone0809 on GitHub. Read the source before you install it.

Installation

Install the Pr Local Preview Maintainer AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Undertone0809/rudder.git /tmp/rudder
mkdir -p .claude/skills
cp -r /tmp/rudder/agent-skills-bak/maintainer/pr-local-preview-maintainer .claude/skills/pr-local-preview-maintainer
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Pr Local Preview Maintainer in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Pr Local Preview Maintainer on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Pr Local Preview Maintainer is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

PR Local Preview Maintainer

Run pull requests in a disposable local worktree and give the user a stable preview link. The point is to let the user review the PR while protecting their current working tree and making UI changes visible.

Default Workflow

1. Preserve the current workspace

Start by checking the repository state:

bash
git status --short --branch
gh pr view <number> --json number,title,state,headRefName,headRepositoryOwner,url,isCrossRepository

If the current worktree has local changes, do not run gh pr checkout there. Create or reuse a sibling worktree instead. This avoids overwriting unrelated work and keeps the PR preview easy to remove later.

Use a predictable path:

text
<repo-parent>/<repo-name>-pr-<number>

For this repository, PR 8 should become:

text
/Users/zeeland/projects/rudder-oss-pr-8

If the directory already exists, inspect it before reusing it:

bash
git -C <worktree-path> status --short --branch
git -C <worktree-path> branch --show-current

If it is dirty, ask only if the dirty changes conflict with the user's goal. Otherwise, pick a suffixed path such as <repo-name>-pr-<number>-preview.

2. Check out the PR in the worktree

Create the worktree from the remote base, then check out the PR branch inside it:

bash
git worktree add --detach <worktree-path> origin/main
gh pr checkout <number> --branch zeelandc/pr-<number>

If main is not the base branch, use the PR's actual base ref. Prefer a local branch name that makes the preview purpose clear and follows the user's branch prefix convention when the repository defines one.

After checkout, verify:

bash
git status --short --branch

3. Install dependencies only when needed

Check whether dependencies are present:

bash
test -d node_modules && echo node_modules-present || echo node_modules-missing

If missing, install them from the worktree:

bash
pnpm install

Report install warnings only when they affect the preview. Routine peer or bin link warnings can be mentioned briefly.

4. Choose isolated runtime settings

Before starting, inspect occupied ports and existing local runtimes:

bash
lsof -nP -iTCP:<candidate-port> -sTCP:LISTEN

For Rudder, prefer:

bash
RUDDER_INSTANCE_ID=pr-<number>
PORT=<free-api-port>
RUDDER_EMBEDDED_POSTGRES_PORT=<free-pg-port>

Use 3100 only if it is free and the user clearly wants the default instance. If another Rudder dev runtime is already running, leave it alone and use a separate port and instance ID.

Example:

bash
env RUDDER_INSTANCE_ID=pr-8 PORT=3118 RUDDER_EMBEDDED_POSTGRES_PORT=54358 pnpm dev

5. Start the preview so it survives hand-off

Use tmux when available. It keeps the preview alive after the assistant turn ends and gives the user a simple way to inspect logs.

bash
tmux new-session -d -s rudder-pr-<number> -c <worktree-path> \
  'env RUDDER_INSTANCE_ID=pr-<number> PORT=<port> RUDDER_EMBEDDED_POSTGRES_PORT=<pg-port> pnpm dev'

If tmux is not available, use another managed background process and capture logs to /tmp/<repo-name>-pr-<number>.log. Do not leave an opaque process running without telling the user how to stop it.

6. Wait for readiness

Poll the health endpoint or the app's equivalent readiness check:

bash
curl -fsS http://127.0.0.1:<port>/api/health

If the app has no health endpoint, use the first meaningful route and check for a successful response. For frontend-only apps, load the dev server URL and confirm it serves HTML.

When startup fails, inspect the session logs before returning:

bash
tmux capture-pane -pt rudder-pr-<number> -S -160

Fix straightforward startup issues yourself when they are local environment problems, such as missing dependencies or port conflicts. Do not edit PR source code unless the user asked for a fix.

7. Decide whether UI screenshots are required

Screenshots are required when any of these are true:

  • the PR title, files, or user request mentions UI, layout, pages, components, CSS, design, screenshots, visual review, browser behavior, or interaction
  • changed files live under ui/, desktop/, frontend route files, component directories, stylesheets, or public assets
  • the user says they want to "see" the effect

Use Browser Use for local browser inspection when available. Capture the important screen or flow after the preview is running. Store temporary screenshots outside the repository, for example:

text
/tmp/rudder-pr-<number>-<view>.png

For non-UI backend/API PRs, a health check plus a task-specific API smoke check is usually enough. If the user still needs to review manually, provide the URL.

8. Hand-off format

Keep the final response short and concrete:

text
PR <number> is running in <worktree-path>.

Open: http://127.0.0.1:<port>
Logs: tmux attach -t rudder-pr-<number>
Stop: tmux kill-session -t rudder-pr-<number>

Health check passed: <brief status>
Screenshots: <paths or embedded images when UI changed>

If screenshots were required but could not be captured, say exactly why and what verification did run.

Cleanup Requests

When the user asks to close, stop, or clean up the preview, stop only the PR preview session and verify its port is free:

bash
tmux kill-session -t rudder-pr-<number>
lsof -nP -iTCP:<port> -sTCP:LISTEN

Do not remove the worktree unless the user explicitly asks for cleanup. If they do ask to remove it, verify the worktree has no uncommitted changes first.

Safety Notes

  • Never use destructive Git commands in the user's main worktree to make a PR checkout succeed.
  • Do not stop unrelated Rudder dev sessions just because the default port is in use; choose an isolated port instead.
  • Keep PR preview data isolated with a dedicated RUDDER_INSTANCE_ID.
  • If source edits become necessary, pause and state that the task has shifted from previewing a PR to fixing it.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Pr Local Preview Maintainer AI skill do?

Use when checking out, running, previewing, reviewing, or validating a GitHub pull request locally in a safe worktree, including PR preview URLs, local screenshots, readiness checks, logs, and cleanup instructions.

Why use Pr Local Preview Maintainer on TypingMind?

Because you install it once and use it with any model. Pr Local Preview Maintainer is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Pr Local Preview Maintainer in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Undertone0809/rudder/tree/main/agent-skills-bak/maintainer/pr-local-preview-maintainer. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Pr Local Preview Maintainer?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Pr Local Preview Maintainer?

As many as you like. As long as a model supports skills, you can use Pr Local Preview Maintainer with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Pr Local Preview Maintainer AI skill free?

Yes. It is published on GitHub by Undertone0809 under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇