Skip to content

Commit d820b49

Browse files
refactor: use backtick tool references in skill body content
Update all 16 skill definitions to use explicit backtick-formatted tool names with '## Available Tools' sections instead of bold markdown references. This makes tool names more reliably parseable by models that consume the SKILL.md content via load_skill. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 2140dd3 commit d820b49

1 file changed

Lines changed: 131 additions & 65 deletions

File tree

pkg/github/skill_resources.go

Lines changed: 131 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,12 @@ func skillContext() skillDefinition {
5454
},
5555
body: `# GitHub Context
5656
57-
Always call **get_me** first to understand the current user's permissions and context.
57+
Always call ` + "`get_me`" + ` first to understand the current user's permissions and context.
5858
59-
- **get_me** — returns the authenticated user's profile and permissions
60-
- **get_teams** — lists teams the user belongs to
61-
- **get_team_members** — lists members of a specific team
59+
## Available Tools
60+
- ` + "`get_me`" + ` — get the authenticated user's profile and permissions
61+
- ` + "`get_teams`" + ` — list teams the user belongs to
62+
- ` + "`get_team_members`" + ` — list members of a specific team
6263
`,
6364
}
6465
}
@@ -90,16 +91,20 @@ func skillRepos() skillDefinition {
9091
9192
Tools for managing GitHub repositories, browsing code, and working with branches, tags, and releases.
9293
93-
## Tool Selection
94-
- Use **search_repositories** for finding repos by criteria and **search_code** for finding code containing specific patterns.
95-
- Use **list_*** tools for broad retrieval with pagination (e.g., all branches, all commits).
96-
97-
## Context Management
98-
- Use pagination with batches of 5-10 items.
99-
- Set **minimal_output** to true when full details are not needed.
94+
## Available Tools
95+
- ` + "`search_repositories`" + ` — find repos by name, topic, language, org
96+
- ` + "`get_file_contents`" + ` — read files or directories from a repo
97+
- ` + "`list_commits`" + ` — get commit history for a branch or path
98+
- ` + "`search_code`" + ` — search for code patterns across repos
99+
- ` + "`get_commit`" + ` — get details of a specific commit
100+
- ` + "`list_branches`" + ` / ` + "`list_tags`" + ` — list branches or tags
101+
- ` + "`get_tag`" + ` — get details of a specific tag
102+
- ` + "`list_releases`" + ` / ` + "`get_latest_release`" + ` / ` + "`get_release_by_tag`" + ` — browse releases
103+
- ` + "`create_or_update_file`" + ` / ` + "`push_files`" + ` / ` + "`delete_file`" + ` — modify files
104+
- ` + "`create_repository`" + ` / ` + "`fork_repository`" + ` / ` + "`create_branch`" + ` — create repos or branches
100105
101106
## Sorting
102-
For search tools, use separate **sort** and **order** parameters — do not include 'sort:' syntax in query strings. Query strings should contain only search criteria (e.g., 'org:google language:python').
107+
For search tools, use separate ` + "`sort`" + ` and ` + "`order`" + ` parameters — do not include 'sort:' syntax in query strings. Query strings should contain only search criteria (e.g., 'org:google language:python').
103108
`,
104109
}
105110
}
@@ -135,14 +140,32 @@ func skillIssues() skillDefinition {
135140
136141
Tools for creating, reading, updating, and searching GitHub issues.
137142
138-
## Workflow
139-
1. Check **list_issue_types** first for organizations to discover proper issue types.
140-
2. Use **search_issues** before creating new issues to avoid duplicates.
141-
3. Always set **state_reason** when closing issues.
143+
## Available Tools
144+
- ` + "`issue_read`" + ` — get details of a specific issue
145+
- ` + "`search_issues`" + ` — search for issues with specific criteria or keywords
146+
- ` + "`list_issues`" + ` — list issues with basic filtering and pagination
147+
- ` + "`list_issue_types`" + ` — list available issue types for an organization
148+
- ` + "`issue_write`" + ` — create or update an issue (composite tool)
149+
- ` + "`add_issue_comment`" + ` — add a comment to an issue
150+
- ` + "`sub_issue_write`" + ` — manage sub-issues (composite tool)
151+
- ` + "`get_label`" + ` — get details of a specific label
152+
- ` + "`create_issue`" + ` — create a new issue
153+
- ` + "`update_issue_title`" + ` — update an issue's title
154+
- ` + "`update_issue_body`" + ` — update an issue's body
155+
- ` + "`update_issue_assignees`" + ` — update an issue's assignees
156+
- ` + "`update_issue_labels`" + ` — update an issue's labels
157+
- ` + "`update_issue_milestone`" + ` — update an issue's milestone
158+
- ` + "`update_issue_type`" + ` — update an issue's type
159+
- ` + "`update_issue_state`" + ` — update an issue's state (open/closed)
160+
- ` + "`add_sub_issue`" + ` — add a sub-issue to a parent issue
161+
- ` + "`remove_sub_issue`" + ` — remove a sub-issue from a parent
162+
- ` + "`reprioritize_sub_issue`" + ` — change the priority of a sub-issue
163+
- ` + "`set_issue_fields`" + ` — set custom project fields on an issue
142164
143-
## Tool Selection
144-
- Use **search_issues** for targeted queries with specific criteria or keywords.
145-
- Use **list_issues** for broad retrieval of all issues with basic filtering and pagination.
165+
## Workflow
166+
1. Call ` + "`list_issue_types`" + ` first for organizations to discover proper issue types.
167+
2. Call ` + "`search_issues`" + ` before creating new issues to avoid duplicates.
168+
3. Always set ` + "`state_reason`" + ` when closing issues.
146169
`,
147170
}
148171
}
@@ -179,18 +202,37 @@ func skillPullRequests() skillDefinition {
179202
180203
Tools for creating, reviewing, merging, and managing GitHub pull requests.
181204
205+
## Available Tools
206+
- ` + "`pull_request_read`" + ` — get details of a specific pull request
207+
- ` + "`list_pull_requests`" + ` — list pull requests with basic filtering and pagination
208+
- ` + "`search_pull_requests`" + ` — search for pull requests with specific criteria
209+
- ` + "`merge_pull_request`" + ` — merge a pull request
210+
- ` + "`update_pull_request_branch`" + ` — update a PR branch with the base branch
211+
- ` + "`create_pull_request`" + ` — create a new pull request
212+
- ` + "`update_pull_request`" + ` — update a pull request (composite tool)
213+
- ` + "`pull_request_review_write`" + ` — manage PR reviews (composite tool)
214+
- ` + "`add_comment_to_pending_review`" + ` — add a line comment to a pending review
215+
- ` + "`add_reply_to_pull_request_comment`" + ` — reply to a PR review comment
216+
- ` + "`update_pull_request_title`" + ` — update a PR's title
217+
- ` + "`update_pull_request_body`" + ` — update a PR's body
218+
- ` + "`update_pull_request_state`" + ` — update a PR's state (open/closed)
219+
- ` + "`update_pull_request_draft_state`" + ` — convert between draft and ready
220+
- ` + "`request_pull_request_reviewers`" + ` — request reviewers for a PR
221+
- ` + "`create_pull_request_review`" + ` — create a new PR review
222+
- ` + "`submit_pending_pull_request_review`" + ` — submit a pending review
223+
- ` + "`delete_pending_pull_request_review`" + ` — delete a pending review
224+
- ` + "`add_pull_request_review_comment`" + ` — add a review comment to a PR
225+
- ` + "`resolve_review_thread`" + ` — resolve a review thread
226+
- ` + "`unresolve_review_thread`" + ` — unresolve a review thread
227+
182228
## PR Review Workflow
183229
For complex reviews with line-specific comments:
184-
1. Use **pull_request_review_write** with method 'create' to create a pending review.
185-
2. Use **add_comment_to_pending_review** to add line comments.
186-
3. Use **pull_request_review_write** with method 'submit_pending' to submit the review.
230+
1. Call ` + "`create_pull_request_review`" + ` or ` + "`pull_request_review_write`" + ` with method 'create' to create a pending review.
231+
2. Call ` + "`add_comment_to_pending_review`" + ` to add line comments.
232+
3. Call ` + "`submit_pending_pull_request_review`" + ` or ` + "`pull_request_review_write`" + ` with method 'submit_pending' to submit.
187233
188234
## Creating Pull Requests
189235
Before creating a PR, search for pull request templates in the repository. Template files are called pull_request_template.md or located in the '.github/PULL_REQUEST_TEMPLATE' directory. Use the template content to structure the PR description.
190-
191-
## Tool Selection
192-
- Use **search_pull_requests** for targeted queries with specific criteria.
193-
- Use **list_pull_requests** for broad retrieval with basic filtering and pagination.
194236
`,
195237
}
196238
}
@@ -211,12 +253,15 @@ func skillCodeSecurity() skillDefinition {
211253
212254
Tools for viewing security alerts across GitHub repositories.
213255
214-
## Alert Types
215-
- **Code Scanning** — static analysis alerts (CodeQL, third-party tools)
216-
- **Secret Scanning** — detected secrets and credentials in code
217-
- **Dependabot** — vulnerable dependency alerts
256+
## Available Tools
257+
- ` + "`get_code_scanning_alert`" + ` — get details of a specific code scanning alert
258+
- ` + "`list_code_scanning_alerts`" + ` — list code scanning alerts for a repo
259+
- ` + "`get_secret_scanning_alert`" + ` — get details of a specific secret scanning alert
260+
- ` + "`list_secret_scanning_alerts`" + ` — list secret scanning alerts for a repo
261+
- ` + "`get_dependabot_alert`" + ` — get details of a specific Dependabot alert
262+
- ` + "`list_dependabot_alerts`" + ` — list Dependabot alerts for a repo
218263
219-
Use **list_*** tools to get an overview of alerts, then **get_*** to inspect specific alerts in detail.
264+
Use ` + "`list_*`" + ` tools to get an overview of alerts, then ` + "`get_*`" + ` to inspect specific alerts in detail.
220265
`,
221266
}
222267
}
@@ -235,10 +280,11 @@ func skillActions() skillDefinition {
235280
236281
Tools for interacting with GitHub Actions workflows and CI/CD operations.
237282
238-
- **actions_list** — list workflow runs for a repository
239-
- **actions_get** — get details of a specific workflow run
240-
- **actions_run_trigger** — trigger a workflow run
241-
- **get_job_logs** — retrieve logs from a specific job
283+
## Available Tools
284+
- ` + "`actions_list`" + ` — list workflow runs for a repository
285+
- ` + "`actions_get`" + ` — get details of a specific workflow run
286+
- ` + "`actions_run_trigger`" + ` — trigger a workflow run
287+
- ` + "`get_job_logs`" + ` — retrieve logs from a specific job
242288
`,
243289
}
244290
}
@@ -257,7 +303,13 @@ func skillDiscussions() skillDefinition {
257303
258304
Tools for browsing and reading GitHub Discussions.
259305
260-
Use **list_discussion_categories** to understand available categories before creating discussions. Filter by category for better organization.
306+
## Available Tools
307+
- ` + "`list_discussions`" + ` — list discussions in a repository
308+
- ` + "`get_discussion`" + ` — get details of a specific discussion
309+
- ` + "`get_discussion_comments`" + ` — get comments on a discussion
310+
- ` + "`list_discussion_categories`" + ` — list available discussion categories
311+
312+
Call ` + "`list_discussion_categories`" + ` to understand available categories before filtering discussions.
261313
`,
262314
}
263315
}
@@ -275,11 +327,16 @@ func skillProjects() skillDefinition {
275327
276328
Tools for managing GitHub Projects (v2).
277329
330+
## Available Tools
331+
- ` + "`projects_list`" + ` — list projects for a user, org, or repo
332+
- ` + "`projects_get`" + ` — get project details, fields, items, or status updates
333+
- ` + "`projects_write`" + ` — create/update/delete project items, fields, or status updates
334+
278335
## Workflow
279-
1. Call **projects_list** to find projects.
280-
2. Use **projects_get** with list_project_fields to understand available fields and get IDs/types.
281-
3. Use **projects_get** with list_project_items (with pagination) to browse items.
282-
4. Use **projects_write** for updates.
336+
1. Call ` + "`projects_list`" + ` to find projects.
337+
2. Call ` + "`projects_get`" + ` with list_project_fields to understand available fields and get IDs/types.
338+
3. Call ` + "`projects_get`" + ` with list_project_items (with pagination) to browse items.
339+
4. Call ` + "`projects_write`" + ` for updates.
283340
284341
## Status Updates
285342
Use list_project_status_updates to read recent project status updates (newest first). Use get_project_status_update with a node ID to get a single update. Use create_project_status_update to create a new status update.
@@ -322,12 +379,13 @@ func skillNotifications() skillDefinition {
322379
323380
Tools for viewing and managing GitHub notifications.
324381
325-
- **list_notifications** — list unread and read notifications
326-
- **get_notification_details** — get details of a specific notification
327-
- **dismiss_notification** — mark a notification as done
328-
- **mark_all_notifications_read** — mark all notifications as read
329-
- **manage_notification_subscription** — manage thread subscription settings
330-
- **manage_repository_notification_subscription** — manage repository notification settings
382+
## Available Tools
383+
- ` + "`list_notifications`" + ` — list unread and read notifications
384+
- ` + "`get_notification_details`" + ` — get details of a specific notification
385+
- ` + "`dismiss_notification`" + ` — mark a notification as done
386+
- ` + "`mark_all_notifications_read`" + ` — mark all notifications as read
387+
- ` + "`manage_notification_subscription`" + ` — manage thread subscription settings
388+
- ` + "`manage_repository_notification_subscription`" + ` — manage repository notification settings
331389
`,
332390
}
333391
}
@@ -346,10 +404,11 @@ func skillGists() skillDefinition {
346404
347405
Tools for managing GitHub Gists — lightweight code snippets and file sharing.
348406
349-
- **list_gists** — list gists for the authenticated user
350-
- **get_gist** — retrieve a specific gist by ID
351-
- **create_gist** — create a new gist (public or private)
352-
- **update_gist** — update an existing gist's files or description
407+
## Available Tools
408+
- ` + "`list_gists`" + ` — list gists for the authenticated user
409+
- ` + "`get_gist`" + ` — retrieve a specific gist by ID
410+
- ` + "`create_gist`" + ` — create a new gist (public or private)
411+
- ` + "`update_gist`" + ` — update an existing gist's files or description
353412
`,
354413
}
355414
}
@@ -366,10 +425,11 @@ func skillUsersOrgs() skillDefinition {
366425
367426
Tools for searching GitHub users and organizations.
368427
369-
- **search_users** — search for users by username, name, location, or other criteria
370-
- **search_orgs** — search for organizations by name or other criteria
428+
## Available Tools
429+
- ` + "`search_users`" + ` — search for users by username, name, location, or other criteria
430+
- ` + "`search_orgs`" + ` — search for organizations by name or other criteria
371431
372-
Use separate **sort** and **order** parameters for sorting results — do not include 'sort:' syntax in query strings.
432+
For search tools, use separate ` + "`sort`" + ` and ` + "`order`" + ` parameters — do not include 'sort:' syntax in query strings.
373433
`,
374434
}
375435
}
@@ -388,10 +448,11 @@ func skillSecurityAdvisories() skillDefinition {
388448
389449
Tools for browsing security advisories on GitHub.
390450
391-
- **list_global_security_advisories** — search the GitHub Advisory Database
392-
- **get_global_security_advisory** — get details of a specific global advisory
393-
- **list_repository_security_advisories** — list advisories for a specific repository
394-
- **list_org_repository_security_advisories** — list advisories across an organization's repositories
451+
## Available Tools
452+
- ` + "`list_global_security_advisories`" + ` — search the GitHub Advisory Database
453+
- ` + "`get_global_security_advisory`" + ` — get details of a specific global advisory
454+
- ` + "`list_repository_security_advisories`" + ` — list advisories for a specific repository
455+
- ` + "`list_org_repository_security_advisories`" + ` — list advisories across an organization's repositories
395456
`,
396457
}
397458
}
@@ -409,8 +470,10 @@ func skillLabels() skillDefinition {
409470
410471
Tools for managing labels on GitHub repositories.
411472
412-
- **list_label** / **list_labels** — list labels for a repository
413-
- **label_write** — create, update, or delete labels
473+
## Available Tools
474+
- ` + "`list_label`" + ` — get a specific label by name
475+
- ` + "`list_labels`" + ` — list all labels for a repository
476+
- ` + "`label_write`" + ` — create, update, or delete labels
414477
`,
415478
}
416479
}
@@ -426,7 +489,8 @@ func skillGit() skillDefinition {
426489
427490
Low-level Git operations via the GitHub API.
428491
429-
- **get_repository_tree** — retrieve the tree structure of a repository at a given ref, useful for understanding repository layout
492+
## Available Tools
493+
- ` + "`get_repository_tree`" + ` — retrieve the tree structure of a repository at a given ref, useful for understanding repository layout
430494
`,
431495
}
432496
}
@@ -444,9 +508,10 @@ func skillStargazers() skillDefinition {
444508
445509
Tools for managing repository stars.
446510
447-
- **list_starred_repositories** — list repositories starred by the authenticated user
448-
- **star_repository** — star a repository
449-
- **unstar_repository** — unstar a repository
511+
## Available Tools
512+
- ` + "`list_starred_repositories`" + ` — list repositories starred by the authenticated user
513+
- ` + "`star_repository`" + ` — star a repository
514+
- ` + "`unstar_repository`" + ` — unstar a repository
450515
`,
451516
}
452517
}
@@ -463,8 +528,9 @@ func skillCopilot() skillDefinition {
463528
464529
Tools for using GitHub Copilot in your workflow.
465530
466-
- **assign_copilot_to_issue** — assign Copilot as a collaborator on an issue
467-
- **request_copilot_review** — request a Copilot review on a pull request
531+
## Available Tools
532+
- ` + "`assign_copilot_to_issue`" + ` — assign Copilot as a collaborator on an issue
533+
- ` + "`request_copilot_review`" + ` — request a Copilot review on a pull request
468534
`,
469535
}
470536
}

0 commit comments

Comments
 (0)