ghgghQuery a GitHub repository's star count and lines of code. Use when the user asks for repo stars, stargazers, LOC, code lines, or repository statistics for a given GitHub repo.
Install via ClawdBot CLI:
clawdbot install Chenpinji/ghggh在用户需要查询某个 GitHub 仓库的 star 数量和代码行数时,按下列方式执行。
使用 GitHub REST API(无需 token 即可查询公开仓库):
GET https://api.github.com/repos/{owner}/{repo}stargazers_count 即为 star 数。示例(将 owner/repo 换成实际仓库,如 vllm-project/vllm):
curl -s "https://api.github.com/repos/owner/repo" | jq '.stargazers_count'
或在代码中请求同一 URL,解析 JSON 取 stargazers_count。若请求受限可设置 User-Agent 头(如 User-Agent: curl)。
GitHub API 不直接提供“总代码行数”,常用做法是克隆仓库后本地统计。
git clone --depth 1 https://github.com/owner/repo.git /tmp/repo-stat && cloc /tmp/repo-stat --json
安装:sudo apt install cloc 或 pip install cloc(若有)。从输出 JSON 中取 SUM 的 code 作为代码行数,并清理临时目录。
回复用户时建议包含:
owner/repo若克隆或统计失败,说明原因并给出可替代方式(例如仅提供 star 数,或提供仓库语言占比链接)。
Generated Mar 1, 2026
Developers and tech leads can use this skill to quickly assess the popularity and codebase size of open source projects before adopting them. This helps in making informed decisions about dependencies and understanding community support levels.
Product managers and business analysts can monitor competitor GitHub repositories to track their project growth, community engagement, and development activity. This provides insights into market trends and competitor investment in open source.
Researchers studying software engineering metrics can gather data on repository popularity and code volume across multiple projects. This supports empirical studies on project success factors and development patterns.
Recruiters and hiring managers can evaluate candidates' GitHub contributions by checking the scale and popularity of their repositories. This provides quantitative data to complement qualitative code reviews during technical hiring processes.
Technical writers and journalists can gather statistics for articles comparing popular open source tools or reporting on trending projects. The star count serves as a popularity metric while code lines indicate project complexity.
Integrate this skill into a subscription-based analytics dashboard that tracks GitHub repository metrics over time. Offer automated reporting, trend analysis, and competitive benchmarking for development teams and enterprises.
Bundle this functionality into existing developer tools like IDEs, CI/CD platforms, or project management software. Charge through premium feature tiers or enterprise licensing for enhanced GitHub analytics capabilities.
Offer this as a dedicated API service with higher rate limits, historical data, and additional metrics beyond basic star and LOC counts. Target businesses needing reliable GitHub data for their applications without managing API constraints.
💬 Integration Tip
Implement caching for star counts to avoid GitHub API rate limits, and consider offering LOC statistics as an optional feature since it requires local computation.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Query the DeepWiki MCP server for GitHub repository documentation, wiki structure, and AI-powered questions.
Automated GitHub PR code review with diff analysis, lint integration, and structured reports. Use when reviewing pull requests, checking for security issues,...
Essential Git commands and workflows for version control, branching, and collaboration.
Advanced git operations beyond add/commit/push. Use when rebasing, bisecting bugs, using worktrees for parallel development, recovering with reflog, managing subtrees/submodules, resolving merge conflicts, cherry-picking across branches, or working with monorepos.
Format commit messages using the Conventional Commits specification. Use when creating commits, writing commit messages, or when the user mentions commits, git commits, or commit messages. Ensures commits follow the standard format for automated tooling, changelog generation, and semantic versioning.