agentleFS
GustavoAlecioGustavoAlecio/claude-setup/skills/pr-status/SKILL.md

pr-status

Skill0 starsChanged 27 days agoMITView on GitHub

Digest das suas PRs em voo — le o indice prs.json, consulta review/CI/comentarios via gh, atualiza os stages e mostra o proximo passo por PR. Oferece resolver comentarios (com gate antes do push).

6 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use ✓/✗/⏳ para checks (SUCCESS/FAILURE/PENDING).

    line 81

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “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

Mata o "conferir PR diariamente". Lê o índice, cruza com o GitHub, e diz exatamente o que precisa de você.

1. Projeto e índice

source ~/.claude/bin/get-project.sh
PROJECT_NAME="$(get-project-name)"
WF_DIR="$HOME/.claude/workflow/$PROJECT_NAME"
~/.claude/bin/pr-registry.sh list

2. Bootstrap se vazio

Se prs.json não tem PRs (índice novo), ofereça popular a partir das suas PRs abertas:

gh pr list --state open --author @me --json number,title,baseRefName,headRefName,url

Para cada uma, extraia o card da referência que o /pr-open grava (python3 ~/.claude/bin/tracker.py resolve diz o kind da org):

gh pr view <n> --json title,body -q '.title + "\n" + .body' > "$WF_DIR/.pr-text"
grep -oiE 'AB#[0-9]+' "$WF_DIR/.pr-text" | grep -oE '[0-9]+' | head -1            # ado
grep -oE "\b$PREFIX-[0-9]+\b" "$WF_DIR/.pr-text" | head -1                         # jira / linear

PREFIX é o project (Jira) ou o team (Linear) do tracker. Linear sem team: procure [A-Z][A-Z0-9]*-[0-9]+ e confirme a chave com o usuário (casa também UTF-8, ISO-9001).

Com o ID, REF=$(python3 ~/.claude/bin/tracker.py ref "<id>") dá kind e url. Registre com pr-registry.sh register <n> <branch> <base> <título> <url> <kind> <id> <card_url> (sem card, sem os três últimos). Avise quais PRs entraram vinculadas e quais ficaram sem card (referência ausente — normal em PRs antigas).

3. Inspecionar cada PR

Para cada PR do índice:

# se o PR sumiu (merged/closed), remova do indice e registre no digest
STATE=$(gh pr view <pr> --json state -q .state 2>/dev/null || echo GONE)
  • MERGED → pr-registry.sh remove <pr>, marque no digest como concluída.
  • CLOSED → idem, marque como fechada sem merge.
  • Aberta → ~/.claude/bin/pr-inspect.sh <pr> e derive o stage:
Condição (do pr-inspect)stagePróximo passo
reviewDecision=CHANGES_REQUESTED ou unresolved>0changes_requestedvocê: resolver comentários
reviewDecision=APPROVED + checks=SUCCESS + mergeable=MERGEABLEmerge_readyvocê: mergear
reviewDecision=APPROVED (checks pendente/falho)approvedaguardar CI
checks=FAILURE(mantém)você: CI vermelho
resto (REVIEW_REQUIRED)awaiting_reviewaguardar review

Atualize o índice: pr-registry.sh set-stage <pr> <stage>.

4. Digest

Ordene por urgência (o que precisa de você primeiro). Formato:


PRs em voo — PROJECT_NAME

🔴 #<n> <título> — changes_requested · <card> 2 comentários não resolvidos · CI: ✓ · base: release/3.11.0/main → resolver comentários

🟡 #<n> <título> — awaiting_review · <card> aguardando review · CI: ✓

🟢 #<n> <título> — merge_ready · <card> aprovada, CI verde → pronta pra merge

(concluídas nesta rodada: #<n> merged)

Use ✓/✗/⏳ para checks (SUCCESS/FAILURE/PENDING). <card> vem do tracker do índice: AB#<id> no ADO, a chave no Jira/Linear; tracker null → "sem card".

5. Resolver comentários (gate)

Se houver PRs em changes_requested, pergunte: "Quer que eu resolva os comentários da PR #<n>?"

Se sim, para essa PR:

  1. git fetch && git checkout <branch da PR do índice>.
  2. Liste os unresolved do pr-inspect (path/line/author/body). Para cada um, entenda o pedido lendo o código real no path:line.
  3. Aplique as correções com a menor superfície possível. Rode testes relevantes do pacote afetado (make test PKG=<pkg>).
  4. Pare e mostre o diff. Não commite nem faça push sem OK explícito do usuário — regra de compliance.
  5. Após aprovação: commit (conventional) + push. Ao responder na thread, use mcp azure-devops/gh só se o usuário pedir; por padrão o push já dispara a notificação nativa GitHub→Slack.

Nunca resolva a thread no GitHub por conta própria — quem resolve é o revisor.

6. Merge

Nunca mergeie automaticamente. Para PRs em merge_ready, apenas sinalize. Se o usuário pedir explicitamente o merge, confirme base e método antes.

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.