A Bug Bash and a Trophy 🏆

Built a competitive leaderboard using Claude Code to drive engagement in our team's monthly bug-squashing initiative, resulting in a 154% increase in pull requests.

By Katia Wheeler ·

A Bug Bash and a Trophy 🏆

A little competition is healthy. Every month, we host a day devoted to squashing bugs — all product work is supposed to stop (within reason) as we focus solely on quick wins within our codebases. I recently decided to try my hand at vibe coding with Claude Code to spin up a very quick, very simple leaderboard to promote more engagement with our Bug Bash.

Example Bug Bash ran recently at Shop

The logic

The leaderboard shows individual and team contributions to the Bug Bash. Bug Bashes are organized via a GitHub label that’s added to each pull request — our format is YYYY-MM-Bug-Bash. The logic to calculate the leaderboard is as follows:

  • Grab a list of the last 6 valid labels for the Bug Bash (to pull in last 6 months of data)
  • For each PR, grab the author and the GitHub teams that author belongs to
  • Tally up the closed and open PRs and present them for the individual
  • Add that individuals contributions to their teams score as well — this is the tricky part

The most difficult part is mapping team members to their team. I work for Shop which is a part of Shopify — it’s a big organization with lots of sub teams. Because of this, users belong to multiple teams and I needed to figure out which team within the Shop sub-org they were contributing to, and in order to do that I took advantage of our usage of CODEOWNERSfiles.

If you’re not familiar with them, CODEOWNERSfiles are plain text files that allow you to assign specific teams to areas of code. For the purpose of our Bug Bash Dash, I was able to see which teams contributed to the repos that we were pulling PRs from (Shop-owned repos) and then have a subset of possible teams a PR author could belong to. This made mapping to the correct team much easier!

The effect

We just used this leaderboard in our last Bug Bash and I have to say, we saw a major engagement jump with the competition element — ~154% increase in the bugs squashed 🐛 (79 PRs in September versus 31 PRs in August). It’s definitely something we’ll continue to utilize. Winners of the Bug Bash are slated to win a hoodie at the end of the year and winning teams are getting awarded bragging rights, so a win-win for all!

The after effect

There are many improvements that could be made to this dash — it’s slow, clunky, and not the most performant way of calculating these stats — however, I wanted to use this leaderboard idea as an experiment for myself where I did the following:

  • Vibe coded only — I only prompted Claude Code to make product changes but didn’t actually open the IDE myself to view code
  • Static site (no frameworks) — we have an internal tool where we can spin up static sites quickly so it had to be a static HTML/CSS/JS site
  • 1 hour time limit — let’s face it, we all are busy and I needed to get back to my product work as well so I time-boxed this vibe code session 😅

If you’re curious, I’ve pushed the code to this repo and made it generic — feel free to pull it and fill in the missing bits (like your GitHub org name and team names) and use it yourself! Details are in the README.

Originally published on Medium.