Skip to content

Commit ca15a81

Browse files
feat(skills): cover discussion_comment_write and search_commits
discussion_comment_write joins browse-discussions; the body now points out the top-level-vs-reply distinction so the model picks the right parent ID. search_commits joins trace-history alongside list_commits. Body explains the boundary: list_commits for a known branch/path, search_commits for cross-repo and qualifier-driven lookups. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 7099f23 commit ca15a81

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

pkg/github/search_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ func Test_SearchCommits(t *testing.T) {
833833

834834
for _, tc := range tests {
835835
t.Run(tc.name, func(t *testing.T) {
836-
client := mustNewGHClient(t, tc.mockedClient)
836+
client := github.NewClient(tc.mockedClient)
837837
deps := BaseDeps{
838838
Client: client,
839839
}

pkg/github/skill_resources.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,11 @@ func skillTraceHistory() skillDefinition {
105105
allowedTools: []string{
106106
"list_commits",
107107
"get_commit",
108+
"search_commits",
108109
"search_pull_requests",
109110
"pull_request_read",
110111
},
111-
body: "# Trace Code History\n\nUnderstand why code changed by following the commit to PR to discussion chain.\n\n## Available Tools\n- `list_commits` — commit history, filterable by path\n- `get_commit` — full commit details and diff\n- `search_pull_requests` — find PRs by commit SHA or keywords\n- `pull_request_read` — read PR description and review discussion\n\n## Workflow\n1. `list_commits` with path filter to find relevant commits.\n2. `get_commit` to see what changed.\n3. `search_pull_requests` to find the PR (search by commit SHA or title keywords).\n4. `pull_request_read` for the PR description and review comments — this has the *why*.\n\nCommit messages say *what*. PR descriptions say *why*. Review comments say *what was considered*.\n",
112+
body: "# Trace Code History\n\nUnderstand why code changed by following the commit to PR to discussion chain.\n\n## Available Tools\n- `list_commits` — commit history on a branch, filterable by path/author/date\n- `get_commit` — full commit details and diff\n- `search_commits` — find commits across repos by message, author, date range, hash, or path qualifier\n- `search_pull_requests` — find PRs by commit SHA or keywords\n- `pull_request_read` — read PR description and review discussion\n\n## Workflow\n1. `list_commits` with path filter to find relevant commits on a known branch; use `search_commits` instead when you need cross-repo search or message/author qualifiers.\n2. `get_commit` to see what changed.\n3. `search_pull_requests` to find the PR (search by commit SHA or title keywords).\n4. `pull_request_read` for the PR description and review comments — this has the *why*.\n\nCommit messages say *what*. PR descriptions say *why*. Review comments say *what was considered*.\n",
112113
}
113114
}
114115

@@ -440,14 +441,15 @@ func skillContributeOSS() skillDefinition {
440441
func skillBrowseDiscussions() skillDefinition {
441442
return skillDefinition{
442443
name: "browse-discussions",
443-
description: "Read and explore GitHub Discussions and categories. Use when browsing discussions, reading community conversations, checking discussion categories, or looking for answers in a project's discussions.",
444+
description: "Read, explore, and reply to GitHub Discussions. Use when browsing discussions, reading community conversations, posting a reply or top-level comment in a discussion, checking discussion categories, or looking for answers in a project's discussions.",
444445
allowedTools: []string{
445446
"list_discussions",
446447
"get_discussion",
447448
"get_discussion_comments",
448449
"list_discussion_categories",
450+
"discussion_comment_write",
449451
},
450-
body: "# Browse Discussions\n\nRead and explore GitHub Discussions.\n\n## Available Tools\n- `list_discussions` — list discussions in a repo\n- `get_discussion` — get discussion details\n- `get_discussion_comments` — read comments and replies\n- `list_discussion_categories` — list available categories\n\nCall `list_discussion_categories` first to understand the discussion structure. Filter by category to find relevant conversations.\n",
452+
body: "# Browse Discussions\n\nRead, explore, and reply to GitHub Discussions.\n\n## Available Tools\n- `list_discussions` — list discussions in a repo\n- `get_discussion` — get discussion details\n- `get_discussion_comments` — read comments and replies\n- `list_discussion_categories` — list available categories\n- `discussion_comment_write` — add a top-level comment to a discussion or reply to an existing comment\n\nCall `list_discussion_categories` first to understand the discussion structure. Filter by category to find relevant conversations.\n\nWhen replying: a top-level discussion comment needs only the discussion ID; a threaded reply additionally needs the parent comment ID. Don't post a new top-level comment when the intent is to reply inline — that breaks the conversation thread.\n",
451453
}
452454
}
453455

0 commit comments

Comments
 (0)