Skip to content

Add the "reprexes" skill (.claude/skills/reprexes)#42

Open
d-morrison wants to merge 8 commits into
mainfrom
add-reprexes-skill
Open

Add the "reprexes" skill (.claude/skills/reprexes)#42
d-morrison wants to merge 8 commits into
mainfrom
add-reprexes-skill

Conversation

@d-morrison

Copy link
Copy Markdown
Owner

Summary

Adds a project-level Claude Code skill at .claude/skills/reprexes/SKILL.md.

reprexes captures a debugging workflow: when a technical problem is hard to pin down, isolate it into a minimal reproducible example ("reprex") and iterate candidate fixes on that fast, clean loop instead of inside the full application — then port the fix back. Includes the R/Quarto reprex package workflow (reprex::reprex(), venue / session_info / std_out_err).

References: https://r4ds.hadley.nz/workflow-help.html#making-a-reprex, https://reprex.tidyverse.org/.

Vendoring it here makes it available to collaborators and the @claude CI bot in this repo (previously it lived only in a personal user-level config).

🤖 Generated with Claude Code

@d-morrison

Copy link
Copy Markdown
Owner Author

@claude review

@claude

claude Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Claude finished @d-morrison's task in 1m 8s —— View job


Code Review

  • Gather context
  • Read changed files
  • Review CLAUDE.md for repo guidelines (none present)
  • Provide review feedback

This is a well-written skill. The content is accurate, well-organized, and practically useful. A few minor observations:

Strengths

  • The YAML frontmatter is correct: name, description, user-invocable, and allowed-tools are all present and appropriate.
  • The description is specific enough that Claude Code can reliably decide when to auto-invoke this skill.
  • The two-requirements framing (reproducible + minimal) captures the core tension clearly.
  • The step-by-step procedure is concrete — Rscript /tmp/reprex.R and quarto render /tmp/reprex.qmd are exactly the right invocations.
  • The reprex package coverage is accurate: venue options, session_info, std_out_err, wd, the callr note, and the companion helpers (reprex_clean, reprex_rescue, reprex_invert).
  • The non-Unix tempfile()/tempdir() portability note is a thoughtful touch.
  • The "validation bonus" (a missing object/package causes reprex() to error, exposing a non-self-contained example) is a subtle but genuinely useful point.

Minor suggestions

  1. Step 7 wording is slightly contradictory. It says "Delete the scratch file (it lives in /tmp, so it never touches the repo)." — but if it's in /tmp, no deletion is strictly needed (OS clears it). The useful action is just not committing it, which the "Don't" section already covers. Consider trimming to: "If the bug is subtle, consider promoting the reprex into a regression test instead of discarding it." Fix this →

  2. Glob not in allowed-tools. For a typical reprex workflow this is probably fine, but if Claude ever needs to locate related files to understand context (e.g. find which file to port a fix back to), Glob would be blocked. Low risk, but worth considering.

  3. The "Validation bonus" note is buried several indent levels deep inside the reprex::reprex() bullet. It's a strong enough point that surfacing it as a named sub-bullet (e.g. - **Self-containment check:**) would make it easier to spot.

None of these are blocking — the skill is accurate and ready to merge as written. The structural issues are cosmetic.

@d-morrison

Copy link
Copy Markdown
Owner Author

Claude Code CLI (local session) is working on this — paws off until I'm done.

- Add Glob to allowed-tools so the skill can locate files to port fixes back
- Trim redundant /tmp deletion claim in step 7 (don't-commit is the real action)
- Surface the self-containment check as a named sub-bullet

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@d-morrison

Copy link
Copy Markdown
Owner Author

Addressed all three review observations:

  • Glob in allowed-tools — added; the skill can now locate files when porting a fix back.
  • Step 7 wording — trimmed the redundant /tmp deletion claim; it now states the real action (don't commit) and keeps the regression-test suggestion.
  • Validation bonus — surfaced as a named sub-bullet (**Self-containment check:**).

Re-requesting review.

@d-morrison

Copy link
Copy Markdown
Owner Author

@claude review

@claude

claude Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Claude finished @d-morrison's task in 59s —— View job


Code Review

  • Gather context
  • Read updated SKILL.md
  • Verify previous review observations were addressed
  • Check for any new issues
  • Post review feedback

All three observations from the previous review have been addressed correctly:

Glob in allowed-tools ✅ — Added to the frontmatter list alongside Bash, Read, Write, and Edit.

Step 7 wording ✅ — The redundant deletion instruction is gone. Step 7 now reads: "Don't commit the scratch file — keep it in /tmp (or a gitignored scratch path). If the bug was subtle, consider promoting the reprex into a real regression test (testthat) instead of discarding it." Clean and accurate.

Self-containment check visibility ✅ — Surfaced as a named sub-bullet **Self-containment check:**, no longer buried.

One optional nitGrep is absent from allowed-tools, the same class of observation as the previous Glob finding. If Claude needs to search for a symbol when porting a fix back, it would fall back to Bash + shell grep, which works fine. Worth considering if you want the skill to be fully self-contained, but not blocking.

The skill is accurate, well-organized, and ready to merge. No blocking issues.

Copy link
Copy Markdown
Owner Author

Claude Code (remote session, ARDIA sweep) is picking this up — paws off until done.


Generated by Claude Code

Round-2 review nit: Grep was absent from allowed-tools, the same class
of observation as the Glob finding addressed in round 1. Adding it makes
the skill fully self-contained for symbol searches when porting a fix back.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SNxbcZHy5tYHWAzeJ9XL4J
Copilot AI review requested due to automatic review settings June 20, 2026 09:26

Copy link
Copy Markdown
Owner Author

ARD summary (ARDIA sweep)

# Finding Disposition Detail
Round-2 nit: Grep absent from allowed-tools Same class as the Glob nit addressed in round 1 ✅ Address Added Grep to the allowed-tools list. Pushed in c669f4c.

Round-2 review verdict was "ready to merge — no blocking issues". This push re-triggers CI and @claude review.


Generated by Claude Code

@claude

claude Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Claude finished @d-morrison's task in 45s —— View job


Code Review

  • Read updated SKILL.md
  • Verify Grep was added to allowed-tools
  • Check for any remaining issues
  • Post review feedback

Grep in allowed-tools ✅ — Confirmed present in the frontmatter. The full list is now Bash, Read, Write, Edit, Glob, Grep, which covers every tool Claude would plausibly need when working a reprex: running scripts, reading and writing scratch files, and searching for symbols when porting a fix back.

All three rounds of observations have now been addressed:

Round Finding Status
R1 Step 7 wording (redundant /tmp deletion) ✅ Fixed
R1 Glob absent from allowed-tools ✅ Fixed
R1 Self-containment check buried ✅ Fixed (surfaced as **Self-containment check:**)
R2 Grep absent from allowed-tools ✅ Fixed (this push)

No remaining issues. The skill is accurate, well-structured, and complete. Ready to merge.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a repository-level Claude Code skill (reprexes) documenting a lightweight debugging workflow: isolate hard-to-pin-down issues into minimal reproducible examples, iterate fixes in the fast loop, then port the fix back into the full project.

Changes:

  • Added a new user-invocable skill (/reprexes) under .claude/skills/reprexes/.
  • Documented a step-by-step reprex workflow, including data-minimization tactics.
  • Included R/Quarto-specific guidance and reprex::reprex() usage details for sharing clean repros.

Comment on lines +64 to +68
portable path). Put in it, in order:
- the package loads (`library(...)`),
- the minimal data (see tactics below),
- the minimal code that triggers the phenomenon, with a comment marking
where it goes wrong.
Comment on lines +104 to +105
output is destined for a PR comment or an upstream issue. Useful arguments:
- `venue =` — output format:
Previous run failed because the gh-pages branch was being updated by two
PR preview deployments simultaneously, causing Pages CDN to error. No code
change — re-triggering CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SNxbcZHy5tYHWAzeJ9XL4J
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://d-morrison.github.io/qbt/pr-preview/pr-42/

Built to branch gh-pages at 2026-06-20 09:38 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants