Skip to content

Moar claude skillz, refinements, factorings and extensions#428

Open
goodboy wants to merge 27 commits intomainfrom
moar_skillz_refinement
Open

Moar claude skillz, refinements, factorings and extensions#428
goodboy wants to merge 27 commits intomainfrom
moar_skillz_refinement

Conversation

@goodboy
Copy link
Copy Markdown
Owner

@goodboy goodboy commented Mar 25, 2026

Moar claude skillz, refinements, factorings and extensions

Summary

  • d4150e3d ca6a03b8 ea0544b9
    ff977ba2 Add /pr-msg skill for cross-service PR
    descr generation w/ format reference doc, 72-char wrap-to rule,
    and ref-link stubs for GitHub/Gitea/sr.ht.
  • de89be8e c0bdd0fd 4621a14d
    2e1c581e 33ea4155 Extend /commit-msg
    w/ worktree detection, msgs/ subdir output, regression-fix
    ctx (Regressed-by: / Found-via:), review-context trailers,
    and auto-PATCH of GH review reply placeholders.
  • 73d83a63 9883252d ef0742cb
    fed7735b Add /run-tests skill for pytest suite
    runs w/ worktree uv venv detection and "never auto-commit"
    rule.
  • 435fa58d Add /open-wkt + /close-wkt worktree
    lifecycle skills for ephemeral isolated work.
  • 847cbab0 d2d949de 3c97d739
    65f0c0e5 724bb887 bf1b80c3
    6fd04298 70a02ed4 Incrementally broaden
    .claude/settings.local.json allow-rules (grep, tests/,
    gh pr|api, python3, git remote|stash, ln, uv sync,
    Skill(run-tests), WebFetch for research).
  • f45f8b31 1c702e27 Ignore skill msgs/
    dirs and .claude/worktrees/ in .gitignore.
  • 5d60fa63 Add ai_notes/docs_todos.md noting the
    Sphinx literalinclude approach for auto-syncing README code
    examples w/ actual source files.

Motivation

The claude-code skill suite for tractor started w/ just
/commit-msg but 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 .gitignore additions
keep ephemeral msgs/ output and worktree dirs from cluttering
the tree.

Scopes changed

  • d4150e3d ca6a03b8 ea0544b9
    ff977ba2 .claude.skills.pr-msg — new skill w/
    SKILL.md + format-reference.md covering cross-service PR
    descr generation, md ref-link strategy, and 72-char wrap-to
    rules.
  • de89be8e c0bdd0fd 4621a14d
    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 from
    review_context.md (step 3), auto-PATCH of GH review reply
    comment placeholders (step 6).
  • 73d83a63 9883252d ef0742cb
    fed7735b .claude.skills.run-tests — new skill
    w/ pytest invocation, worktree uv venv detection, "never
    auto-commit" rule, and dev-workflow helpers.
  • 435fa58d .claude.skills.open-wkt +
    .claude.skills.close-wkt — worktree lifecycle: create/enter
    (/open-wkt) and summary/teardown (/close-wkt).
  • 847cbab0 .. 70a02ed4
    .claude/settings.local.json — incremental allow-rules for
    grep, tests/, gh pr|api, python3, git remote|stash,
    ln, uv sync, Skill(run-tests), WebFetch domains.
  • f45f8b31 1c702e27 .gitignore
    ignore **/msgs/ under skill dirs and .claude/worktrees/.
  • 5d60fa63 .claude.ai_notes.docs_todos — notes on
    using Sphinx literalinclude to auto-sync README code blocks.

TODOs

  • Write a tractor/trio-specific Python coding skill — a
    rework of dhirschfeld's anyio coding guide
    adapted for the tractor structured-concurrency stack. Cover
    trio task groups, cancel scopes, tractor ctx streaming,
    MsgStream usage, msgspec.Struct patterns, and conventions
    around Portal, Context, and actor-nursery lifecycle.
  • Factor /pr-msg into generic + repo-specific layers (same
    split pattern as /commit-msg w/ style-guide-reference.md).
  • Integrate /pr-msg output w/ gish edit --ai-draft flow
    for seamless AI-draft-then-editor PR description workflow.

(this pr content was generated in some part by
claude-code)

Copilot AI review requested due to automatic review settings March 25, 2026 22:17
@goodboy goodboy added enhancement New feature or request devx-tooling "developer experience" improvements as provided `tractor.devx` for runtime dependents. the_AIs_are_taking_over slowly conceding to the reality the botz mk us more productive, but we require SC to avoid skynet.. labels Mar 25, 2026
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 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-msg skill with worktree awareness and review/regression context handling.
  • Update repo ignore rules and .claude/settings.local.json permissions 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.

Comment on lines +23 to +28
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`").
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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`").

Copilot uses AI. Check for mistakes.
| `-k <expr>` | pytest keyword filter |
| `-v` / `-vv` | Verbosity |
| `-s` | No output capture (useful with `--tpdb`) |
| `--timeout <secs>` | Override default 30s test timeout |
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
| `--timeout <secs>` | Override default 30s test timeout |

Copilot uses AI. Check for mistakes.
- `.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`
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

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).

Suggested change
- `.claude/skills/pr-msg/pr_msg_LATEST.md`
- `.claude/skills/pr-msg/msgs/pr_msg_LATEST.md`

Copilot uses AI. Check for mistakes.
@goodboy goodboy force-pushed the moar_skillz_refinement branch from 35038bd to 70a02ed Compare March 25, 2026 23:56
goodboy added a commit that referenced this pull request Mar 26, 2026
- `/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
@goodboy goodboy force-pushed the moar_skillz_refinement branch from 9697980 to ca20326 Compare March 27, 2026 16:14
goodboy added a commit that referenced this pull request Apr 2, 2026
- `/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
@goodboy goodboy force-pushed the moar_skillz_refinement branch from ca20326 to e4b4caa Compare April 2, 2026 22:22
goodboy added 19 commits April 5, 2026 13:37
- 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
goodboy added 8 commits April 5, 2026 13:37
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
@goodboy goodboy force-pushed the moar_skillz_refinement branch from e4b4caa to 8a02ce5 Compare April 5, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devx-tooling "developer experience" improvements as provided `tractor.devx` for runtime dependents. enhancement New feature or request the_AIs_are_taking_over slowly conceding to the reality the botz mk us more productive, but we require SC to avoid skynet..

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants