Logo de Pr Local Preview Maintainer

Pr Local Preview Maintainer

Comunidade
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.

Visão geral

Publicado porUndertone0809
Repositóriorudder
Nome da habilidadepr-local-preview-maintainer
Estrelas
290
Forks
31
Arquivos incluídos
1
LicençaApache-2.0
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Arquivos incluídos: 1

    Scripts, templates e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente para leitura e nunca são executados.

  • Código aberto

    Publicada por Undertone0809 no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Pr Local Preview Maintainer no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/Undertone0809/rudder/tree/main/agent-skills-bak/maintainer/pr-local-preview-maintainer
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

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
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Pr Local Preview Maintainer em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Pr Local Preview Maintainer automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Pr Local Preview Maintainer não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

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.

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA Pr Local Preview Maintainer faz?

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.

Por que usar Pr Local Preview Maintainer no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Pr Local Preview Maintainer é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Pr Local Preview Maintainer no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/Undertone0809/rudder/tree/main/agent-skills-bak/maintainer/pr-local-preview-maintainer. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Pr Local Preview Maintainer?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Pr Local Preview Maintainer?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Pr Local Preview Maintainer com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Pr Local Preview Maintainer é gratuita?

Sim. A habilidade é publicada no GitHub por Undertone0809 sob a licença Apache-2.0. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇