AgentSkillsCN

github-discussion

在 carlos-algms/agentic.nvim 仓库中,用于创建、列出或管理 GitHub 讨论

SKILL.md
--- frontmatter
name: github-discussion
description: Use when creating, listing, or managing GitHub discussions in carlos-algms/agentic.nvim repository

GitHub Discussion

Manage discussions in carlos-algms/agentic.nvim via GraphQL API.

IDs Reference

Repository ID: R_kgDOQXqKiw

Categories

CategoryID
AnnouncementsDIC_kwDOQXqKi84C1alq
GeneralDIC_kwDOQXqKi84C1alr
IdeasDIC_kwDOQXqKi84C1alt
PollsDIC_kwDOQXqKi84C1alv
Q&ADIC_kwDOQXqKi84C1als
ResearchDIC_kwDOQXqKi84C1alw
Show and tellDIC_kwDOQXqKi84C1alu

Labels

LabelID
bugLA_kwDOQXqKi88AAAACQBotaQ
documentationLA_kwDOQXqKi88AAAACQBoteg
duplicateLA_kwDOQXqKi88AAAACQBotgw
enhancementLA_kwDOQXqKi88AAAACQBotkQ
good first issueLA_kwDOQXqKi88AAAACQBotpA
help wantedLA_kwDOQXqKi88AAAACQBotnA
invalidLA_kwDOQXqKi88AAAACQBotqA
not-acp-standardLA_kwDOQXqKi88AAAACQBottw
questionLA_kwDOQXqKi88AAAACQBotrw
quality-of-lifeLA_kwDOQXqKi88AAAACVMzaQA

Usage

Default category: Research

Override: /github-discussion Ideas or /github-discussion Q&A

Create Discussion

bash
gh api graphql -f query='
mutation {
  createDiscussion(input: {
    repositoryId: "R_kgDOQXqKiw",
    categoryId: "DIC_kwDOQXqKi84C1alw",
    title: "TITLE",
    body: "BODY"
  }) {
    discussion {
      id
      url
    }
  }
}'

List Discussions

bash
gh api graphql -f query='
{
  repository(owner: "carlos-algms", name: "agentic.nvim") {
    discussions(first: 10, orderBy: {field: CREATED_AT, direction: DESC}) {
      nodes {
        id
        number
        title
        url
        category { name }
        labels(first: 5) { nodes { name } }
      }
    }
  }
}'

Filter by category:

bash
gh api graphql -f query='
{
  repository(owner: "carlos-algms", name: "agentic.nvim") {
    discussions(first: 10, categoryId: "DIC_kwDOQXqKi84C1alw") {
      nodes { number title url }
    }
  }
}'

Add Labels to Discussion

Requires discussion ID (starts with D_):

bash
gh api graphql -f query='
mutation {
  addLabelsToLabelable(input: {
    labelableId: "D_kwDOQXqKi84...",
    labelIds: ["LA_kwDOQXqKi88AAAACQBotkQ"]
  }) {
    labelable {
      ... on Discussion { title }
    }
  }
}'

Remove Labels

bash
gh api graphql -f query='
mutation {
  removeLabelsFromLabelable(input: {
    labelableId: "D_kwDOQXqKi84...",
    labelIds: ["LA_kwDOQXqKi88AAAACQBotkQ"]
  }) {
    labelable {
      ... on Discussion { title }
    }
  }
}'

Critical Notes

  • Escape quotes in body: use \" for literal quotes
  • No native command: gh discussion doesn't exist
  • Repo owner: carlos-algms (not carlos.gomes)
  • Return the discussion URL when done