Skip to content

Commit 18b89f7

Browse files
3243dwonclaude
andcommitted
feat: make pr-vibe-check an AI Gen Z roaster (severity soft|normal|brutal)
Replace the rule-based hygiene scorer with the canonical design: a Claude-powered Gen Z vibe check that posts THE VIBE / SLAY MOMENTS / L MOMENTS / VERDICT / RATING. Requires anthropic-api-key; adds severity (soft|normal|brutal) and model inputs; outputs rating + severity. Keeps the engineering: dependency injection, self-updating (upsert) comment, native-fetch Anthropic client, unit + mocked-toolkit tests, CI, and release automation. Restyles the three social cards to the roaster. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 39af587 commit 18b89f7

23 files changed

Lines changed: 807 additions & 1312 deletions

.github/workflows/vibe-check.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
name: Vibe Check
22

33
# Dogfooding: pr-vibe-check vibe-checks its own pull requests.
4+
# Requires an ANTHROPIC_API_KEY secret on the repo. The job no-ops on PRs from
5+
# forks (where secrets aren't available) so it never fails a contributor's PR.
46
on:
57
pull_request:
6-
types: [opened, synchronize, reopened, edited]
8+
types: [opened, synchronize, reopened]
79

810
permissions:
911
contents: read
@@ -12,11 +14,11 @@ permissions:
1214
jobs:
1315
vibe:
1416
runs-on: ubuntu-latest
17+
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
1518
steps:
1619
- uses: actions/checkout@v4
17-
# Use the local action while developing; switch to 3243dwon/pr-vibe-check@v1 in other repos.
20+
# Use the local action while developing; switch to 3243dwon/pr-vibe-check@v1 elsewhere.
1821
- uses: ./
1922
with:
20-
mode: hygiene
21-
# mode: both
22-
# anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
23+
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
24+
severity: normal

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ See [.github/workflows/release.yml](.github/workflows/release.yml).
6868
## Code notes
6969

7070
- Plain CommonJS, no build step for `src/` other than the `ncc` bundle.
71-
- Keep `src/scorer.js` **pure** (no I/O) — that's what makes it easy to test. New scoring rules go there with a matching test in `test/scorer.test.js`.
72-
- I/O and the GitHub/Anthropic calls live in `src/index.js`, behind dependency injection so `test/local-run.js` can mock them.
71+
- Keep `src/vibe.js` **pure** (no I/O) — prompts, diff summary, comment rendering, rating parsing. That's what makes it easy to test; new logic goes there with a matching test in `test/vibe.test.js`.
72+
- `src/anthropic.js` is the Claude call (native `fetch`); `src/index.js` wires up GitHub. Both take their dependencies via injection so `test/local-run.js` can mock `@actions/core`, `@actions/github`, and `fetch`.
7373

7474
## Pull request checklist
7575

LAUNCH.md

Lines changed: 48 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -1,159 +1,100 @@
1-
# 🚀 Launch kit
1+
# 🚀 Launch kit — pr-vibe-check
22

3-
Copy-paste assets for shipping **PR Vibe Check**. Tweak the voice to taste.
3+
Copy-paste assets for shipping the Gen Z vibe checker. Tune the voice to taste.
4+
5+
> Part of a 4-repo launch (pr-vibe-check · vibe-translator · forensic-read · clear-eye). pr-vibe-check is the **lead/viral** play — funniest, novel category, lowest barrier to "share this."
46
57
---
68

7-
## 1. The demo GIF (do this first — it's 80% of the conversion)
9+
## 1. The demo GIF (do this first — it's 80% of conversion)
10+
11+
A 6–8s loop of a PR getting roasted is the single highest-leverage asset.
812

9-
A 6–8 second loop of a PR getting its vibe comment is the single highest-leverage asset. Recipe:
13+
1. Throwaway repo, add the workflow + an `ANTHROPIC_API_KEY` secret.
14+
2. Open one **mid** PR (`fix`, no description, huge diff) and watch a `brutal` vibe check land.
15+
3. Record with [Kap](https://getkap.co) / [LICEcap](https://www.cockos.com/licecap/). Crop tight to the comment, end on the rating.
16+
4. Save as `docs/demo.gif`, uncomment the image line near the top of the README.
1017

11-
1. Make a throwaway repo, add `.github/workflows/vibe-check.yml` (the quick-start snippet).
12-
2. Open one **great** PR (good title, description, tests, `Closes #1`) and one **cursed** PR (`fix`, empty body, huge diff).
13-
3. Screen-record the PR page as the comment appears and the score lands. Tools: [Kap](https://getkap.co) or [LICEcap](https://www.cockos.com/licecap/) (both export GIF directly).
14-
4. Keep it **under 8s**, crop tight to the comment, end on the ✨ score.
15-
5. Save as `docs/demo.gif`, then uncomment the image line near the top of `README.md`.
18+
> Lead with a **brutal** roast — "watch Claude ratio a bad PR" is more shareable than a polite one.
1619
17-
> Pro tip: lead with the **cursed → fixed** transition. "Watch a 💀 PR become ✨" is more shareable than a single happy path.
20+
Ready-made stills are committed (see §2), and a static example lives at [docs/example-comment.md](docs/example-comment.md).
1821

19-
A static fallback already exists at [docs/example-comment.md](docs/example-comment.md) — generated live by `npm run test:local`.
22+
---
2023

21-
### Ready-made card images
24+
## 2. Ready-made card images
2225

23-
Three 1280×640 PNGs are committed and ready to drop into the PH gallery, a tweet, or the repo's social preview (each has an editable `.svg` beside it):
26+
Three 1280×640 PNGs (each with an editable `.svg`) — drop into the PH gallery, a tweet, or the repo's social preview:
2427

2528
| Asset | Use |
2629
| :-- | :-- |
27-
| [docs/social-card.png](docs/social-card.png) | Default hero (dark). Set it at **Settings → General → Social preview**. |
28-
| [docs/social-card-cursed.png](docs/social-card-cursed.png) | The "before" — a 💀 18/100 PR. Pair with the default for a before→after slide. |
29-
| [docs/social-card-light.png](docs/social-card-light.png) | Cream/light theme, for light backgrounds. |
30-
31-
To re-export after editing an `.svg`: open it in any browser and screenshot at 1280×640, or use a converter (`rsvg-convert -w 1280 -h 640`, or `npx sharp-cli -i card.svg -o card.png`).
30+
| [docs/social-card.png](docs/social-card.png) | Default hero (a `normal` 7/10 roast). Set at **Settings → Social preview**. |
31+
| [docs/social-card-cursed.png](docs/social-card-cursed.png) | A `brutal` 2/10 roast — the "before". |
32+
| [docs/social-card-light.png](docs/social-card-light.png) | Cream/light theme. |
3233

33-
---
34-
35-
## 2. Badges (already wired into the README)
36-
37-
The shareable one for *other people's* repos:
34+
Badge for other people's repos:
3835

3936
```markdown
40-
[![vibe checked](https://img.shields.io/badge/PRs-vibe%20checked-purple)](https://github.com/3243dwon/pr-vibe-check)
37+
[![vibe checked](https://img.shields.io/badge/PRs-vibe%20checked-ff69b4)](https://github.com/3243dwon/pr-vibe-check)
4138
```
4239

43-
Put "add this badge to your repo" in your launch post — badges are free distribution.
44-
4540
---
4641

4742
## 3. Product Hunt
4843

49-
**Name:** PR Vibe Check
50-
51-
**Tagline** (≤60 chars):
52-
> Give every pull request a vibe score — and know why ✨
53-
54-
**Alternates:**
55-
> A friendly 0–100 vibe score for every pull request
56-
> Vibe-check your PRs before your teammates do
44+
**Tagline (≤60):** `A Gen Z code reviewer that vibe-checks your PRs 🔥`
5745

5846
**Description:**
59-
> PR Vibe Check is a GitHub Action that scores every pull request 0–100 on the stuff reviewers actually care about: a clear title, a real description, small size, a tight blast radius, tests, and a linked issue. It drops one self-updating comment explaining the score — playfully.
60-
>
61-
> Zero config and no API key to start. Want more? Flip on AI mode and Claude adds a one-line "vibe read" of the diff. Optionally gate merges with `fail-under`.
62-
>
63-
> It's not a replacement for human review — it's the friendly nudge that makes the human review easier.
64-
65-
**First comment (from you, the maker):**
66-
> Hey Product Hunt! 👋
67-
>
68-
> I kept opening PRs titled "fix" with no description and a 2,000-line diff, then wondering why review took forever. So I built the nudge I needed: a GitHub Action that gives each PR a 0–100 *vibe score* and tells you exactly why.
69-
>
70-
> It's free and zero-config — paste 6 lines of YAML and you're done. There's an optional AI mode (Claude reads the diff) if you want a vibe read too.
71-
>
72-
> The whole thing is open source and MIT. I'd love feedback on the scoring rubric — what would *you* reward or punish in a PR? 💜
47+
> Your CI checks types. It doesn't check *vibes*. PR Vibe Check is a GitHub Action that reads your pull request with Claude and posts one honest, very online comment: THE VIBE, SLAY MOMENTS, L MOMENTS, a verdict, and a rating out of 10. The technical read is real — the Gen Z wrapper just makes people actually read it. Three severities: soft, normal, brutal.
7348
74-
**Topics:** Developer Tools · GitHub · Open Source · Productivity · Artificial Intelligence
49+
**First comment (maker):**
50+
> Hey PH 👋 I kept opening PRs titled "fix" with a 2,000-line diff and no description, so I built the code reviewer I deserved: it roasts (or hypes) your PR with Claude. `severity: brutal` is not for the weak. Free + open source, ~a cent per check. Roast my repo in the comments 🔥
7551
76-
**Gallery captions:**
77-
1. "One comment. One score. Instant context." *(the demo GIF)*
78-
2. "Six checks, 100 points — small, tested, well-described PRs win."
79-
3. "Optional AI mode: Claude reads the diff and gives a vibe read."
80-
4. "Gate merges with `fail-under` — or just vibe."
81-
82-
**Launch timing:** Post 12:01am PT (Product Hunt's day starts then). Tuesday–Thursday convert best. Line up 5–10 people to check it out in the first hour.
52+
**Topics:** Developer Tools · GitHub · AI · Open Source
8353

8454
---
8555

8656
## 4. Show HN
8757

88-
**Title:**
89-
> Show HN: PR Vibe Check – a GitHub Action that scores your pull requests 0–100
58+
**Title:** `Show HN: PR Vibe Check – a Gen Z code reviewer for your PRs, powered by Claude`
9059

9160
**Body:**
92-
> I built a GitHub Action that posts a single comment on each PR with a 0–100 "vibe score" — based on title clarity, description, diff size, files touched, tests, and whether an issue is linked.
93-
>
94-
> It's zero-config (no API key) for the rule-based score. There's an optional mode where Claude reads the diff and adds a short verdict. You can also fail the check below a threshold to gently gate merges.
61+
> A GitHub Action that posts a vibe check on each PR — THE VIBE / SLAY MOMENTS / L MOMENTS / verdict / rating. The slang is a wrapper; under it Claude actually reads the diff and the technical observations are real. Severity is configurable (soft/normal/brutal). It updates a single comment instead of spamming. ~$0.002–0.02 per PR. Open source, MIT.
9562
>
96-
> The scoring is deliberately simple and transparent (six checks, source in `src/scorer.js`). I'd genuinely like to argue about the rubric — what belongs in a "good PR" heuristic, and what's noise?
97-
>
98-
> Code + rubric: https://github.com/3243dwon/pr-vibe-check
99-
100-
> HN note: be ready to defend the rubric and respond fast in the first 2 hours. Lead with the source link, not marketing.
63+
> Repo: https://github.com/3243dwon/pr-vibe-check
10164
10265
---
10366

10467
## 5. X / Twitter thread
10568

106-
**1/**
107-
> Every PR titled "fix" with no description and a 1,500-line diff is a tiny act of violence against your reviewer.
108-
>
109-
> So I built PR Vibe Check: a GitHub Action that scores each PR 0–100 and tells you why. ✨
110-
>
111-
> [demo gif]
112-
113-
**2/**
114-
> Zero config. No API key. 6 lines of YAML:
115-
>
116-
> ```yaml
117-
> - uses: 3243dwon/pr-vibe-check@v1
118-
> ```
119-
>
120-
> Open a PR → get a vibe comment. That's it.
69+
1. your CI checks types. it doesn't check vibes. so I fixed that 🔥 [GIF]
70+
2. PR Vibe Check reads your PR with Claude and posts: THE VIBE, 🔥 SLAY MOMENTS, 💀 L MOMENTS, a verdict, a rating /10. the roast is funny, the technical read is real.
71+
3. 6 lines of YAML + an API key. `severity: soft | normal | brutal`. brutal is not for the weak.
72+
4. free, open source, ~a cent a check ⭐ https://github.com/3243dwon/pr-vibe-check
12173

122-
**3/**
123-
> The score is 6 transparent checks: title, description, size, focus, tests, linked issue.
124-
>
125-
> 💀 Cursed → ✨ Immaculate. No black box — the rubric is ~120 lines of plain JS.
74+
---
12675

127-
**4/**
128-
> Want magic? Flip on AI mode and Claude reads the diff for a one-line vibe read.
129-
>
130-
> Want discipline? `fail-under: 50` blocks merges below a score.
76+
## 6. Reddit
13177

132-
**5/**
133-
> Free, open source, MIT.
134-
>
135-
> ⭐ https://github.com/3243dwon/pr-vibe-check
136-
>
137-
> Tell me what your rubric would reward 👇
78+
- **r/programmerhumor** — lead with a screenshot of a brutal roast (this is the home-run subreddit for this repo)
79+
- **r/programming, r/ClaudeAI, r/SideProject** — the Show HN copy, lead with the GIF, mention it's open source
13880

13981
---
14082

141-
## 6. Reddit (r/github, r/programming, r/devops)
83+
## 7. Hook lines (steal these)
14284

143-
**Title:**
144-
> I made a free GitHub Action that gives your pull requests a 0–100 "vibe score"
145-
146-
**Body:** short version of the Show HN post + the demo GIF. Reddit hates anything that smells like marketing — lead with the rubric and the fact that it's open source, ask for critique of the scoring.
85+
- "Your CI checks types. Does it check vibes?"
86+
- "Claude read your PR. It has notes. 💀"
87+
- "`severity: brutal` is not for the weak."
14788

14889
---
14990

150-
## 7. Launch-day checklist
91+
## 8. Launch-day checklist
15192

15293
- [ ] Record `docs/demo.gif`, uncomment it in the README
153-
- [ ] `npm run all`, commit `dist/`, tag `v1` + `v1.0.0`, push
154-
- [ ] Publish to the [GitHub Marketplace](https://docs.github.com/actions/sharing-automations/publishing-actions-in-github-marketplace) (a release with `action.yml` enables the "Publish" button)
155-
- [ ] Add the "vibe checked" badge to this repo and 2–3 of your other repos
156-
- [ ] Add 3–4 gallery images + the GIF to the Product Hunt draft
157-
- [ ] Schedule the PH post for 12:01am PT, Tue–Thu
158-
- [ ] Post Show HN the same morning; cross-post to Reddit
94+
- [ ] `npm run all`, commit `dist/`, merge the release PR (tags `v1`)
95+
- [ ] Publish to the [Marketplace](https://docs.github.com/actions/sharing-automations/publishing-actions-in-github-marketplace) from the release
96+
- [ ] Upload `docs/social-card.png` as the repo social preview
97+
- [ ] Schedule PH for 12:01am PT (Tue–Thu); post Show HN same morning; r/programmerhumor screenshot
15998
- [ ] Reply to every comment in the first 2 hours
99+
100+
*Build was the easy part. Distribution is the product.*

0 commit comments

Comments
 (0)