Moar claude skillz, refinements, factorings and extensions#428
Moar claude skillz, refinements, factorings and extensions#428
claude skillz, refinements, factorings and extensions#428Conversation
There was a problem hiding this comment.
Pull request overview
Adds and refines in-repo “claude” skill definitions and supporting repo config to improve workflows around testing, PR description drafting, commit message generation, and git worktree lifecycle management.
Changes:
- Add new skills:
/run-tests,/pr-msg,/open-wkt,/close-wkt, plus a PR description format reference. - Extend
/commit-msgskill with worktree awareness and review/regression context handling. - Update repo ignore rules and
.claude/settings.local.jsonpermissions to support the new skill workflows.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.gitignore |
Adds ignore rules for generated commit/PR message artifacts (needs alignment with new worktree + pr-msg outputs). |
.claude/skills/run-tests/SKILL.md |
New test-running skill guide and command construction rules. |
.claude/skills/pr-msg/format-reference.md |
Canonical cross-forge PR description template and linking strategy. |
.claude/skills/pr-msg/SKILL.md |
New PR description generation workflow (path conventions need to match .gitignore/reference). |
.claude/skills/open-wkt/SKILL.md |
New worktree lifecycle skill spec (expects .gitignore support for .claude/wkts/). |
.claude/skills/close-wkt/SKILL.md |
New worktree teardown skill spec. |
.claude/skills/commit-msg/SKILL.md |
Enhances commit message workflow with worktree + review/regression context + GH comment patching. |
.claude/settings.local.json |
Broadens allowed tool invocations to support new skills. |
.claude/ai_notes/docs_todos.md |
Adds internal notes on improving docs example synchronization. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.claude/skills/commit-msg/SKILL.md
Outdated
| root and `git rev-parse --git-common-dir` to check | ||
| if the cwd is inside a worktree. If the common-dir | ||
| differs from the git-dir, you are in a worktree. | ||
| Tell the user which tree you're operating on | ||
| (e.g. "generating commit msg for worktree | ||
| `remote-exc-registry-tests`"). |
There was a problem hiding this comment.
Step 0 says to detect a worktree by comparing git rev-parse --git-common-dir with --git-dir, but the instructions only tell the agent to run --git-common-dir. Add git rev-parse --git-dir (or adjust the wording) so the worktree check is actually actionable/correct.
| root and `git rev-parse --git-common-dir` to check | |
| if the cwd is inside a worktree. If the common-dir | |
| differs from the git-dir, you are in a worktree. | |
| Tell the user which tree you're operating on | |
| (e.g. "generating commit msg for worktree | |
| `remote-exc-registry-tests`"). | |
| root, then run both `git rev-parse --git-common-dir` | |
| and `git rev-parse --git-dir` to check if the cwd is | |
| inside a worktree. If the common-dir differs from the | |
| git-dir, you are in a worktree. Tell the user which | |
| tree you're operating on (e.g. "generating commit msg | |
| for worktree `remote-exc-registry-tests`"). |
.claude/skills/run-tests/SKILL.md
Outdated
| | `-k <expr>` | pytest keyword filter | | ||
| | `-v` / `-vv` | Verbosity | | ||
| | `-s` | No output capture (useful with `--tpdb`) | | ||
| | `--timeout <secs>` | Override default 30s test timeout | |
There was a problem hiding this comment.
This skill advertises --timeout <secs> as a supported pytest flag and mentions a “default 30s test timeout”, but the repo doesn’t appear to depend on pytest-timeout (and tool.pytest.ini_options doesn’t configure a timeout). As written, --timeout will error on invocation. Either remove this option from the reference or add the required plugin/dependency and document where the default timeout is defined.
| | `--timeout <secs>` | Override default 30s test timeout | |
| - `.claude/skills/pr-msg/msgs/<timestamp>_<branch>_pr_msg.md` | ||
| * `<timestamp>` from `date -u +%Y%m%dT%H%M%SZ` | ||
| * `<branch>` from `git branch --show-current` | ||
| - `.claude/skills/pr-msg/pr_msg_LATEST.md` |
There was a problem hiding this comment.
The skill says it writes the latest draft to .claude/skills/pr-msg/pr_msg_LATEST.md, but the format reference and .gitignore exception are for msgs/pr_msg_LATEST.md. Align the “latest” output path with the documented post-submission layout (and the ignore rules) so consumers look in the right place and the file has the intended VCS status (tracked vs ignored).
| - `.claude/skills/pr-msg/pr_msg_LATEST.md` | |
| - `.claude/skills/pr-msg/msgs/pr_msg_LATEST.md` |
35038bd to
70a02ed
Compare
- `/commit-msg`: add `--git-dir` alongside `--git-common-dir` so worktree detection is actually actionable. - `/run-tests`: drop `--timeout` flag — project doesn't dep on `pytest-timeout`. - `/pr-msg` + `.gitignore`: fix LATEST path — lives at skill root, not in `msgs/`. Review: PR #428 (copilot-pull-request-reviewer) #428 (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
9697980 to
ca20326
Compare
- `/commit-msg`: add `--git-dir` alongside `--git-common-dir` so worktree detection is actually actionable. - `/run-tests`: drop `--timeout` flag — project doesn't dep on `pytest-timeout`. - `/pr-msg` + `.gitignore`: fix LATEST path — lives at skill root, not in `msgs/`. Review: PR #428 (copilot-pull-request-reviewer) #428 (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
ca20326 to
e4b4caa
Compare
- update skill to write to `.claude/skills/commit-msg/msgs/` - add new path + `_LATEST.md` to `.gitignore` (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
Notes on using sphinx `literalinclude` to auto-sync `docs/README.rst` code examples with actual source files instead of manual duplication. (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
(this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
(this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
Add pre-flight import/collect checks, a mod-to-test mapping table, `--lf` re-run patterns, and a known-flaky test list to avoid wasted investigation time. (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
Detect whether we're in a worktree via `git rev-parse` and write output files relative to the worktree root so `git commit --edit --file` paths always work. Also, - mv backup msgs to `msgs/` subdir under the skill - document the `mkdir -p` step for first-time use (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
Sibling to `/commit-msg` but targeting branch-level patch/pull-request description generation. Designed to work across GitHub, Gitea, SourceHut, and GitLab md renderers. Deats, - `SKILL.md` defines the step-by-step process: auto-detect commit-link base URL from remotes, reference-style `[hash][hash]` linking, Summary / Motivation / Scopes-changed sections, commented-out Links placeholder, raw-md output for copy-paste. - `format-reference.md` documents the canonical PR structure: template, ref-link strategy rationale, commit-URL patterns per service, Python namespace-resolution scope naming convention. - `msgs/` dir ready for generated output. (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
- Hard-wrap all prose to 67 char max in both `SKILL.md` and `format-reference.md`. - Add `<!-- pr-msg-meta` YAML-ish comment block for tracking branch, base, and per-service submission status. - Add cross-references section + ref-link stubs for `github-pr`, `gitea-pr`, `srht-patch` — all commented out at generation time, fillable post-submit. - Add post-submission workflow docs: metadata fill, cross-ref uncomment, per-service subdir copies (`msgs/<service>/<num>_pr_msg.md`), cross-linking. - Add PR/Patch URL patterns table to format ref. - Adjust footer text: "pr content" instead of "pr-msg". - Add `Bash(mkdir *)` to allowed tools. (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
Add `.gitignore` rules for generated commit-msg and pr-msg output files under `.claude/skills/*/msgs/`, but whitelist `pr_msg_LATEST.md` so it stays tracked. (this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
Add `Bash(git remote:*)` to the permissions allow list so `/pr-msg` skill can auto-detect hosting remotes. (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
Codify the workflow expectation that code fixes applied during test iteration stay unstaged; the human drives all `git add` / `git commit` ops and can use `/commit-msg` to generate the msg. (this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
Teach the skill to check for `.claude/review_regression.md` (written by `/code-review-changes` when a self-caused regression is found and fixed) and incorporate `Regressed-by:` + `Found-via:` fields into the commit msg body. Also add a formatting template + example so the subject line describes the actual fix while the trailer carries the regression provenance. (this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
Pre-flight checks now verify that the active Python resolves modules from the worktree's own venv (not the main repo's editable install). Includes a `uv sync` recipe to bootstrap a worktree-local venv when the path is wrong. Deats, - New "Worktree venv detection" subsection before the existing import/collection checks - `tractor.__file__` sniff to detect stale venv - `UV_PROJECT_ENVIRONMENT=py<MINOR> uv sync` recipe auto-detecting the cpython minor version - Explains *why* a wrong venv causes spurious `AttributeError` / `ModuleNotFoundError` - Renames prior heading to "Import + collection checks" for clarity (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
(this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
Teach the skill to look for `.claude/review_context.md` (written by the `/code-review-changes` skill after applying review fixes) and generate a `Review:` trailer block in the commit body. Deats, - New check in step 2 for `review_context.md` extracting `pr`, `reviewer`, `review_url`, and optionally `reply_ids` - New "Review trailer" section in step 3 with format spec, example msg, and `reply_ids` handling instructions - Context file is single-use: deleted after the commit msg is written (this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
Replace the old "informational only" `reply_ids` handling with an automated step 6 that PATCHes GH review comments after the user commits: - Fetch each reply comment body via `gh api` - Swap `📎 commit pending` for a `📎 fixed in [<hash>](<url>)` link - PATCH back and delete `review_context.md` Also allow `Bash(gh *)` in `allowed-tools` so the skill can actually call `gh api`. (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
(this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
In local `.claude/` settings; so basically always allow inter-skill, skills if available to the model. (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
Relax hard-wrap in `SKILL.md` and `format-reference.md` from 67 to 72 chars; drop redundant "same rule as commit-msg" justification text. Also, - add TODO section re: factoring the skill into generic (`~/.claude/skills/pr-msg/`) + repo-specific (`.claude/skills/pr-msg/`) layers, mirroring the `/commit-msg` split. (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
Proto a pair of skills for managed git worktree creation, re-entry, and teardown under `.claude/wkts/<snake_case_name>/`. Deats, - `/open-wkt <name>` creates worktree + `wkt/<name>` branch, writes `.wkt_meta.json` lifecycle metadata, sets `.wkt_active` lock indicator, and optionally fixturizes (venv via `uv sync`). - `/close-wkt [<name>]` shows diffstat/commit log, prompts for removal, cleans up branch. - `claude_wkts` convenience symlink at repo root for easy fs nav. - re-entry protocol w/ staleness detection on the `.wkt_active` file (1hr threshold). Also, - allow `Bash(git:*)` in local settings. (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
Per the new `.claude/wkts` subdir used in the `/open/close-wkt` skill we just added. (this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
Change "72 char max" phrasing to "wrap at 72 chars" with explicit "fill lines to 72 — don't stop short at 50-65" in both `SKILL.md` and `format-reference.md`. (this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
- `/commit-msg`: add `--git-dir` alongside `--git-common-dir` so worktree detection is actually actionable. - `/run-tests`: drop `--timeout` flag — project doesn't dep on `pytest-timeout`. - `/pr-msg` + `.gitignore`: fix LATEST path — lives at skill root, not in `msgs/`. Review: PR #428 (copilot-pull-request-reviewer) #428 (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
- Replace in-repo `SKILL.md` copy with symlink to global `~/.claude/skills/commit-msg/SKILL.md` - Reorg `settings.local.json` perms into grouped sections + add `uv run` entry - Ignore per-skill `conf.toml` in `.gitignore` (this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
e4b4caa to
8a02ce5
Compare
Moar
claudeskillz, refinements, factorings and extensionsSummary
ff977ba2 Add
/pr-msgskill for cross-service PRdescr generation w/ format reference doc, 72-char wrap-to rule,
and ref-link stubs for GitHub/Gitea/sr.ht.
2e1c581e 33ea4155 Extend
/commit-msgw/ worktree detection,
msgs/subdir output, regression-fixctx (
Regressed-by:/Found-via:), review-context trailers,and auto-PATCH of GH review reply placeholders.
fed7735b Add
/run-testsskill forpytestsuiteruns w/ worktree
uvvenv detection and "never auto-commit"rule.
/open-wkt+/close-wktworktreelifecycle skills for ephemeral isolated work.
65f0c0e5 724bb887 bf1b80c3
6fd04298 70a02ed4 Incrementally broaden
.claude/settings.local.jsonallow-rules (grep,tests/,gh pr|api,python3,git remote|stash,ln,uv sync,Skill(run-tests),WebFetchfor research).msgs/dirs and
.claude/worktrees/in.gitignore.ai_notes/docs_todos.mdnoting theSphinx
literalincludeapproach for auto-syncing README codeexamples w/ actual source files.
Motivation
The
claude-codeskill suite fortractorstarted w/ just/commit-msgbut has grown to need a full dev-workflow toolkit:PR descriptions that work across GitHub/Gitea/sr.ht, a test
runner aware of worktree venvs, worktree lifecycle mgmt, and a
review pipeline that round-trips GH PR comments from fetch to
inline reply PATCHes. Each skill was built incrementally as pain
points surfaced during actual dev sessions — this branch collects
all that work into one coherent PR.
The settings allow-rules grew alongside to unblock each new skill
w/o granting blanket shell access, and
.gitignoreadditionskeep ephemeral
msgs/output and worktree dirs from clutteringthe tree.
Scopes changed
ff977ba2
.claude.skills.pr-msg— new skill w/SKILL.md+format-reference.mdcovering cross-service PRdescr generation, md ref-link strategy, and 72-char wrap-to
rules.
2e1c581e 33ea4155
.claude.skills.commit-msg.SKILL.md— worktree detection(step 0),
msgs/subdir output (step 4),Regressed-by:/Found-via:block (step 3),Review:trailer fromreview_context.md(step 3), auto-PATCH of GH review replycomment placeholders (step 6).
fed7735b
.claude.skills.run-tests— new skillw/
pytestinvocation, worktreeuvvenv detection, "neverauto-commit" rule, and dev-workflow helpers.
.claude.skills.open-wkt+.claude.skills.close-wkt— worktree lifecycle: create/enter(
/open-wkt) and summary/teardown (/close-wkt)..claude/settings.local.json— incremental allow-rules forgrep,tests/,gh pr|api,python3,git remote|stash,ln,uv sync,Skill(run-tests),WebFetchdomains..gitignore—ignore
**/msgs/under skill dirs and.claude/worktrees/..claude.ai_notes.docs_todos— notes onusing Sphinx
literalincludeto auto-sync README code blocks.TODOs
tractor/trio-specific Python coding skill — arework of dhirschfeld's
anyiocoding guideadapted for the
tractorstructured-concurrency stack. Covertriotask groups, cancel scopes,tractorctx streaming,MsgStreamusage,msgspec.Structpatterns, and conventionsaround
Portal,Context, and actor-nursery lifecycle./pr-msginto generic + repo-specific layers (samesplit pattern as
/commit-msgw/style-guide-reference.md)./pr-msgoutput w/gish edit --ai-draftflowfor seamless AI-draft-then-editor PR description workflow.
(this pr content was generated in some part by
claude-code)