Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/Morrison-Lab/ai-config --skill migrate-discussion명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
| name | migrate-discussion |
| description | Move items between Issues and Discussions. |
| user-invocable | true |
| allowed-tools | ["Bash","Read"] |
Move a topic to the tracker where it belongs: a discussion that turned into a concrete bug/task should become an Issue; an issue that's really a question, idea, or support request should become a Discussion. Migration is a judgement call — the "when helpful" part matters as much as the mechanics.
Don't migrate just because a thread is long. Migrate only when the item is clearly in the wrong tracker.
| Move it discussion → issue when… | Move it issue → discussion when… |
|---|---|
| It's a concrete, reproducible bug | It's an open-ended question or support request |
| It's an actionable task with a clear "done" | It's brainstorming / a feature idea with no decision |
| Maintainers have decided to act on it | It needs community input before any work |
| It needs an assignee, label, milestone, or board | It has no actionable scope and no owner |
Leave it where it is when it's borderline, when both trackers fit, or when the thread is active and a move would disrupt it. When unsure, ask the user — don't migrate on a hunch.
GitHub has built-in one-click conversions, and they're the best path because they preserve the original author, the full comment thread, and post an automatic cross-reference:
... menu), pick a category.... menu).There is no GraphQL mutation or gh subcommand for either conversion — they
are UI-only. So when you (or the user) can reach the web UI, that's the move:
point the user at the button, or walk them through it, and you're done.
Use the recreate procedure below only when the native UI path isn't usable (scripted/headless context, or the user explicitly wants it rebuilt).
When you can't use the native convert feature, create the new item by hand, preserve attribution, cross-link both ways, and close the original with a pointer. Get the user's approval on the drafted new item before creating it — this is outward-facing and hard to reverse.
Read the source discussion (see the discussions skill's read query) to capture its title, body, author, URL, and key comments.
Create the issue, quoting the original and linking back so authorship and context aren't lost:
gh issue create \
--title '<original title>' \
--body 'Migrated from discussion <url> (opened by @<author>).
<original body, quoted>
Key points from the discussion thread:
- @<login>: <summary>' # CREATE_ISSUE
In a remote/web session, use mcp__github__issue_write (method: create)
with the same body instead of gh.
Comment on the discussion pointing at the new issue, then close it:
gh api graphql -f discussionId='<discussion-id>' -f body='Moved to <issue-url> to track the actionable work.
_Posted by Claude Code (AI agent) --- not written by a human._' -f query='
mutation($discussionId: ID!, $body: String!) {
addDiscussionComment(input: {discussionId: $discussionId, body: $body}) {
comment { url }
}
}' # COMMENT_DISCUSSION
gh api graphql -f discussionId='<discussion-id>' -f query='
mutation($discussionId: ID!) {
closeDiscussion(input: {discussionId: $discussionId, reason: OUTDATED}) {
discussion { url closed }
}
}' # CLOSE_DISCUSSION
closeDiscussion reasons are RESOLVED, OUTDATED, or DUPLICATE; use
OUTDATED for a plain move.
Read the source issue (gh issue view <N> — VIEW_ISSUE — or
mcp__github__issue_read) for its title, body, author, URL, and comments.
Look up the repository node ID and the target category ID (only certain categories exist per repo):
gh api graphql -f owner='<owner>' -f repo='<repo>' -f query='
query($owner: String!, $repo: String!) {
repository(owner: $owner, name: $repo) {
id
discussionCategories(first: 20) { nodes { id name isAnswerable } }
}
}'
Create the discussion, quoting the original and linking back:
gh api graphql -f repositoryId='<repo-id>' -f categoryId='<category-id>' -f title='<original title>' -f body='Migrated from issue <url> (opened by @<author>).
<original body, quoted>' -f query='
mutation($repositoryId: ID!, $categoryId: ID!, $title: String!, $body: String!) {
createDiscussion(input: {repositoryId: $repositoryId, categoryId: $categoryId, title: $title, body: $body}) {
discussion { number url }
}
}' # CREATE_DISCUSSION
Comment on the issue pointing at the new discussion, then close the issue as not planned:
gh issue comment <N> --body 'Moved to <discussion-url> — this is better suited to Discussions.
_Posted by Claude Code (AI agent) --- not written by a human._' # COMMENT_ISSUE
gh issue close <N> --reason 'not planned' # CLOSE_ISSUE
In a remote/web session, use mcp__github__add_issue_comment and
mcp__github__issue_write (method: update, state: closed,
state_reason: not_planned).
Give the user both links (old and new) as clickable markdown links, say which direction the migration went, and confirm the original was closed with a pointer.