Check open PRs for in-progress drafts before scaffolding a new skill/agent - #348
Conversation
…agent skill-builder and agent-builder already scan local branches/worktrees for in-flight duplicates, but a branch already pushed and opened as a PR is invisible to that scan unless it's fetched. Add a shared fragment and wire it into both skills' step 0, so a caller gets redirected to a stalled or active PR instead of building a competing draft.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| ``` | ||
|
|
||
| In a remote/web session without `gh`, use the GitHub MCP equivalent | ||
| (`mcp__github__list_pull_requests` / `mcp__github__search_pull_requests` — |
There was a problem hiding this comment.
mcp__github__search_pull_requests is referenced here but is not registered in tool-mappings.md or tool-mappings.yml — only mcp__github__list_pull_requests is (as LIST_PRS). The "see tool-mappings.md" pointer is accurate for mcp__github__list_pull_requests but misleading for mcp__github__search_pull_requests: a reader who looks there won't find it.
This also violates skill-builder's own standing convention (skills/skill-builder/SKILL.md:136–144):
If the procedure names a GitHub MCP tool … not already in
tool-mappings.yml… add it there.
(The same anti-pattern is listed at line 286 of that skill: "Naming a GitHub MCP tool the skill uses without registering it in tool-mappings.yml.")
The tool is real — it already appears in skills/gi/SKILL.md:209, skills/gip/SKILL.md:58, and memories/tools.md:148 — so this isn't a hallucination, just an incomplete registration.
Suggested fix: add an entry to tool-mappings.yml (and the table in tool-mappings.md) for mcp__github__search_pull_requests, e.g.:
- id: SEARCH_PRS
description: Search pull requests by keyword / query string.
cli: gh pr list --search "<query>"
github_mcp: mcp__github__search_pull_requestsThen regenerate the Codex wrappers so the new op appears in the tool-mapping tables of codex-skills/skill-builder/SKILL.md and codex-skills/agent-builder/SKILL.md.
This comment has been minimized.
This comment has been minimized.
main picked up new skills (prompt-me family, fact-check-prose) since this branch was cut; resync the generated codex-skills/ tree.
|
Claude finished @d-morrison's task in 1m 36s —— View job Re-review of PR #348
Verdict: cleanThe one finding from the prior review —
No new issues found. The new fragment, its wiring into all three skills, and the full Codex wrapper regeneration are all structurally sound. |
Summary
skill-builderandagent-builderalready scan local branches and worktrees for in-flight duplicate work, but that scan misses a branch already pushed and opened as a PR (it's never fetched into local refs).shared/workflow/check-open-prs-before-duplicating.md, spelling out an open-PR check (gh pr list/mcp__github__list_pull_requests) and what to do when a match is found: pick up a stalled draft, or redirect the caller to an active one instead of building a competing second draft.skill-builder's andagent-builder's step 0 (extend/reuse-before-create), their frontmatter descriptions, and their anti-patterns lists.spot-skill-opportunities's existing-coverage check now also names the open-PR case, pointing to the same fragment, without duplicating the full procedure (it still hands off the actual check toskill-builder/agent-builder).Test plan
skill-builderstep 0 for consistency.gh pr list/ MCP fallback mapping (LIST_PRS) already exists intool-mappings.md.../../shared/workflow/...) match the convention used elsewhere inskills/*/SKILL.md.🤖 Generated with Claude Code
Generated by Claude Code