Skip to content

Add /gc and /pr skills for commit and PR creation#38

Merged
Jason-Adam merged 2 commits intomainfrom
jasonadam.20260329.add-gc-and-pr-skills
Mar 29, 2026
Merged

Add /gc and /pr skills for commit and PR creation#38
Jason-Adam merged 2 commits intomainfrom
jasonadam.20260329.add-gc-and-pr-skills

Conversation

@Jason-Adam
Copy link
Copy Markdown
Owner

@Jason-Adam Jason-Adam commented Mar 29, 2026

Summary

Adds two new autodidact skills ported from crsdigital-skills, with modifications to fit autodidact's 5-section skill format and avoid naming collisions with Claude's built-in /commit command.

Changes

  • skills/gc/skill.md + commands/gc.md: Autonomous git commit skill — auto-branches from main, groups changes into atomic commits, imperative mood messages, never asks for confirmation
  • skills/create-pr/skill.md + commands/pr.md: PR creation skill — respects existing repo PR templates (checks multiple locations), falls back to a slim inline default without creating template files in the repo
  • src/router.py: Added Tier 0 patterns, Tier 2 keywords, model mapping (sonnet), and _AUTODIDACT_SKILLS entries for both new skills
  • install.py: Added gc and create-pr to SKILL_DIRS, gc.md and pr.md to COMMAND_FILES
  • tests/test_router.py: 8 new tests covering pattern matching and keyword routing (61 total, all pass)
  • CLAUDE.md: Updated skill/command counts (12→14 skills, 15→17 commands)

Test Plan

  • uv run python3 -m pytest tests/test_router.py -v — 61 tests pass
  • Pre-commit hooks pass (ruff, ruff format, mypy)
  • Run ./install and verify /gc and /pr commands appear in Claude Code

🤖 Generated with Claude Code

Implements two new skills ported from crsdigital-skills:
- /gc: autonomous git commit with auto-branching from main, atomic
  commits, and no confirmation prompts
- /pr: PR creation that respects existing repo templates and falls
  back to a slim inline default (no template file creation)

Updates router with Tier 0 patterns, Tier 2 keywords, model mapping,
and skill qualification. Adds 8 new router tests (61 total, all pass).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Jason-Adam Jason-Adam self-assigned this Mar 29, 2026
Copilot AI review requested due to automatic review settings March 29, 2026 08:03
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds two new Autodidact skills (/gc for autonomous git commits and /pr for PR creation) and wires them into the router, installer, command entrypoints, tests, and docs so they can be invoked deterministically and installed globally.

Changes:

  • Added new skills and user-facing commands: gc (commit creation) and create-pr (PR creation via gh)
  • Updated src/router.py to route Tier 0 patterns and Tier 2 keyword heuristics to the new skills (plus model mapping and qualification)
  • Extended installation lists and added router tests covering the new routes

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
skills/gc/skill.md New 5-section skill defining autonomous commit workflow with branch safety and atomic commits
skills/create-pr/skill.md New 5-section skill defining PR creation workflow, including PR template discovery and gh pr create usage
commands/gc.md New /gc entrypoint that delegates to autodidact-gc
commands/pr.md New /pr entrypoint that delegates to autodidact-create-pr
src/router.py Adds Tier 0 patterns + Tier 2 keywords and includes both skills in autodidact qualification + model map
install.py Installs the new skill directories and command files (gc.md, pr.md)
tests/test_router.py Adds Tier 0 and Tier 2 routing tests for gc and create-pr
CLAUDE.md Updates documented skill/command counts to reflect the new additions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Remove bare "pr" keyword (weight 0.5) from create-pr — too broad,
  causes false-positive routing on informational queries. Replace with
  "submit pr" which requires clear intent.
- Tighten Tier 0 regex from create.?pr to create[-\s]?pr to prevent
  matching createXpr.
- Detect default branch dynamically in create-pr skill instead of
  hardcoding "main" — uses git symbolic-ref with main fallback.
- Auto-commit uncommitted changes in create-pr instead of asking
  for confirmation — matches /gc's autonomous contract.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Jason-Adam Jason-Adam merged commit 113102f into main Mar 29, 2026
3 checks passed
@Jason-Adam Jason-Adam deleted the jasonadam.20260329.add-gc-and-pr-skills branch March 29, 2026 08:20
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.

2 participants