pr-to-slack
Skill0 starsChanged 29 days agoMITView on GitHub
Create or reuse Bitbucket Cloud pull requests, assign configured reviewers, request review through connected Slack tools, and announce only after a verified clean review for unchanged commits. Use when the user explicitly asks to publish or send PRs; ordinary code review does not send messages.
In this repository2 other files it gives its agents.
- create-branchSkill
- pr-dev-acceptanceSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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
- Distinctive: line 30
Read recent review-channel messages.
- Distinctive: line 38
Keep following the same review thread during the active run.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Deliver PRs through Slack
The authorized delivery is: prepare the requested PR batch, assign the configured reviewers, request analysis in the configured review channel, and announce the overall change in the configured announcement channel only after a clean result. Settings and identities belong to the consuming team's private configuration. See setup and the example review protocol.
A request to send PRs authorizes that delivery for those PRs. Creating or editing this skill authorizes only skill work. Preview requests stop at preview. Do not add commits, merges, deployments, unrelated recipients or retrospective edits to old messages. Match the user's project language and channel conventions.
Establish scope and access
Resolve repositories and source branches from the conversation and Git remotes. Include paired repositories only when established by the request. Inspect the published diff and matching validation evidence before writing factual PR titles and descriptions. Report only validation that applies to the published commits. Omit attribution trailers.
Confirm the connected Slack tools can read, send and verify messages before creating PRs that require a Slack review request. Without them, prepare the descriptions and report the missing connection. Do not substitute a copied Slack token, background daemon or another identity.
The local worktree must be clean and the intended source commit must exist remotely. Do not silently omit dirty or unpushed work or claim it is published. A send request may authorize a normal push of existing requested commits; commits and force-pushes require their own explicit authorization. Report divergent history before proceeding.
Prepare and publish the PR batch
Save the request and outputs under the owning task's private artifact directory, using current/ and a sibling archive/ for prior runs. Never store real requests in this public skill repository. Use UTF-8 JSON rather than interpolating multiline descriptions into shell commands.
Run scripts/prepare_prs.py --request <request.json> --output <plan.json> to inspect, then add --apply with a separate handoff output for authorized writes. The helper creates a missing PR or reuses the matching open source/destination pair. It preserves existing reviewers, adds missing configured reviewers and verifies the returned PR and commits. Do not reuse merged or declined PRs. Exclude an author from reviewing their own PR before creation when required by the provider.
An unknown PR-write outcome requires inspecting the exact branch pair before retrying. Save the applied, verified handoff, including canonical PR URLs and source/destination commits.
Request review exactly once
Read recent review-channel messages. Reuse an existing thread for the identical PR URLs and source commits rather than duplicating an analysis request. A fresh review of the same commits needs the user's request.
Post one top-level message for the whole batch, with each canonical PR URL on its own line. Capture the returned channel ID and exact parent timestamp. Save the intended text. Read the thread back to verify its URLs and formatting. If a send times out, inspect the channel before retrying; never blindly repost.
When a connector adds an unwanted footer, use its documented edit operation on that newly sent message, then read it back. Preserve the original timestamp, replies and exact URL targets. If Markdown conversion collapses URL lines, use explicit [URL](URL) links and hard line breaks when supported. Do not delete/repost as a formatting workaround. Claim delivery only after verification.
Wait for the correlated result
Keep following the same review thread during the active run. Poll about every two minutes for at most an hour, using short interruptible waits when the harness requires progress updates. Save each fresh thread snapshot and run scripts/check_review.py --handoff <handoff.json> --thread <thread.txt>.
The included parser supports only its documented example protocol. It must be adapted to the consuming bot's actual contract before automatic announcements. Only the configured trusted bot, the current job and exact PR set can supply the result. A status of completed, zero published comments, or a human saying "looks good" does not establish zero outstanding findings. Unknown or incomplete formats require inspection.
waiting: continue bounded polling. Report persistent access failure or timeout with the thread link.findingsorneeds_attention: stop and report the reason. Do not announce, suppress findings or automatically repair code.clean: re-read PR metadata to verify that both source and destination commits still match the reviewed handoff. The helper blocks stale results.
Before the announcement, check the announcement channel for the same PR URL set at those source commits and the saved delivery record. If already announced, reuse its message link. Otherwise send the helper's escaped overall summary and plain canonical URL lines once. Verify the new message with the same send/read or send/edit/read sequence. Read before retrying any timed-out write.
Return the PR links, reviewer assignments, review-thread link, verdict and announcement link when sent. A clean bot result does not replace human reviewer approval for downstream acceptance.
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
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.

