Moar skillz (squashed): refinements, factorings and extensions#440
Moar skillz (squashed): refinements, factorings and extensions#440
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refreshes and extends the repo’s .claude “skill” tooling by adding new workflow skills/docs, updating ignore rules for generated artifacts and machine-local symlinks, and broadening local Claude permission allow-rules.
Changes:
- Add new
.claudeskills/docs (run-tests,conc-anal,pr-msgformat reference) and an internal docs TODO note. - Update
.gitignoreto ignore skill-generated artifacts, machine-local configs/symlinks, and Claude worktree directories. - Expand
.claude/settings.local.jsonallowed command/tool list for the updated skill workflow.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.gitignore |
Ignores new skill outputs, machine-local symlinks/config, and Claude worktree dirs. |
.claude/skills/run-tests/SKILL.md |
Adds a pytest-running skill with worktree/venv guidance and project-specific pytest flags. |
.claude/skills/pr-msg/format-reference.md |
Adds a cross-forge PR description format/reference-linking guide. |
.claude/skills/conc-anal/SKILL.md |
Adds a structured-concurrency analysis skill for trio/tractor code. |
.claude/skills/commit-msg/SKILL.md |
Removes the in-repo commit-msg skill doc (presumably replaced by a machine-local/symlinked version). |
.claude/settings.local.json |
Broadens local Claude permissions to support the new/expanded skills. |
.claude/ai_notes/docs_todos.md |
Notes a docs improvement idea using Sphinx literalinclude. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| allowed-tools: | ||
| - Bash(python -m pytest *) | ||
| - Bash(python -c *) | ||
| - Bash(ls *) | ||
| - Bash(cat *) | ||
| - Read | ||
| - Grep | ||
| - Glob | ||
| - Task | ||
| --- |
There was a problem hiding this comment.
The run-tests skill instructions require commands that aren't permitted by its own allowed-tools (e.g. git rev-parse ..., python --version, running uv sync, and shell pipelines like ... | tail ...). Either expand allowed-tools to cover the documented workflow (git/uv/python path variants + basic shell utils), or adjust the steps/examples to only use the currently allowed commands so the skill is actually executable under its tool restrictions.
There was a problem hiding this comment.
🤖 response authored by
claude-code
Valid — added Bash(python --version *), Bash(git rev-parse *), and Bash(UV_PROJECT_ENVIRONMENT=py* uv sync *) to allowed-tools so the documented pre-flight workflow is actually executable under tool restrictions.
📎 fixed in
6b046501
| ### Worktree venv detection | ||
|
|
||
| If running inside a git worktree (`git rev-parse | ||
| --git-common-dir` differs from `--git-dir`), verify | ||
| the Python being used is from the **worktree's own | ||
| venv**, not the main repo's. Check: | ||
|
|
||
| ```sh |
There was a problem hiding this comment.
This section tells the skill to detect worktree state via git rev-parse --git-common-dir/--git-dir, but git isn’t in allowed-tools for this skill (only python, ls, cat). As written the pre-flight worktree detection step can’t be performed when the tool restrictions are enforced.
There was a problem hiding this comment.
🤖 response authored by
claude-code
Same fix as above — Bash(git rev-parse *) now in allowed-tools.
📎 fixed in
6b046501
| "Bash(UV_PROJECT_ENVIRONMENT=py313 uv sync:*)", | ||
| "Bash(UV_PROJECT_ENVIRONMENT=py313 uv run:*)", | ||
| "Write(.claude/*commit_msg*)", | ||
| "Write(.claude/git_commit_msg_LATEST.md)", | ||
| "Skill(run-tests)", | ||
| "Bash(echo EXIT:$?:*)", | ||
| "Bash(gh api:*)", | ||
| "Bash(gh pr:*)", |
There was a problem hiding this comment.
The allow-list contains duplicate entries for Bash(gh api:*) and Bash(gh pr:*), and it hardcodes UV_PROJECT_ENVIRONMENT=py313 even though the run-tests skill documentation expects selecting the env based on the active Python minor. Consider deduplicating and aligning the allowed uv commands with the documented py<MINOR> workflow to avoid the skill being blocked on non-3.13 setups.
| "Bash(UV_PROJECT_ENVIRONMENT=py313 uv sync:*)", | |
| "Bash(UV_PROJECT_ENVIRONMENT=py313 uv run:*)", | |
| "Write(.claude/*commit_msg*)", | |
| "Write(.claude/git_commit_msg_LATEST.md)", | |
| "Skill(run-tests)", | |
| "Bash(echo EXIT:$?:*)", | |
| "Bash(gh api:*)", | |
| "Bash(gh pr:*)", | |
| "Bash(UV_PROJECT_ENVIRONMENT=py* uv sync:*)", | |
| "Bash(UV_PROJECT_ENVIRONMENT=py* uv run:*)", | |
| "Write(.claude/*commit_msg*)", | |
| "Write(.claude/git_commit_msg_LATEST.md)", | |
| "Skill(run-tests)", | |
| "Bash(echo EXIT:$?:*)", |
There was a problem hiding this comment.
🤖 response authored by
claude-code
Deduped gh api/gh pr entries and widened UV_PROJECT_ENVIRONMENT=py313 to py* so non-3.13 setups aren't blocked. Also reordered for logical grouping (git cmds, shell utils, gh CLI, uv, write perms, skills).
📎 fixed in
6b046501
Add `/run-tests`, `/conc-anal` skill definitions and `/pr-msg` `format-reference.md` that live in-repo (not symlinked from `ai.skillz`). - `/run-tests`: `pytest` suite runner with dev-workflow helpers, never-auto-commit rule. - `/conc-anal`: concurrency analysis skill. - `/pr-msg` `format-reference.md`: canonical PR description structure + cross-service ref-links. - `ai_notes/docs_todos.md`: `literalinclude` idea. - `settings.local.json`: permission rules for `gh`, `git`, `python3`, `cat`, skill invocations. - `.gitignore`: ignore commit-msg/pr-msg `msgs/`, `LATEST` files, review ctx, session conf, claude worktrees. (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
Drop inline `commit-msg/SKILL.md` — now deployed as a symlink from the central `ai.skillz` repo via `deploy-skill.sh`. Gitignore all symlinked skill dirs so they stay machine-local: - fully-symlinked: `py-codestyle`, `close-wkt`, `open-wkt`, `plan-io`, `prompt-io`, `code-review-changes`, `resolve-conflicts`, `inter-skill-review`, `yt-url-lookup` - hybrid (symlinked SKILL.md + references): `commit-msg/SKILL.md`, `pr-msg/SKILL.md`, `pr-msg/references` (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
c8ffc0f to
a0607f3
Compare
Expand `run-tests` skill `allowed-tools` to cover the documented pre-flight workflow: `git rev-parse` for worktree detection, `python --version`, and `UV_PROJECT_ENVIRONMENT=py* uv sync` for venv setup. Also dedup `gh api`/`gh pr` entries in `settings.local.json` and widen `py313` → `py*` so non-3.13 setups aren't blocked. Review: PR #440 (copilot-pull-request-reviewer) #440 (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
Add repo-local
claudeskills,ai.skillzsymlinks +.gitignoreMotivation
Replacement for #428 with factored content now moved to our new
ai.skillzrepo and only thetractor-specificgithistory included to avoid review noise and book keeping.
The prior PR bundled shared skill definitions inline; this squashed
branch separates concerns — shared skills live as symlinks into
ai.skillzwhile repo-local skills (run-tests,conc-anal,pr-msgformat ref) and config (.gitignore,settings.local.json)stay in-tree.
Summary of changes
claudeskills + settings +.gitignorepatterns.run-testsskill with test-directory layout, change-typemapping, flaky-test list, and worktree venv detection.
conc-analskill for structured concurrency analysis oftrio-based primitives (shared-state inventory, checkpointmapping, race tracing).
pr-msg/format-reference.mdwith canonical PR descriptionstructure and cross-service ref-link strategy.
ai_notes/docs_todos.mdnoting the README/literalincludesync idea.
commit-msg/SKILL.md(replaced byai.skillzsymlink).
settings.local.jsonpermissions for common shell +ghCLI +
uvcmds..gitignorefor skill artifacts, symlinks, worktrees, andreview ephemera.
ai.skillzsymlinks..gitignoreentries forpy-codestyle,code-review-changes,open-wkt,close-wkt,prompt-io,plan-io,resolve-conflicts,inter-skill-review,yt-url-lookup— alldeployed locally via
deploy-skill.sh.commit-msg,pr-msg) get symlinkedSKILL.md+references/while keeping repo-local assets (style guide, formatref,
msgs/).open-wkt/close-wktskills insettings.local.jsonpermissions.Scopes changed
.claude.settings.local.json— expand permission allow-list forshell,
gh,uv, and skill invocations..claude.skills.run-tests— new skill for running thetractortest suite with worktree-aware venv detection and
change-type-to-test mapping.
.claude.skills.conc-anal— new skill for structured concurrencyanalysis targeting
triocheckpoint semantics andtractorcache/lock patterns.
.claude.skills.pr-msg.format-reference— canonical PR descriptionformat doc with cross-service md ref-link strategy.
.claude.skills.commit-msg— old inlineSKILL.mddropped; nowsymlinked from
ai.skillz..claude.ai_notes.docs_todos— design note on README code-exampleauto-sync via Sphinx
literalinclude..gitignore— patterns for skill msg artifacts,ai.skillzsymlinks, review ephemera, and claude worktrees.
Future follow up
See tracking issue #417 for follow-up items from this PR.
Reviewer suggestion: Copilot (auto-review)
(this pr content was generated in some part by
claude-code)