2026-05-23
Rebuilding gitlink-health with Go
Today I wanted to check if anyone had submitted a PR about automatic issue labeling, but I found that my own gitlink-health PR hadn't been merged yet. I went in and saw that the reviewer had made a new request — implement it in Go.
Review: PR #17 — gitlink-health Skill
Overall Assessment: Good direction, suggest adjusting the implementation approach
First, thank you @yingjie for this contribution! Project health analysis is a very practical scenario, and the selection of the three core metrics — Issue resolution time, PR merge rate, and contributor activity — is very accurate. Testing across multiple Agent platforms including Claude Code, Kilo CLI, Kimi Code, and Hermes also demonstrates the author's deep understanding of the AI Agent ecosystem.
However, I have a significant concern about the architectural choice of placing Python code in the
skillsdirectory and recommend replacing it with a pure Go solution.Core Issue: Python breaks the boundary of the skills directory
Currently, all 12 skills under
skills/are pure Markdown documents (totaling about 30KB). The npm package'sfilesfield directly bundles the entireskills/directory. Introducing Python code means:
- New runtime dependency — After
npm install -g, only Node.js is guaranteed; Python 3.8+ needs to be installed separately- Blurred positioning of skills — If gitlink-health can include Python scripts, could other skills include shell scripts? Node.js scripts? The boundary is unclear
- Package bloat — Although
fetcher.pyonly uses stdlib and doesn't depend on pip, the skill files go from pure documentation to "documentation + executable tool + SQL schema"Suggested Solution: Go-ify the data collection logic
What
fetcher.pydoes is essentially:
- Paginate calls to
pr +list/issue +listto fetch lists- For each record, call
pr +view/issue +viewto get details- Parse JSON and write to SQLite
All of this can be implemented in Go as a built-in command
gitlink-cli health +fetch:
- Reuse existing capabilities — HTTP client, auth token, JSON parsing,
PaginateAllpagination logic are all already available- Pure Go SQLite —
modernc.org/sqlitewithout CGO dependency, cross-platform cross-compilation unaffected- Concurrent detail fetching — goroutines can fetch details for each PR/Issue in parallel, much faster than Python's sequential approach
- Zero extra dependencies — binary distribution, users only need gitlink-cli itself
At the Skill level,
SKILL.mdwould be simplified to:
# Collect data
gitlink-cli health +fetch --owner <owner> --repo <repo>
# Execute SQL analysis queries (refer to references/queries.md)
sqlite3 data/gitlink_health.db "SELECT ..."
# Fill in report templateSpecific Suggestions
collector/fetcher.py+schema.sql→ Go code undershortcuts/health/, registered asgitlink-cli health +fetchSKILL.md,references/queries.md,asset/remain inskills/gitlink-health/(pure documentation)data/directory and*.dbstay in gitignore- Report templates and SQL query analysis are still executed by the AI Agent (that's the Skill's responsibility)
Verdict: 🔄 Changes Required
The scenario value and workflow design of this PR are both very good. The main hope is to replace the Python collection script with a Go built-in command, keeping the skills directory purely documentation. If the author is interested in making the changes, I'd be happy to help review the Go code. If time doesn't permit, I can also merge the core ideas first and do the Go migration myself later.
Thank you again for the contribution!
In summary, the reviewer wants me to internalize the data collection code into gitlink-cli.