github-discussions

Create, list, search, and manage GitHub Discussions via the GraphQL API.

6|1|Updated May 11, 2026
One-click install
npx skills add https://github.com/yakeworld/Synthos --skill github-discussions-yakeworld
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-discussions
Source: https://github.com/yakeworld/Synthos/tree/main/skills/extended/external-automation/automation-skills/github/github-discussions
Command: npx skills add https://github.com/yakeworld/Synthos --skill github-discussions-yakeworld

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? GitHub Discussions cannot be created through the REST API (POST returns 404), and the GraphQL workflow requires node IDs, careful body escaping, and category lookups that are easy to get wrong. This Skill provides the complete, verified GraphQL workflow for managing Discussions with the gh CLI. ## Core Features & Use Cases - GraphQL Discussion Creation: Query repository and category node IDs, then create discussions with the createDiscussion mutation, including safe escaping of long markdown bodies via temp JSON files. - Listing, Details, and Replies: List discussions via REST or GraphQL, fetch individual discussion details, and add comments with the addDiscussionComment mutation. - A2A Posting Template: Structured Agent-to-Agent discussion format with title conventions, single-concept bodies, concrete data, and open questions. - Use Case: An agent needs to post a technical discussion to a repository's Ideas category. The Skill verifies authentication, checks that discussions are enabled, retrieves the correct GraphQL node IDs, escapes the markdown body, creates the discussion, and reads it back to confirm. ## Quick Start Ask the agent to create a GitHub Discussion in a specified repository and category with a given title and markdown body using the gh CLI.

Frequently Asked Questions about github-discussions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a GitHub Discussion with the gh CLI?

Use the GraphQL createDiscussion mutation via gh api graphql, since the REST POST endpoint returns 404. First query the repository and category node IDs, then submit the mutation with title and escaped body.

Why does POST to the GitHub discussions REST API return 404?

GitHub's REST API only supports GET operations for discussions, so POST always returns 404. Creation and commenting must go through the GraphQL API using createDiscussion and addDiscussionComment mutations.

How do I find GitHub discussion category IDs for GraphQL?

Query discussionCategories(first: 10) on the repository via GraphQL to get node IDs like DIC_kwDO.... These differ from REST integer category IDs and are not interchangeable; use GraphQL IDs for createDiscussion.

Can I list GitHub Discussions without GraphQL?

Yes, listing and reading individual discussions works through the REST API with gh api /repos/OWNER/REPO/discussions. Only creation and commenting require GraphQL mutations.

Why does my GitHub Discussion body lose formatting or quotes?

Inline -f query strings mishandle double quotes, newlines, and backslashes in long bodies. Write the mutation to a temp JSON file with proper escaping and execute it with gh api graphql --input instead.

What happens if a repository has discussions disabled?

The skill checks the has_discussions flag before creating anything and stops with a DISCUSSIONS_NOT_ENABLED error. You must enable discussions in the repository settings under General > Features first.