/agentspec:github-cr-issuefrom agentspec
Drafts well-formed GitHub issues from per-type templates (feature, component, task, bug, spike) with duplicate detection and saves as ephemeral draft. Also handles epic parent-child structuring.
Ships in agentspec. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Draft the body of one well-formed, non-ADR issue as an ephemeral local file, ready to be reviewed and then published as a GitHub issue by github-post-issue.
A good issue records one topic in a self-contained way. GitHub is the project's state store, agent sessions are stateless workers, and the published issue is the complete spec — any future contributor or agent session must be able to read and act on it with zero private context.
This skill always operates on the repository it is invoked in — the repo is detected dynamically in step 1 and never assumed.
| Situation | Do instead | Why |
|---|---|---|
| Architecture decision (which option and why) | github-cr-adr | Features and components link to decisions; they do not contain them. |
| A finished draft needs publishing, labels, or relationships | github-post-issue | Publication has its own guardrails: dedup, self-containment, label validation. |
| Updating an issue that already exists | gh issue comment / gh issue edit | The existing issue is the record; extend it instead of forking it. |
| Trivial, immediate change | Fix it directly | An issue that outlives the work it describes is pure overhead. |
Pick exactly one type per issue.
| Type | Use for | Title format |
|---|---|---|
feature | A capability to add, for users or developers | [FEATURE] … |
component | A reusable building block or subsystem with a defined contract | [COMPONENT] … |
task | A concrete unit of work, usually a child of a feature, component, or ADR | [TASK] … |
bug | A defect, with reproduction steps and expected vs actual behavior | [BUG] … |
spike | A time-boxed investigation: one question, one deliverable | [SPIKE] … |
There is no epic template. For an umbrella initiative, draft a parent issue (usually a feature) and separate child issues, then attach the children through GitHub's native sub-issue relationships at publish time. An epic written as a document duplicates state the child issues already carry and rots as they evolve; the relationship graph stays current because it is maintained where the work happens.
Use component when the deliverable is a reusable building block other work will consume, rather than an end-user capability. A component has a defined contract: one clear responsibility, named inputs and outputs, and an explicit boundary against sibling components. If the component's design still needs deciding, open the decision first with github-cr-adr and reference it by its ADR number with the issue linked — the decision holds the design; the component issue tracks the build.
The template's deliverables checklist is deliberately generic — implementation, documentation, consumer wiring, tests — so tailor each item to the repository's own layout when filling it in.
The skill operates on whatever repository the user is working in — never assume an owner or name:
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
# Fallback when gh cannot resolve the repo:
[ -z "$REPO" ] && REPO=$(git remote get-url origin | sed -E 's#(git@|https://)github.com[:/]##; s#\.git$##')
Catching a duplicate now costs one search; catching it at publish time costs a fully written body:
gh issue list --repo "$REPO" --search "<topic keywords>" --state all --limit 20
# e.g. for a retry mechanism on failed imports:
# --search "retry import" then --search "failed ingestion"
Run the search two or three times with different keyword sets — title nouns, synonyms, the affected subsystem's name — because existing titles rarely match the new phrasing exactly. Keep --state all: a closed issue on the same topic is history the new one must acknowledge. If gh is missing or unauthenticated, say so and continue drafting — dedup is a read-time optimization here and runs again as a hard gate at publish.
On a hit, stop and propose one of these instead of a new draft:
| Overlap | Propose |
|---|---|
| An open issue already covers the topic | Comment on it with the new information, or edit its body to extend the spec |
| The topic is a piece of a larger existing issue | Draft it as a sub-issue of that parent |
| An existing issue is adjacent but genuinely distinct | Proceed, and record the relationship at publish time |
Continue to a new draft only when the topic is genuinely uncovered, or the user explicitly confirms the existing issue does not apply.
Choose one type from the table above. If the request bundles several topics, split it — one issue per topic, or one parent with sub-issues — because a bundled issue cannot be closed, assigned, or prioritized cleanly. If the request is epic-scale, draft the parent and each child as separate files; the hierarchy is attached natively at publish time, never written into the bodies.
Copy the matching block from assets/issue-templates.md and fill every placeholder. Keep the section headers inside the template exactly as given — a predictable structure is what makes issues scannable across the whole tracker. The ## `[TYPE]` marker line that opens each block is a selector for that file, not issue content — never include it in the body.
Per-type quality bar:
| Type | The draft is not done until |
|---|---|
feature | Acceptance criteria are verifiable outcomes, not intentions |
component | The contract names inputs, outputs, and the boundary against siblings |
task | The definition of done is checkable by someone who did not do the work |
bug | Reproduction steps are numbered and complete enough to run |
spike | The question is single, the timebox explicit, the deliverable named |
The published issue must be readable with zero private context, so strip or translate before handing off:
| Remove | Replace with |
|---|---|
| Absolute or machine-local file paths | Repo-relative paths, only where a path is truly needed |
| References to private working documents ("see analysis #4") | The relevant content itself — a stray "#4" reads as a link to real issue number 4 |
| Session references ("as discussed", "per the call") | The actual content of what was discussed |
| Internal shorthand, codenames, nicknames | Self-explanatory names any stranger can follow |
| Process and tooling meta ("drafted during…") | Nothing — it carries no spec content |
Test: would a stranger who just cloned the repository understand and act on this issue alone?
mkdir -p .claude/sdd/drafts
# Save as: .claude/sdd/drafts/<type>-<slug>.md
The slug is the title in lowercase-with-hyphens (feature-retry-failed-imports.md), with no status markers or internal labels — the filename only needs to identify the draft until it is published.
The draft is ephemeral. It exists to be reviewed and then consumed by github-post-issue, which deletes it after a successful publish — the published issue is the canonical record, never the local file. A draft the author is not ready to take public stays in the file only; publishing is an explicit decision by whoever owns the issue.
Treat the drafts directory as a queue, not an archive — a draft that lingers unpublished should be published or deleted, because stale drafts drift from the tracker they were written for.
Present the draft path and a short summary to the user for review. Publication belongs to github-post-issue: it re-runs the dedup and self-containment guardrails, validates and applies labels, sets native parent/sub-issue relationships, creates the issue, and deletes the draft.
Output of this skill: one draft file per issue under .claude/sdd/drafts/ — nothing is posted to GitHub.
| Rule | Why |
|---|---|
| Self-contained: readable with zero private context | GitHub is the state store; the issue is the complete spec for whoever picks it up next. |
| Native GitHub relationships, never a "Parent: #N" line in the body | A manual mention rots as the graph changes and can collide with a real issue number. |
| One topic per issue | An issue covering two topics cannot be closed, assigned, or prioritized cleanly. |
| No Labels line in the body | Labels are applied at publish time by github-post-issue; a hardcoded list drifts from the real ones. |
| Formal, impersonal, active voice; concrete over vague | The issue becomes a public record — a shared deliverable, not a chat log. |
| Reference ADRs by their ADR number, with the issue linked | A name like "the caching decision" is ambiguous; ADR-003 is the stable citation, and the link makes it navigable. |
Add an ASCII or Mermaid diagram when layout matters — future readers cannot ask follow-up questions.
| File | Read when |
|---|---|
assets/issue-templates.md | Filling in the draft (step 4) — copy the matching type block as the skeleton. |
github-cr-adr — drafts Architecture Decision Records; use it when the work is deciding an architecture, not building one.github-post-issue — publishes the reviewed draft: labels, relationships, guardrails, then deletes the draft file.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub luanmorenommaciel/agentspec --plugin agentspec16 skills in this plugin
/agent-routerIntelligent agent routing -- automatically matches tasks to the best specialist agent based on file patterns, intent keywords, and domain context. Loaded every session to give Claude explicit routing rules for all 58 AgentSpec agents./component-modelDecides where new logic lives in the component model — agent, skill, command, KB, or
template — and how to keep components in their layer, routing each decision to the
right authoring resource and running the fat-to-thin refactor when a component has
outgrown its layer. Loaded by the authoring flows (create-skill, create-agent,
kb-build, create-kb) as their layer-decision gate. Use for "should this be an agent
or a skill", "where does this logic go", adding a new component, "this agent is too
big", or restructuring/refactoring an agent into skills. Do not use to author the
chosen component itself — that is create-skill, create-agent, or /create-kb.
/data-engineering-guideData engineering expertise for pipelines, schemas, data quality, SQL, lakehouse, and streaming.
Use PROACTIVELY when the user discusses data pipelines, ETL/ELT, schema design, dimensional modeling,
data quality checks, SQL optimization, dbt models, Spark jobs, Airflow DAGs, streaming pipelines,
lakehouse architecture, or data contracts.
/excalidraw-diagramCreate Excalidraw diagram JSON files that make visual arguments. Use when the user wants to visualize workflows, architectures, or concepts./github-cr-adrDrafts an Architecture Decision Record (ADR) for the current repository: searches existing GitHub issues for duplicates first, applies a worthiness gate, then drafts from the context/decision/alternatives/consequences template with the standard status lifecycle, ready for publication as a GitHub issue. Use when the user asks to "create an ADR", "draft an ADR", "new ADR", "document an architecture decision", or to formalize an architecturally significant, hard-to-reverse technical choice. Do not use for routine feature or bug tracking — use `github-cr-issue`; publishing a drafted ADR to GitHub is `github-post-issue`.
/github-post-issuePublishes a drafted issue or ADR to the current repository's GitHub board via gh, with guardrails, and curates the board safely. Runs a verdict-gated pre-flight before any write: duplicate search across open and closed issues, a self-containment lint, template conformance, and label validation against the live repo (human-in-the-loop for missing labels, never auto-created). Applies native parent/sub-issue relationships, assigns owners, closes (never deletes) superseded issues with a pointer comment, and deletes the local draft once the issue URL is returned. Use when the user wants to post or publish a drafted issue or ADR, apply labels, set parent/sub-issue relationships, assign an owner, or close/curate issues on the board. Do not use to draft content — use `github-cr-issue` or `github-cr-adr` first.
Other plugins' skills for the same job