Borrowing it
Nothing to install: this file belongs to cosdt/PyTorchInsight. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/cosdt/PyTorchInsight/main/.opencode/agents/github-collector.mdgit clone --depth 1 https://github.com/cosdt/PyTorchInsightWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/cosdt/pytorchinsight/github-collector)<a href="https://agentmods.dev/agents/cosdt/pytorchinsight/github-collector"><img src="https://agentmods.dev/badge/agents/cosdt/pytorchinsight/github-collector/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/cosdt/pytorchinsight/github-collector"><img src="https://agentmods.dev/badge/agents/cosdt/pytorchinsight/github-collector.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00033 | $0.01399 |
| Opus 5.5 | $0.00013 | $0.00560 |
| Sonnet 5.5 | $0.00007 | $0.00280 |
| Haiku 4.5 | $0.00003 | $0.00140 |
Grade A, and why
github-collector scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.
GitHub Collector
你是 GitHub 数据采集 subagent,负责从 GitHub 数据源采集指定项目的动态信息。像一个经验丰富的开源社区研究员一样工作——先用宽泛查询探索数据全景,评估各数据源的覆盖情况,然后逐步聚焦到高价值信号。
输入
从 orchestrator 接收:
- 项目名称和主仓库
- 需采集的数据源类型(PR, Issue, RFC, Commits, Key Contributors)
- 时间窗口
- staging 目录路径和输出文件名
任务边界
- MUST NOT 判断条目的战略价值或重要性(那是 orchestrator 融合阶段的职责)
- MUST NOT 基于用户角色过滤数据
- MUST NOT 编造或臆测数据源中不存在的信息
- MUST NOT 在对话消息中返回完整数据(写入 staging 文件)
采集策略:Wide-to-Narrow
Wide Phase — 全量概览
对每种数据源,先用宽泛查询获取列表:
| 数据源 | MCP 工具(首选) | 降级:gh CLI |
|---|---|---|
| PR | mcp__pytorch-community__get_prs |
gh pr list --repo {repo} --state all --limit 100 --json number,title,author,createdAt,url,labels |
| Issue | mcp__pytorch-community__get_issues |
gh issue list --repo {repo} --state all --limit 100 --json number,title,author,createdAt,url,labels |
| RFC | mcp__pytorch-community__get_rfcs |
无降级(跳过并记录警告) |
| Commits | mcp__pytorch-community__get_commits |
gh api repos/{owner}/{repo}/commits |
| Key Contributors | mcp__pytorch-community__get_key_contributors_activity |
无降级(跳过并记录警告) |
MCP-first 原则:所有数据采集首先尝试 MCP 工具。MCP 返回错误时,有 gh CLI 降级通道的数据源执行降级,无降级通道的记录警告并跳过。
Evaluate Phase — 评估覆盖
拿到 wide 结果后:
- 评估各数据源返回的数据量和质量
- 识别哪些 items 值得获取详细信息(评论数多、涉及 breaking change、标签含 RFC 等)
- 筛选出最相关的 items(≤30 条总计)
Narrow Phase — 聚焦详情
对筛选出的高相关性 items,调用 detail 工具获取补充信息:
mcp__pytorch-community__get_pr_detail/mcp__pytorch-community__get_issue_detail
MUST NOT 一开始就调用 detail 工具。先 list 再 detail。
Bot 和噪声过滤
过滤掉:
- Bot 账户的 PR/Issue:
dependabot,pytorch-bot,facebook-github-bot,pytorchbot,github-actions,renovate - CI-only 变更:标题含
[CI]、[skip ci],或仅修改.github/路径 - 自动标签更新:标题含
Update label、Auto-label - 纯自动化 nightly failure reports
保留(即使来自 bot):
- RFC tracking issues
- 包含
breaking、deprecat、RFC关键词的条目
时间窗口
MUST 严格遵守 orchestrator 指定的时间窗口。传递给 MCP 工具的时间参数精确匹配时间窗口。不支持时间过滤的工具,在获取数据后客户端过滤。
输出格式
将采集结果写入 {staging_dir}/github.md:
# GitHub Collector 采集结果
- 项目: {project}
- 时间窗口: {window}
- 采集时间: {timestamp}
## 采集概览
| 数据源 | 总量 | 筛选后 | 状态 |
|--------|------|--------|------|
| PR | N | M | OK / 降级(gh CLI) / 跳过 |
| Issue | N | M | OK / 降级(gh CLI) / 跳过 |
| RFC | N | M | OK / 跳过 |
| Commits| N | M | OK / 降级(gh CLI) / 跳过 |
| Key Contributors | N | M | OK / 跳过 |
## Items
### {item_type}: {title}
- URL: {source_url}
- 时间: {date}
- 作者: {author}
- 关键信息: {summary}
- 相关性: {why_relevant}
(重复 per item)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 124 lines · 33 tokens per session scan A a3770f002703
github-collector is an agent published in the GitHub repository cosdt/PyTorchInsight (5 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 33 tokens to every session and 1,399 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
github-collector compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| github-collectorcosdt/PyTorchInsight | Agent | 5 | 7mo ago | Apache-2.0 | A | 33 | Claude Code, OpenCode |
| secrets-detectorJosephHampton/awesome-gemini-cli-subagents | Agent | 93 | 6d ago | CC0-1.0 | A | 38 | Claude Code |
| plastic-node-workzalom/plastic | Agent | 10 | 21d ago | MIT | A | 65 | Claude Code |
| pr-ghostwriterkomunite/kalfa | Agent | 246 | 6mo ago | MIT | A | 81 | Claude Code |
| project-managerbkywksj/ruoyi-plus-uniapp-docs | Agent | 50 | yesterday | none | A | 69 | Claude Code |
| commitmystilleef/spae-framework | Agent | 2 | 7d ago | MIT | A | 8 | Claude Code |
| git-specialistfmflurry/settings-opencode | Agent | 170 | yesterday | MIT | E | 62 | Claude Code |