Context
Developers maintain their backlog in GitHub and GitLab. When they start planning from a ticket, the current workflow is manual: open the issue, copy the title and body, paste it into /plan-agent:planning. This copy-paste step is friction every time and breaks the "issue-to-plan" loop that should feel seamless.
The planning skill already has access to the gh and glab CLIs (via the issue-agent plugin's established patterns). Adding argument detection and a new Step 0.5 — Issue Ingestion phase to SKILL.md lets the skill fetch issue data automatically whenever a URL or #n reference is detected in $ARGUMENTS, seeding the plan objective and context without any user copy-paste.
This change is purely additive to the planning skill: all existing flags and argument forms continue to work unchanged.
Objective
/plan-agent:planning: when $ARGUMENTS contains a GitHub/GitLab issue URL or #n, automatically fetch the issue via gh/glab, seed the plan title from the issue title, inject the issue body as context, and record the issue URL in plan frontmatter — eliminating the copy-paste step from backlog to plan.
Steps
-
done Update
argument-hintfrontmatter inSKILL.mdWhy: The
argument-hintfield is shown to users in autocomplete and help text. Adding<issue-url|#n>as the leading option communicates the new capability immediately without requiring users to read the full skill body.✓ Verify
Read the first 10 lines ofkit/plugins/plan-agent/skills/planning/SKILL.mdand confirmargument-hintnow reads:"<issue-url|#n> | <objective> [--quick] [--no-clarify] [--no-align] [--no-interview] [--type feature|fix|refactor|docs|chore] [--template default] [--dir <path>] [--priority low|medium|high|critical]" -
done Add issue reference detection to the Invocation & Arguments section of
SKILL.mdWhy: The skill needs clear, unambiguous detection rules so the model knows exactly which argument forms trigger issue ingestion versus plain text objectives. Three patterns cover the full surface: full GitHub URL, full GitLab URL, and bare
#n/integer (with no other text present).✓ Verify
Read the Invocation & Arguments section and confirm all three patterns are documented:https://github.com/<owner>/<repo>/issues/<n>https://gitlab.com/<owner>/<repo>/-/issues/<n>- Bare
#<n>or plain integer with no other text
-
done Insert Step 0.5 — Issue Ingestion into the Workflow section of
SKILL.mdWhy: The ingestion logic must run after Step 0 (self-bootstrap / ExitPlanMode) but before Step 0b (Explore) so that when exploration runs, it already has the issue title and body available as planning inputs. Numbering it 0.5 inserts it into the existing sequence without renumbering Steps 1–8.
✓ Verify
Read the Workflow section and confirm Step 0.5 is present between Step 0 and Step 0b, containing:- Conditional trigger: fires only when an issue reference is detected
- GitHub branch:
gh issue view <n> --repo <owner>/<repo> --json title,body,labels,assignees,milestone,url - GitLab branch:
glab issue view <n> --repo <owner>/<repo> --output json - For bare
#n:gh repo view --json owner,nameto resolve owner/repo - Field mapping table:
title→ objective (unless caller supplied extra text),body→ injected context block,labels→ type hint,url→ frontmatterplan-issue - Graceful fallback: on CLI error or non-existent issue, report the error and treat
$ARGUMENTSas a plain objective string
-
done Update Step 3 (Frontmatter) in
SKILL.mdto emit<meta name="plan-issue">when an issue URL is presentWhy: Recording the source issue URL in the HTML
<head>makes plans machine-readable and linkable back to their origin ticket. Theplan-agentgallery index, hooks, and downstream tooling can then parse<meta name="plan-issue">the same way they already parseplan-statusandplan-type.✓ Verify
Read Step 3 of the Workflow section and confirm it now specifies: "If an issue URL was fetched in Step 0.5, add<meta name="plan-issue" content="<url>">to the HTML<head>. Omit this tag when no issue reference was provided." -
done Add
CHANGELOG.mdentry and bumpversionto0.15.0in.claude-plugin/marketplace.jsonWhy: Adding a new detection step and a new frontmatter field is a backward-compatible feature addition (minor version bump per the project's semver convention). The CHANGELOG entry records the intent so future contributors understand why the ingestion step exists.
✓ Verify
Rungrep -A3 '"name": "plan-agent"' .claude-plugin/marketplace.jsonand confirm"version": "0.15.0". Read the top ofkit/plugins/plan-agent/CHANGELOG.mdand confirm a## v0.15.0entry is present describing the issue ingestion feature.
add-issue-ingestion-to-planning-skill.html
docs/plans/add-issue-ingestion-to-planning-skill.html
Acceptance Criteria
7 / 7 done
Verification
Run the following four invocations after implementation and confirm all behave as expected:
/plan-agent:planning https://github.com/shawn-sandy/agentics/issues/205 --quick— confirm the generated plan title matches the issue title, the Context section includes the issue body, andgrep plan-issueon the HTML file returns the issue URL./plan-agent:planning #205 --quick— confirm the skill resolves the current repo viagh repo viewand fetches the same issue as above./plan-agent:planning https://github.com/shawn-sandy/agentics/issues/205 override-objective --quick— confirm the plan title is "override-objective" while the issue body is still injected as context./plan-agent:planning #99999 --quick(non-existent issue) — confirm the skill prints an error, falls back to treating#99999as a plain objective string, and proceeds without crashing.
Also confirm grep '"version"' .claude-plugin/marketplace.json returns "version": "0.15.0" for the plan-agent entry.
Next Steps
🔭 Wish List (speculative, not scheduled)
After the plan is committed, post a comment on the originating issue linking to the plan file URL in the repository — closing the loop so the ticket references its plan.