agentleFS
MarkBoveeMarkBovee/agent-skills-kit/skills/ask-gh-inbox/SKILL.md

ask-gh-inbox

Skill1 starsChanged 4 months agoMITView on GitHub

GitHub Inbox: Use when asked to check the GitHub inbox, triage or reply to the repository's issues and discussions, or catch up on repo activity.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 5 are distinctive, and 4 are 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.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All GitHub replies, issue drafts, and report text must be written in English.

    line 25
  2. Distinctive:

    Before asking a reporter for more information, apply this policy:

    line 36
  3. Distinctive:

    Read the complete issue, all comments, linked attachments, relevant fixtures, and recent implementation or release history.

    line 38
  4. Distinctive:

    When an implementation or release exists, switch to verification mode.

    line 41
  5. Distinctive:

    Ask for the smallest fresh capture needed, and state what it will verify.

    line 42
  6. Very specific:

    Run the snippets in bash (bash -c '...' from fish or zsh).

    line 70
  7. Very specific:

    Read .gh-inbox-state.json from the repository root.

    line 81
  8. Very specific:

    Update .gh-inbox-state.json with one entry per scanned item:

    line 139
  9. Very specific:

    Use the same shape for discussions.

    line 157

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

ASK GitHub Inbox

Process the current repository's GitHub inbox. Detect the repository from the current working directory, fetch issues and discussions, diff against stored state, triage new items, reply to users where the action is clear, and persist updated state to the local .gh-inbox-state.json file.

All GitHub replies, issue drafts, and report text must be written in English. Preserve user quotes and proper nouns as written. Never infer repository-specific behavior from this skill; inspect the repository, its documentation, and its existing GitHub conversation first.

GitHub replies must use clean Markdown: complete sentences, correct punctuation, paragraphs separated by blank lines, and new lines for lists or distinct points. Do not post compressed, run-on, or caveman-style prose to GitHub.

Evidence-aware communication

Before asking a reporter for more information, apply this policy:

  1. Read the complete issue, all comments, linked attachments, relevant fixtures, and recent implementation or release history.
  2. Separate evidence already available from the facts still unknown. Do not request an existing dump, log, or reproduction again.
  3. Identify the phase: report → investigation → evidence → implementation → release → verification.
  4. When an implementation or release exists, switch to verification mode. Confirm what changed and ask only for evidence of the remaining integration or real-world gap.
  5. Ask for the smallest fresh capture needed, and state what it will verify. Fresh evidence is justified when version, configuration, or hardware state changed.

Example: if existing raw data proves that registers are exposed and a released fix changes their integration mapping, request a fresh integration discovery capture from the new release. Do not restart with a generic diagnostic checklist or request the raw register proof again.

Flow

1. Fetch current state

First resolve the repository without hard-coded owner or name:

gh repo view --json nameWithOwner

Issues (sorted by most recently updated first):

gh issue list --state open --json number,title,updatedAt,comments,labels --limit 50

Discussions (number, title, updatedAt, comment count, latest comments with author + date):

OWNER=$(gh repo view --json owner --jq '.owner.login')
NAME=$(gh repo view --json name --jq '.name')
gh api graphql -f owner="$OWNER" -f name="$NAME" -f query='query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { discussions(first: 50, orderBy: {field: UPDATED_AT, direction: DESC}) { nodes { number title updatedAt url comments(last: 20) { totalCount nodes { id createdAt author { login } body replies(first: 20) { totalCount nodes { id createdAt author { login } body } } } } } } } }'

Run the snippets in bash (bash -c '...' from fish or zsh); the $VAR handling and quoting below assume bash.

comments(last: 20) returns the newest top-level comments; first returns the oldest, so a busy discussion would hide its latest post. When totalCount exceeds the 20 fetched, page older comments with comments(last: 20, before: <cursor>) (request pageInfo { startCursor hasPreviousPage }) only if the state diff needs them. GitHub rejects a query that can return more than 500,000 nodes (MAX_NODE_LIMIT_EXCEEDED); keep discussions(first: 50) × comments(last: 20) × replies(first: 20) and lower one of the three instead of raising any.

Discussion.comments returns only top-level comments; threaded replies hide under each comment's replies connection and do not bump comments.totalCount. When scanning, treat reply nodes as comments (author + body) and count them too, so a threaded user reply is triaged like any other new comment.

2. Diff against stored state

Read .gh-inbox-state.json from the repository root. The file is local, git-ignored state and must not be committed.

test -f .gh-inbox-state.json && cat .gh-inbox-state.json || printf '{}\n'

Stored entries use key issue-<n> or discussion-<n>, value JSON: {"last_updated_at": "<iso>", "last_comment_count": <int>, "replied_to": <bool>}.

An item is new when:

  • updatedAt > last_updated_at, OR
  • comment count (top-level + threaded replies) > last_comment_count

Items with no stored entry are always new. Report items where updatedAt is older than the stored state (nothing changed) as silent. Because updatedAt also changes on edits and reactions, never dismiss an "updated but count unchanged" discussion without checking its replies connections — a threaded user reply can arrive with the top-level count unchanged.

3. Triage and reply

For each new item, decide:

Reply directly (post without asking the repository owner) only when all of these apply:

  • The response is factual, low-risk, and supported by repository evidence.
  • The response does not promise unapproved work, change product behavior, or make a support commitment.
  • The response is a short acknowledgment, clarification, duplicate reference, or confirmation of an already completed action.

Suggest to the repository owner (do not post) when:

  • The request would change product behavior, scope, or support commitments
  • The request is stale, contradicts earlier info, or needs investigation before answering
  • The user reports a bug on unsupported/unknown hardware
  • Multiple interpretations exist

Draft new issues from discussion feature requests only as suggestions. Create issues only after explicit approval with gh issue create.

Post a direct reply with gh issue comment <n> --body "<text>" (for discussions, reply via gh api GraphQL addDiscussionComment; REST cannot create discussion comments — POST returns 404). When replying inside a thread, replyToId must be the thread's root comment: pointing it at a reply already inside the thread is rejected ("Parent comment is already in a thread, cannot reply to it"). After posting, mark the item replied_to: true.

4. Report

Give a compact English summary per item, for example:

#123 User report - reply posted; follow-up: investigate
#122 Feature report - no reply needed; existing fix covers it
Discussion 7 Feature request - reply suggested; issue creation needs approval

Also list items that changed since the last run but were already replied to, and any closed issues that were open before.

5. Persist state

Update .gh-inbox-state.json with one entry per scanned item:

python3 - <<'PY'
import json
from pathlib import Path

path = Path(".gh-inbox-state.json")
state = json.loads(path.read_text()) if path.exists() else {}
state["issue-<n>"] = {
    "last_updated_at": "<iso>",
    "last_comment_count": <int>,
    "replied_to": <bool>,
}
path.write_text(json.dumps(state, indent=2) + "\n")
PY

Use the same shape for discussions. Do this for every scanned item, not just the new ones. Preserve existing replied_to: true values unless a reply was never posted.

Use with

  • session-review when inbox triage surfaces a workflow gap worth filing
  • verification when repo cleanup follows an inbox pass

Avoid

  • Replying twice to the same thread (check replied_to and the live thread before posting)
  • Fabricating answers about behavior, support, compatibility, or planned work
  • Closing, labeling, assigning, or modifying issues without explicit approval
  • Guessing when repository metadata, discussion access, local state, or a reply target is unclear — stop and report the blocker

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.