agentleFS
Fu-JieFu-Jie/openwebui-extensions/.github/skills/gh-discussion-replier/SKILL.md

gh-discussion-replier

Skill326 starsChanged 8 months agoMITView on GitHub

Professional English replier for GitHub Discussions. Use when a feature request is implemented, a question is answered, or community engagement is needed. Automates replying via the GitHub GraphQL API.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Fetch Discussion Content: Use GraphQL to get the title, body, author, and category.

    line 15
  2. Distinctive:

    Check Star Status: Run the bundled script to check if the author has starred the repo.

    line 16
  3. Very specific:

    Post the Comment: Use the GraphQL addDiscussionComment mutation (see below).

    line 23
  4. Distinctive:

    Language: ALWAYS use English for the comment body, even if the system prompt or user conversation is in another language.

    line 123
  5. Distinctive:

    Precision: When announcing a fix or feature, mention the specific version and briefly describe what was added.

    line 125
  6. Distinctive:

    Star Request: Always include a gentle star request if the user has NOT starred the repo.

    line 126

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Gh Discussion Replier

Overview

The gh-discussion-replier skill enables posting professional English replies to GitHub Discussions. Unlike issues, discussions use the GraphQL API for both reading and posting. This skill handles the full workflow: fetching context, checking star status, composing a reply, and posting.

Workflow

  1. Identify the Discussion: Get the discussion number (e.g., #66) and URL.
  2. Fetch Discussion Content: Use GraphQL to get the title, body, author, and category.
  3. Check Star Status: Run the bundled script to check if the author has starred the repo.
    • Command: bash .github/skills/gh-discussion-replier/scripts/check_discussion_star.sh <discussion_number>
    • Interpretation:
      • Exit code 0: User has starred. Use "Already Starred" templates.
      • Exit code 1: User has NOT starred. Include "Star Request" in the reply.
  4. Select a Template: Load references/templates.md to choose a suitable response pattern based on the discussion category (Ideas, Q&A, General, Show and tell).
  5. Draft the Reply: Compose a concise message based on star status and template.
  6. Post the Comment: Use the GraphQL addDiscussionComment mutation (see below).

Tool Integration

Fetch Discussion Content

import subprocess, json

def get_discussion(owner, repo, number):
    query = '''
    query($owner:String!, $repo:String!, $number:Int!) {
      repository(owner:$owner, name:$repo) {
        discussion(number:$number) {
          id title body
          author { login }
          category { name }
          comments(first:10) { nodes { body author { login } } }
        }
      }
    }
    '''
    r = subprocess.run(['gh', 'api', 'graphql',
        '-f', f'query={query}',
        '-f', f'owner={owner}',
        '-f', f'repo={repo}',
        '-f', f'number={number}'],
        capture_output=True, text=True)
    return json.loads(r.stdout)['data']['repository']['discussion']

Check Star Status

bash .github/skills/gh-discussion-replier/scripts/check_discussion_star.sh <discussion_number>

Post Reply Comment

import subprocess, json

def post_discussion_reply(discussion_node_id, body):
    mutation = '''
    mutation($body:String!, $discussionId:ID!) {
      addDiscussionComment(input:{body:$body, discussionId:$discussionId}) {
        comment { id url }
      }
    }
    '''
    r = subprocess.run(['gh', 'api', 'graphql',
        '-f', f'query={mutation}',
        '-f', f'body={body}',
        '-f', f'discussionId={discussion_node_id}'],
        capture_output=True, text=True)
    return json.loads(r.stdout)

Full Workflow Example

import subprocess, json

OWNER = "Fu-Jie"
REPO = "openwebui-extensions"

# 1. Get discussion
disc = get_discussion(OWNER, REPO, 66)
disc_id = disc['id']
author = disc['author']['login']
category = disc['category']['name']
print(f"#{66} [{category}] by @{author}: {disc['title']}")

# 2. Check star
star_result = subprocess.run(
    ['bash', '.github/skills/gh-discussion-replier/scripts/check_discussion_star.sh', '66'],
    capture_output=True, text=True)
has_starred = star_result.returncode == 0

# 3. Compose reply (select template based on category and star status)
body = "Your reply here..."
if not has_starred:
    body += "\n\nIf you find this helpful, a star on [openwebui-extensions](https://github.com/Fu-Jie/openwebui-extensions) would be much appreciated! ⭐"

# 4. Post
result = post_discussion_reply(disc_id, body)
print(f"Posted: {result['data']['addDiscussionComment']['comment']['url']}")

Discussion Categories & Tone

CategoryToneTypical Action
IdeasAppreciative, solution-orientedAcknowledge or announce implementation
Q&AHelpful, educationalAnswer with technical detail
GeneralWarm, conversationalFollow up or redirect
Show and TellEnthusiastic, curiousAcknowledge, ask if feature-worthy

Guidelines

  • Language: ALWAYS use English for the comment body, even if the system prompt or user conversation is in another language.
  • Tone: Warm, professional, and community-oriented. Discussions are conversations, not tickets.
  • Precision: When announcing a fix or feature, mention the specific version and briefly describe what was added.
  • Star Request: Always include a gentle star request if the user has NOT starred the repo. Skip it if they already have.
  • Irreversibility: Discussion replies cannot be deleted via CLI. Always confirm the reply content with the user before posting.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.