post-discussion

Publishes a drafted post to a GitHub Discussion category via the gh api graphql mutation.

2|Updated Apr 5, 2026
One-click install
npx skills add https://github.com/witwave-ai/witwave --skill post-discussion-witwave-ai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: post-discussion
Source: https://github.com/witwave-ai/witwave/tree/main/.agents/self/piper/.claude/skills/post-discussion
Command: npx skills add https://github.com/witwave-ai/witwave --skill post-discussion-witwave-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Publishing team updates to GitHub Discussions requires resolving repository and category node IDs, composing a GraphQL mutation, and handling auth, rate-limit, and stale-ID failures correctly. This Skill performs that single publish step safely so the calling workflow never has to manage the GitHub API details itself. ## Core Features & Use Cases - GraphQL Discussion Creation: Resolves repository and category node IDs from a cached reference file, refreshing them via gh api graphql when missing or stale, then executes the createDiscussion mutation. - Structured Error Handling: Distinguishes 401/403 auth failures, 422 validation errors, stale category IDs, rate limits, and network errors, with defined retry and escalation behavior for each. - Draft Mode: When no GitHub PAT exists yet, writes the would-be post to a drafts directory with frontmatter and returns a reason string instead of attempting the write. - Use Case: A team-pulse workflow has scored recent activity, drafted a title and body, and chosen the Announcements category; this Skill publishes it and returns the discussion URL for logging in pulse_log.md. ## Quick Start Publish the drafted announcement titled "Weekly progress update" to the announcements GitHub Discussion category and return the post URL.

Frequently Asked Questions about post-discussion

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 gh api graphql with the createDiscussion mutation, passing the repository node ID, discussion category node ID, title, and body as variables. The mutation returns the discussion URL, number, and creation timestamp.

How do I find GitHub Discussion category IDs for the GraphQL API?▼

Query the repository's discussionCategories field via gh api graphql to list each category's node ID, name, and slug. Cache the IDs in a reference file and refresh them if a mutation later returns a 404 for a stale category.

Why does createDiscussion return a 401 or 403 error?▼

A 401 or 403 means the PAT is missing or lacks the discussion write scope. Do not retry, since repeated failures burn rate-limit budget; log the failure and escalate for human intervention instead.

Can this Skill edit or reply to existing GitHub Discussions?▼

No. It only creates new posts; editing is excluded because the team policy treats posts as append-only, with corrections made via follow-up posts. Replying to threads is reserved for a future separate skill.

What happens when no GitHub token is configured yet?▼

The Skill enters draft mode: it skips the GraphQL write, saves the would-be post to a drafts directory with frontmatter metadata, and returns a null URL with the reason draft-mode-no-pat so the caller can log it.