一键导入
do-issue
Create a self-contained GitHub issue ready for planning. Triggered by 'create an issue', 'file an issue', 'track this', or by /sdlc at Step 1.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create a self-contained GitHub issue ready for planning. Triggered by 'create an issue', 'file an issue', 'track this', or by /sdlc at Step 1.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Pre-publish editorial gate for external-audience content: removes AI-writing tells and blocks hollow drafts. Use on documents, presentations, emails, posts, or web copy once a first draft exists. Triggered by 'de-slop this', 'editorial pass', 'humanize this', 'remove the AI tells', or invoked as a mandatory gate by email, do-presentation, linkedin, and x-com.
Stage, launch, grade, and schedule a Claude Managed Agent (CMA) from a build-sheet. Triggered by 'build the agent', 'launch this agent', 'deploy a managed agent', or as /imagine-agent's handoff.
Create/review/maintain Claude Code Routines (cloud scheduled agents, aka 'Cowork'). Triggered by 'set up a routine', 'schedule a cloud agent', 'cowork task', 'migrate to a routine'.
Create a polished Marp slide deck about a feature, concept, or system. Triggered by 'make a presentation', 'create slides', 'do-presentation', or 'explain this as a deck'.
Use when reading, searching, drafting, or sending email. Triggered by 'read my email', 'check my inbox', 'send an email', 'reply to that email', 'search my mail', or any request to read/send mail.
Use when reading posts or engaging on LinkedIn. Triggered by requests to comment on LinkedIn, browse the feed, write or interact with posts, check DMs, or read/reply to LinkedIn messages.
基于 SOC 职业分类
| name | do-issue |
| description | Create a self-contained GitHub issue ready for planning. Triggered by 'create an issue', 'file an issue', 'track this', or by /sdlc at Step 1. |
| allowed-tools | Read, Write, Edit, Glob, Grep, Bash |
| argument-hint | <title or description> |
Create a GitHub issue that is a self-contained document a stranger could understand. Every issue must teach the reader what they need to know — define terms, link sources, and state the problem from the reader's perspective. The /do-plan skill reads the issue as its primary input: quality here directly determines plan quality downstream.
If .claude/skill-context/do-issue.md exists, read it and honor its declarations; otherwise use the generic defaults described below.
The context file is where a repo layers its SDLC automation onto this generic baseline: a stage/status marker to write at the start and end, cross-repo gh targeting, the canonical doc locations to search for related context, and the plan-doc path convention the issue should reference downstream. When the file is absent (the common case in a foreign repo), this skill runs entirely on git and gh — no repo-specific tooling required.
The reader of your issue has general software engineering experience but zero context about this specific codebase. Every named concept that isn't common knowledge needs:
This isn't optional politeness — it's functional. Undefined terms produce vague plans. Defined terms produce precise plans.
| Sub-file | Load when... |
|---|---|
RECON.md | After Step 2, before writing — run the reconnaissance routine |
ISSUE_TEMPLATE.md | Writing the issue body (use as the structural skeleton) |
CHECKLIST.md | Before publishing — run every check, fix failures |
By default gh targets the repository of the current working directory. If the context file declares a cross-repo targeting mechanism (e.g. a GH_REPO env var), honor it so gh commands hit the intended repository.
Read the user's description. Identify:
Before writing, gather context so the issue is grounded in reality:
# Search for related closed issues
gh issue list --state closed --search "KEYWORDS" --limit 5 --json number,title,url
# Search for related merged PRs
gh pr list --state merged --search "KEYWORDS" --limit 5 --json number,title,url
# Check if relevant docs exist (the context file may name canonical doc
# locations; the generic default searches tracked docs)
git grep -l "KEYWORD" -- '*.md' docs/ 2>/dev/null | head -5
Before writing, run the reconnaissance routine to surface unknowns and conflicts. Load RECON.md for the full pattern. Summary:
Broad scan — Spawn an Explore agent (thoroughness: "very thorough") to map the affected area: relevant source files, existing tests, recent PRs, related docs.
Surface concerns — From the scan results, identify what's unclear, conflicting, stale, already-done, or missing. List each as a discrete question.
Fan-out — Spawn one Explore agent per concern, all in parallel. Each gets a focused research prompt: investigate one specific question, read the actual code, and return a recommendation.
Synthesize — Reconcile all findings. Produce:
This step catches stale assumptions, dead code, existing coverage, and architectural conflicts BEFORE they get baked into the issue. Skip only for trivially simple issues (typo fixes, config changes).
Load ISSUE_TEMPLATE.md and fill it in. Key rules:
Open with context — A blockquote intro explaining any non-obvious project context. If the issue references a specific system, library, pattern, or concept that isn't universally known, define it here with a link.
Problem section — State the problem from the reader's perspective. What's broken, missing, or painful? Include "Current behavior" and "Desired outcome."
Definitions section — If the issue uses 2+ domain-specific terms, add a Definitions table. Each term gets a one-line definition and a link to where the reader can learn more.
Solution sketch — Brief description of the approach. Not a full plan (that's /do-plan's job), but enough that the planner knows the direction. For architectural or structural problems where the root cause is still uncertain, write open questions here instead of approaches — do-plan will not challenge a concrete sketch, it will execute it.
Downstream context — Explicitly state what happens next: "This issue will be consumed by /do-plan to produce a plan document." If the context file declares the repo's plan-doc path convention, name the concrete path.
Load CHECKLIST.md and verify every item before creating the issue.
Single-shell invariant (load-bearing): The whole sequence below — allocate scratch path, write body, verify anchor, publish, cleanup — MUST run inside ONE bash tool invocation. Each Bash tool call spawns a fresh shell with a new $$, so splitting these steps across calls loses OWNER_PID/OWNER_TS/ANCHOR/DRAFT and breaks anchor verification. Do not split.
# Per-invocation draft path (mktemp ensures no collision with any concurrent agent).
# Anchor header proves the draft we publish is the draft we wrote.
# DO NOT "simplify" the anchor check away — it defends against another agent
# clobbering the scratch file between write and publish.
DRAFT=$(mktemp "${TMPDIR:-/tmp}/issue_body.XXXXXX") || { echo "ERROR: mktemp failed" >&2; exit 1; }
OWNER_PID=$$
OWNER_TS=$(date +%s)
ANCHOR="draft-owner: pid=${OWNER_PID} ts=${OWNER_TS}"
# Write the anchor as the first line, then the issue body.
# Anchor goes via printf (expands ${ANCHOR}); the body heredoc may be quoted or
# unquoted depending on whether you need shell expansion in the body.
printf '<!-- %s -->\n' "${ANCHOR}" > "$DRAFT"
cat >> "$DRAFT" << 'BODY'
…replace this heredoc with the actual issue body from your draft…
BODY
# Verify the anchor BEFORE publishing. Mismatch = a foreign agent clobbered
# the file, or our own write failed — never publish unknown content.
if ! head -1 "$DRAFT" | grep -qF "<!-- ${ANCHOR} -->"; then
echo "ERROR: draft anchor mismatch — refusing to publish unknown content" >&2
echo " expected first line: <!-- ${ANCHOR} -->" >&2
echo " actual first line: $(head -1 "$DRAFT")" >&2
rm -f "$DRAFT"
exit 1
fi
TYPE="feature" # or "bug" or "chore"
gh issue create \
--title "Brief, specific title" \
--label "$TYPE" \
--body "$(cat "$DRAFT")"
# Best-effort cleanup; mktemp paths live under $TMPDIR and the OS reaps stragglers.
rm -f "$DRAFT"
Issue created: #{number} — {title}
URL: {url}
Ready for /do-plan when you are.
This skill is invoked by the repo's SDLC router (in this repo: /sdlc) at Step 1: Ensure a GitHub Issue Exists. The issue it creates becomes the input for /do-plan, which reads:
/do-plan to produce vague plans" is a problem.