Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rails-consultant",
"description": "A collection of skills for Rails development and consulting, with an emphasis on learning, communication, and client success",
"version": "1.5.1",
"version": "2.0.0",
"author": {
"name": "thoughtbot"
},
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
evals/results/
25 changes: 25 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
## [Unreleased]

## [2.0.0] - 2026-11-06

- Replace every skill with the stack-agnostic set from
[stevepolitodesign/skills](https://github.com/stevepolitodesign/skills), per
[discussion #57](https://github.com/thoughtbot/rails-consultant/discussions/57).
- Removed, with the nearest replacement:
- `/git-commit`: use `/commit`.
- `/test-driven-development`: use `/implement-with-tdd`.
- `/feature-dev`: use `/slice`, then `/ship`.
- `/socratic-review`: use `/multi-lens-review`, then `/understand` to work
through what it found.
- `/explain`: use `/eli5`, or `/trace` for a flow.
- `/challenge`: use `/rubber-duck`.
- `/hard-news`, `/offboard`, `/prior-art`, `/standup`: no replacement.
- Added: `/ask-claude`, `/commit`, `/diff-explainer`, `/domain-model`, `/eli5`,
`/implement-with-tdd`, `/multi-lens-review`, `/pr`, `/preparatory-refactor`,
`/risk-score`, `/ship`, `/trace`, `/understand`.
- Replaced with new versions: `/rubber-duck`, `/slice`.
- New requirements:
- `/risk-score` runs a Python script, so it needs `python3`.
- `/ship` runs as a Claude Code workflow, so it needs the Workflow tool.
- `/pr` and `/ship` open PRs with `gh`. Other skills use it for PR numbers
and fall back to git without it.
- Add eval cases for every skill under `evals/`.

## [1.5.1] - 2026-07-30

- Fix `/slice` silently losing its examples in a plugin install. Four reads in
Expand Down
381 changes: 260 additions & 121 deletions README.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions evals/commit/leaves-stray-files/case.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
schema_version: "1.1"
name: commit-leaves-stray-files
context:
scaffold_script: fixture.sh
60 changes: 60 additions & 0 deletions evals/commit/leaves-stray-files/fixture.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/usr/bin/env bash
set -euo pipefail

git init -q -b main
git config user.name "Eval User"
git config user.email "eval@example.com"
git config commit.gpgsign false
git config core.excludesFile /dev/null

mkdir -p bin test

cat > bin/greet <<'RUBY'
#!/usr/bin/env ruby
name = ARGV.first || "world"
puts "Hello, #{name}!"
RUBY
chmod +x bin/greet

cat > test/greet_test.rb <<'RUBY'
require "minitest/autorun"

class GreetTest < Minitest::Test
def test_greets_by_name
assert_equal "Hello, Ada!\n", `bin/greet Ada`
end
end
RUBY

git add -A
git commit -q -m "Initial commit"

cat > bin/greet <<'RUBY'
#!/usr/bin/env ruby
shout = ARGV.delete("--shout")
name = ARGV.first || "world"
greeting = "Hello, #{name}!"
puts shout ? greeting.upcase : greeting
RUBY

cat > test/greet_test.rb <<'RUBY'
require "minitest/autorun"

class GreetTest < Minitest::Test
def test_greets_by_name
assert_equal "Hello, Ada!\n", `bin/greet Ada`
end

def test_shout_upcases
assert_equal "HELLO, ADA!\n", `bin/greet --shout Ada`
end
end
RUBY

cat > .env <<'ENV'
GREET_API_KEY=fake-key-for-evals-0000
ENV

cat > scratch.rb <<'RUBY'
puts `bin/greet --shout "Grace Hopper"`.inspect
RUBY
9 changes: 9 additions & 0 deletions evals/commit/leaves-stray-files/graders/criteria.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
type: llm
---

The user asked to commit a --shout flag they added to bin/greet. The working tree also held two untracked files that aren't part of that work: `.env` (holds an API key) and `scratch.rb` (a throwaway script).

PASS if the final report shows the new commit(s) and says, by name, that both `.env` and `scratch.rb` were left uncommitted.

FAIL if the report says either file was committed, leaves either one unmentioned, or asks the user for approval instead of committing.
5 changes: 5 additions & 0 deletions evals/commit/leaves-stray-files/graders/feature-committed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
type: regex
target: { source: file, path: .git/logs/HEAD }
pattern: '\tcommit: '
---
7 changes: 7 additions & 0 deletions evals/commit/leaves-stray-files/graders/no-sweeping-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
type: tool_used
tool: Bash
input_match: '(?:git|\$\w+|\$\{\w+\}) add (?:-A|--all|\.)(?:\s|\\|"|$)|(?:git|\$\w+|\$\{\w+\}) commit(?:\s+--?[\w-]+)*?\s+(?:-[A-Za-z]*a[A-Za-z]*|--all|--amend|--no-verify)(?=\s|\\|"|$)'
min: 0
max: 0
---
5 changes: 5 additions & 0 deletions evals/commit/leaves-stray-files/graders/skill-fired.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
type: tool_used
tool: Skill
input_match: '"skill"\s*:\s*"(?:[\w-]+:)?commit"'
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
type: tool_used
tool: Bash
input_match: '(?:git|\$\w+|\$\{\w+\}) add [^&|;"\\]*(\.env|scratch\.rb)'
min: 0
max: 0
---
8 changes: 8 additions & 0 deletions evals/commit/leaves-stray-files/prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
description: A `.env` and a scratch script in the tree aren't the user's feature work, so they stay uncommitted and get named in the report.
max_turns: 30
timeout_seconds: 600
allowed_tools: [Read, Glob, Grep, Skill]
---

I added a --shout flag to bin/greet. Commit my work.
4 changes: 4 additions & 0 deletions evals/commit/splits-unrelated-changes/case.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
schema_version: "1.1"
name: commit-splits-unrelated-changes
context:
scaffold_script: fixture.sh
74 changes: 74 additions & 0 deletions evals/commit/splits-unrelated-changes/fixture.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#!/usr/bin/env bash
set -euo pipefail

git init -q -b main
git config user.name "Eval User"
git config user.email "eval@example.com"
git config commit.gpgsign false
git config core.excludesFile /dev/null

mkdir -p lib test

cat > README.md <<'EOF'
# Blog

A tiny blog engine. Posts recieve a URL from their title.
EOF

cat > lib/post.rb <<'EOF'
class Post
attr_reader :title

def initialize(title)
@title = title
end

def path
"/posts/#{title}"
end
end
EOF

git add -A
git commit -q -m "Initial commit"

sed -i.bak 's/recieve/receive/' README.md && rm README.md.bak

cat > lib/slug.rb <<'EOF'
module Slug
def self.slugify(text)
text.downcase.strip.gsub(/[^a-z0-9]+/, "-").gsub(/\A-|-\z/, "")
end
end
EOF

cat > lib/post.rb <<'EOF'
require_relative "slug"

class Post
attr_reader :title

def initialize(title)
@title = title
end

def path
"/posts/#{Slug.slugify(title)}"
end
end
EOF

cat > test/slug_test.rb <<'EOF'
require "minitest/autorun"
require_relative "../lib/slug"

class SlugTest < Minitest::Test
def test_replaces_spaces_with_dashes
assert_equal "hello-world", Slug.slugify("Hello World")
end

def test_strips_punctuation
assert_equal "what-s-new", Slug.slugify("What's new?")
end
end
EOF
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
type: llm
focus: trace
---

The user said: "I added a slugify helper so post URLs stop breaking on titles with spaces, and fixed a typo in the README while I was in there."

Look at the commit messages in the `git commit` commands Claude ran.

PASS if every reason given for making the change is the user's (URLs breaking on titles with spaces), or no reason is given. Describing what the code does, its limitations, risks, or what wasn't tested is not a reason and is fine.

FAIL if a message claims the change was made for a reason the user never gave, such as SEO, readability, consistency, performance, or best practice.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
type: tool_used
tool: Bash
input_match: '(?:git|\$\w+|\$\{\w+\}) add (?:-A|--all|\.)(?:\s|\\|"|$)|(?:git|\$\w+|\$\{\w+\}) commit(?:\s+--?[\w-]+)*?\s+(?:-[A-Za-z]*a[A-Za-z]*|--all|--amend|--no-verify)(?=\s|\\|"|$)'
min: 0
max: 0
---
5 changes: 5 additions & 0 deletions evals/commit/splits-unrelated-changes/graders/skill-fired.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
type: tool_used
tool: Skill
input_match: '"skill"\s*:\s*"(?:[\w-]+:)?commit"'
---
10 changes: 10 additions & 0 deletions evals/commit/splits-unrelated-changes/graders/split-correctly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
type: llm
focus: trace
---

Look at the `git add` and `git commit` commands Claude ran.

PASS if README.md (a typo fix) was committed on its own, and lib/slug.rb, lib/post.rb, and test/slug_test.rb were committed together in a separate commit.

FAIL if README.md shares a commit with any lib/ or test/ file, or the test file is in a commit without lib/slug.rb.
6 changes: 6 additions & 0 deletions evals/commit/splits-unrelated-changes/graders/two-commits.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
type: regex
target: { source: file, path: .git/logs/HEAD }
pattern: '\tcommit: '
match: "count:2"
---
10 changes: 10 additions & 0 deletions evals/commit/splits-unrelated-changes/graders/typo-subject-only.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
type: llm
focus: trace
---

Look at the commit message for the README typo fix, in the `git commit` command Claude ran.

PASS if that message is a single subject line, optionally followed by a `Co-Authored-By:` trailer, and nothing else.

FAIL if it has any other body text, such as an explanation of the fix.
8 changes: 8 additions & 0 deletions evals/commit/splits-unrelated-changes/prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
description: A feature plus an unrelated typo fix should become two atomic commits, with only the user's reason in the body.
max_turns: 30
timeout_seconds: 600
allowed_tools: [Read, Glob, Grep, Skill]
---

I added a slugify helper so post URLs stop breaking on titles with spaces, and fixed a typo in the README while I was in there. Commit my changes.
7 changes: 7 additions & 0 deletions evals/commit/undo-question/graders/criteria.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
type: llm
---

PASS if the response answers the question directly with `git reset HEAD~1` (or `git reset --mixed HEAD~1`, or `git reset --soft HEAD~1` noting the changes stay staged).

FAIL if it suggests `git reset --hard`, `git revert` as the way to keep the changes, or makes or offers to make a commit instead of answering.
7 changes: 7 additions & 0 deletions evals/commit/undo-question/graders/skill-not-fired.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
type: tool_used
tool: Skill
input_match: '"skill"\s*:\s*"(?:[\w-]+:)?commit"'
min: 0
max: 0
---
8 changes: 8 additions & 0 deletions evals/commit/undo-question/prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: commit-undo-question
description: A git question that mentions commits shouldn't trigger the skill.
max_turns: 10
allowed_tools: [Read, Glob, Grep, Skill]
---

How do I undo my last git commit but keep the changes in my working tree?
7 changes: 7 additions & 0 deletions evals/diff-explainer/hunk-header-question/graders/criteria.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
type: llm
---

PASS if the response explains that `-12,7` means the hunk starts at line 12 of the old file and covers 7 lines, and `+12,9` means it starts at line 12 of the new file and covers 9 lines.

FAIL if it gets either range wrong, or offers to build a walkthrough or explain a branch instead of answering.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
type: tool_used
tool: Skill
input_match: '"skill"\s*:\s*"(?:[\w-]+:)?diff-explainer"'
min: 0
max: 0
---
8 changes: 8 additions & 0 deletions evals/diff-explainer/hunk-header-question/prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: diff-explainer-hunk-header-question
description: A question about reading `git diff` output shouldn't trigger the skill.
max_turns: 10
allowed_tools: [Read, Glob, Grep, Skill]
---

In `git diff` output, what does a line like `@@ -12,7 +12,9 @@` mean?
4 changes: 4 additions & 0 deletions evals/diff-explainer/named-lens/case.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
schema_version: "1.1"
name: diff-explainer-named-lens
context:
scaffold_script: fixture.sh
Loading
Loading