Add guidance on GitHub autolinked reference formatting for AI agents
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 88/100
Hướng nghiên cứu
Bắt đầu tại pkg/github/toolset_instructions.go, ở generateContextToolsetInstructions(), và so sánh hướng dẫn github_support_docs_search hiện có. Xác minh rằng context cơ sở được tạo có một liên kết ngắn gọn đến tài liệu của GitHub về các tham chiếu autolinked trước khi sử dụng các công cụ tạo nội dung. Được xem là hoàn tất khi hướng dẫn bao quát các tham chiếu issue, pull request, comment và discussion mà không thêm công cụ mới hoặc nhân bản công cụ đó trong các toolset khác.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the feature or problem you'd like to solve
AI agents using the MCP server create manual markdown links when they could use GitHub's built-in autolinked references instead. GitHub automatically renders patterns like #123, @username, and owner/repo#123 as clickable links across issues, pull requests, comments, and discussions—but agents lack this knowledge in their system instructions.
For complete reference and examples, see:
https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls
Proposed solution
Add guidance to the base context instructions (via generateContextToolsetInstructions()) so all agents learn about autolinked references before using any content-creation tools. This ensures consistent formatting across all GitHub interactions without duplicating guidance in multiple toolsets.
Benefits:
- Universal coverage: Applies to all content-creation tools (issues, PRs, comments, discussions)
- Single source of truth: One place to maintain, not scattered across toolsets
- Early discovery: Agents see this guidance at initialization, before using any specific tool
- No duplication: Leverage official docs instead of repeating content
Implementation:
Add a section to pkg/github/toolset_instructions.go in generateContextToolsetInstructions():
func generateContextToolsetInstructions(_ *inventory.Inventory) string {
return `Always call 'get_me' first to understand current user permissions and context.
### GitHub Autolinked References
When creating issues, pull requests, comments, or discussions, use GitHub's autolinked reference syntax—issue numbers (#123), user mentions (@example-username), and cross-repo references (example-owner/example-repo#123)—so GitHub renders them as links automatically.
See the official docs for complete details: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls.md`
}
This approach follows the existing pattern of github_support_docs_search, which references official documentation rather than duplicating content.
Additional context
This is a lightweight enhancement that integrates seamlessly into the existing base context instructions. No new tools or infrastructure required—just a brief instruction pointing agents to official GitHub docs.
Future enhancement:
If agents need to proactively request formatting guidance (e.g., "How should I format this reference?"), consider creating a dedicated resource or skill in the MCP server. This would allow agents to ask for formatting help on-demand while still having the baseline guidance available at initialization. This can be explored as a follow-up if needed.
- Ngôn ngữ chính
- Go
- Star
- 33.1k
- Fork
- 5k
- Merge trung bình
- 2 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 25
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/github-mcp-server
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
github/github-mcp-server#3235 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/github-mcp-server#3032 · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
github/github-mcp-server#2803 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
github/github-mcp-server#2740 ·
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
github/github-mcp-server#2661 · 1 bình luận ·
Tất cả issue của github/github-mcp-server
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
crossplane/crossplane#7859 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
bazel-contrib/rules_go#4721 · 2 bình luận ·
-
needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
bug carvel-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
carvel-dev/kapp-controller#1861 ·
-
area/logging kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100