diff --git a/skills/README.md b/skills/README.md index f467946..2ef5c54 100644 --- a/skills/README.md +++ b/skills/README.md @@ -79,8 +79,6 @@ skills/ │ └── references/ # PR 命令参考文档 ├── gitlink-member/ # 仓库成员管理 │ └── SKILL.md # 成员与邀请链接操作指南 -├── gitlink-invite/ # 项目邀请管理 -│ └── SKILL.md # 邀请链接、加入/退出项目操作指南 ├── gitlink-branch/ # 分支管理 │ ├── SKILL.md # 分支操作指南 │ └── examples/ @@ -107,48 +105,6 @@ skills/ │ └── SKILL.md # Wiki 操作指南 ├── gitlink-pm/ # 项目管理 │ └── SKILL.md # PM 操作指南 -├── gitlink-research-reproducibility/ # 科研仓库复现性审计 -│ ├── SKILL.md -│ ├── references/ -│ │ └── checklist.md -│ └── examples/ -│ └── reproducibility-audit.md -├── gitlink-research-compliance/ # 科研开源合规与敏感风险检查 -│ ├── SKILL.md -│ ├── references/ -│ │ └── risk-rules.md -│ └── examples/ -│ └── compliance-audit.md -├── gitlink-research-progress-tracker/ # 科研项目进度跟踪与预警 -│ ├── SKILL.md -│ ├── references/ -│ │ └── risk-model.md -│ └── examples/ -│ └── weekly-report.md -├── gitlink-research-collaboration-map/ # 科研协作画像与合作建议 -│ ├── SKILL.md -│ ├── references/ -│ │ └── profile-fields.md -│ └── examples/ -│ └── collaboration-map.md -├── gitlink-research-knowledge-graph/ # 科研热点追踪与轻量知识图谱 -│ ├── SKILL.md -│ ├── references/ -│ │ └── graph-schema.md -│ └── examples/ -│ └── keyword-map.md -├── gitlink-research-data-provenance/ # 科研数据来源与隐私审计 -│ ├── SKILL.md -│ ├── references/ -│ │ └── provenance-rules.md -│ └── examples/ -│ └── data-provenance-audit.md -├── gitlink-research-artifact-handbook/ # 科研成果沉淀手册生成 -│ ├── SKILL.md -│ ├── references/ -│ │ └── handbook-template.md -│ └── examples/ -│ └── artifact-handbook.md ├── gitlink-health/ # 项目健康度分析 │ ├── SKILL.md # 健康度分析指南 │ ├── data/ @@ -158,6 +114,10 @@ skills/ │ │ └── queries.md # SQL 查询参考 │ └── asset/ │ └── health_report_template.md # 报告模板 +├── gitlink-research-trust/ # 科研开源可信度评估 +│ ├── SKILL.md # 复现性、可追踪性、合规与文档评分 +│ └── examples/ +│ └── research-trust-workflow.md # 科研可信度工作流示例 └── gitlink-workflow/ # AI 自动化工作流 └── SKILL.md # 工作流模板(Issue 分类、PR Review、Release Notes) ``` @@ -175,7 +135,6 @@ skills/ | **gitlink-issue** | Issue 管理 | `issue +create`, `issue +list`, `issue +view`, `issue +close`, `issue +batch-close`, `issue +batch-update`, `issue +batch-delete` | | **gitlink-pr** | Pull Request | `pr +list`, `pr +create`, `pr +view`, `pr +merge`, `pr +versions`, `pr +version-diff`, `pr +reviews`, `pr +review` | | **gitlink-member** | 仓库成员管理 | `member +list`, `member +add`, `member +batch-add`, `member +role`, `member +invite-link` | -| **gitlink-invite** | 项目邀请管理 | `invite +generate`, `invite +show`, `invite +accept`, `invite +join`, `invite +quit` | | **gitlink-branch** | 分支管理 | `branch +list`, `branch +create`, `branch +delete`, `branch +protect` | | **gitlink-release** | 版本发布 | `release +list`, `release +create`, `release +edit`, `release +update`, `release +view` | @@ -185,26 +144,14 @@ skills/ |-------|------|----------| | **gitlink-search** | 搜索功能 | `search +repos`, `search +users` | | **gitlink-user** | 用户管理 | `user +me`, `user +info` | -| **gitlink-org** | 组织管理 | `org +list`, `org +info`, `org +members`, `org +teams` | +| **gitlink-org** | 组织管理 | `org +list`, `org +info`, `org +members` | | **gitlink-ci** | CI/CD | `ci +builds`, `ci +logs` | | **gitlink-pipeline** | 流水线工作流 | `pipeline +runs`, `pipeline +run`, `pipeline +logs` | | **gitlink-wiki** | Wiki 页面管理 | `wiki +list`, `wiki +view`, `wiki +create`, `wiki +update`, `wiki +delete` | | **gitlink-pm** | 项目管理 | 通过 Raw API 访问 | -| **gitlink-workflow** | AI 工作流 | `workflow +triage`, `workflow +pr-summary`, `workflow +review-context`, `workflow +repo-report` | +| **gitlink-workflow** | AI 工作流 | Issue 分类、PR Review、Release Notes | | **gitlink-health** | 开源项目健康度 | 详情见SKILL.md | -| **gitlink-semantic-audit** | CLI/平台语义审计(伪成功、参数错配、端点失效体检) | `api GET/POST ...` 与 shortcut 对照 | - -### 科研场景 Skills - -| Skill | 说明 | 常用命令 | -|-------|------|----------| -| **gitlink-research-reproducibility** | 科研仓库复现性审计,检查 README、LICENSE、依赖、测试、CI、示例和数据说明 | `repo +info`, `repo +tree`, `api GET /sub_entries` | -| **gitlink-research-compliance** | 科研开源合规与敏感风险检查 | `repo +info`, `repo +tree`, `api GET /sub_entries` | -| **gitlink-research-progress-tracker** | 科研项目周报、Issue/PR 队列和停滞风险预警 | `issue +list`, `pr +list`, `release +list`, `repo +contributors` | -| **gitlink-research-collaboration-map** | 科研协作画像、核心维护者识别和合作建议 | `repo +contributors`, `issue +list`, `pr +list`, `user +info` | -| **gitlink-research-knowledge-graph** | 关键词科研热点追踪和轻量知识图谱 | `search +repos`, `repo +info`, `repo +languages`, `repo +contributors` | -| **gitlink-research-data-provenance** | 科研数据来源、数据许可证、引用链和隐私风险审计 | `repo +info`, `repo +tree`, `api GET /sub_entries` | -| **gitlink-research-artifact-handbook** | 科研成果沉淀手册和课题组交接材料生成 | `repo +info`, `repo +readme`, `repo +tree`, `release +list` | +| **gitlink-research-trust** | 科研开源可信度评估 | `search +repos`, `repo +info`, `repo +tree`, `repo +readme` | --- @@ -274,7 +221,6 @@ gitlink-cli search +users -k "zhangsan" # 查看组织 gitlink-cli org +list gitlink-cli org +info -i Gitlink -gitlink-cli org +teams -i Gitlink ``` 详见: [gitlink-search/SKILL.md](gitlink-search/SKILL.md) @@ -311,15 +257,6 @@ gitlink-cli org +teams -i Gitlink - [gitlink-org/SKILL.md](gitlink-org/SKILL.md) - 组织命令 - [gitlink-user/SKILL.md](gitlink-user/SKILL.md) - 用户命令 -**科研场景**: -- [gitlink-research-reproducibility/SKILL.md](gitlink-research-reproducibility/SKILL.md) - 复现性审计 -- [gitlink-research-compliance/SKILL.md](gitlink-research-compliance/SKILL.md) - 开源合规与敏感风险 -- [gitlink-research-progress-tracker/SKILL.md](gitlink-research-progress-tracker/SKILL.md) - 项目进度跟踪与预警 -- [gitlink-research-collaboration-map/SKILL.md](gitlink-research-collaboration-map/SKILL.md) - 协作画像与合作建议 -- [gitlink-research-knowledge-graph/SKILL.md](gitlink-research-knowledge-graph/SKILL.md) - 热点追踪与知识图谱 -- [gitlink-research-data-provenance/SKILL.md](gitlink-research-data-provenance/SKILL.md) - 数据来源与隐私审计 -- [gitlink-research-artifact-handbook/SKILL.md](gitlink-research-artifact-handbook/SKILL.md) - 成果沉淀手册 - --- ## ❓ 常见问题 diff --git a/skills/gitlink-research-trust/SKILL.md b/skills/gitlink-research-trust/SKILL.md new file mode 100644 index 0000000..7c124c6 --- /dev/null +++ b/skills/gitlink-research-trust/SKILL.md @@ -0,0 +1,138 @@ +--- +name: gitlink-research-trust +description: "科研开源可信度评估:面向论文代码、数据集、实验复现仓库,使用 gitlink-cli 采集仓库信息、目录树、README 和协作指标,生成复现性、可追踪性、协作健康、合规风险和文档可用性报告。当用户需要评估科研仓库可信度、复现准备度或开源治理风险时触发。" +--- + +# gitlink-research-trust(科研开源可信度评估) + +## 目标 + +本 Skill 帮助 AI Agent 使用 `gitlink-cli` 对 GitLink 上的科研类开源仓库做只读可信度评估,回答: + +- 这个科研仓库是否容易复现? +- 论文、数据、代码、实验之间是否可追踪? +- 协作活跃度和维护健康度如何? +- 许可证、敏感信息和镜像仓库风险是否清晰? +- README 是否足以支撑评审、复现和二次开发? + +## 安全边界 + +- 默认只读,不向第三方仓库创建 Issue、评论、PR、Release 或 Wiki。 +- 不输出真实 Token、Cookie、密码、私钥。 +- 证据日志只记录命令、摘要和脱敏后的结构化结果。 +- 对疑似敏感信息只给出文件路径、行号和脱敏片段,不复述完整密钥。 + +## 推荐采集命令 + +### 1. 搜索候选科研仓库 + +```bash +gitlink-cli search +repos -k "research" --format json +gitlink-cli search +repos -k "paper" --format json +gitlink-cli search +repos -k "dataset" --format json +gitlink-cli search +repos -k "科研" --format json +``` + +合并候选时优先选择命中多个关键词、近期更新、非空、公开、非纯镜像或镜像状态正常的仓库。 + +### 2. 获取仓库元数据 + +```bash +gitlink-cli repo +info --owner --repo --format json +gitlink-cli repo +contributors --owner --repo --format json +gitlink-cli repo +tree --owner --repo --ref --format json +gitlink-cli repo +readme --owner --repo --ref --format json +``` + +分支优先使用 `repo +info` 返回的 `default_branch`;不存在时再尝试 `master`、`main`。 + +### 3. 可选补充数据 + +```bash +gitlink-cli issue +list --owner --repo --format json +gitlink-cli pr +list --owner --repo --format json +gitlink-cli release +list --owner --repo --format json +``` + +若接口失败,不要终止整体评估;记录失败原因并降低对应置信度。 + +## 评分模型 + +总分 100: + +| 维度 | 分值 | 核心信号 | +|---|---:|---| +| 复现性 | 25 | README、依赖声明、测试/CI、Release、近期活跃、最小运行命令 | +| 论文/数据/代码可追踪性 | 20 | DOI/arXiv/BibTeX、数据集说明、实验脚本、引用文件、示例 | +| 协作健康 | 20 | 贡献者、Issue/PR、关注/Fork、维护活跃度 | +| 合规与敏感信息 | 20 | 许可证、敏感信息扫描、依赖声明、安全/贡献文档、镜像风险 | +| 文档与可用性 | 15 | README 完整度、安装说明、运行命令、示例、社区文档 | + +等级建议: + +- A:85-100,可信度高,可作为复现或标杆仓库。 +- B:70-84,主体可信,有少量治理或复现缺口。 +- C:55-69,可参考但需要补足关键证据。 +- D:0-54,缺口较大,不建议直接作为复现基线。 + +## 输出格式 + +建议生成以下文件: + +```text +reports// +├── index.md +├── research_trust_report.md +├── summary.csv +├── graph.mmd +├── analysis.json +└── evidence.jsonl +``` + +`summary.csv` 字段建议: + +```csv +repo,total_score,grade,reproducibility,traceability,collaboration,compliance,documentation,language,license,risks,recommendations +``` + +`evidence.jsonl` 每行建议包含: + +```json +{"step":"repo-info:/","command":["gitlink-cli","repo","+info"],"ok":true,"summary":"ok","data":{"data_keys":["default_branch","issues_count"]}} +``` + +## 报告结构 + +```markdown +# GitLink 科研开源可信度报告: + +## 一、结论总览 + +| 排名 | 仓库 | 总分 | 等级 | 复现性 | 可追踪性 | 协作 | 合规 | 文档 | + +## 二、仓库深度分析 + +### //100() + +- 主要优势 +- 主要风险 +- 优先整改建议 + +## 三、科研赋能价值 + +- 复现基线 +- 论文/数据/代码证据链 +- 开源治理整改 + +## 四、数据来源与限制 + +- GitLink CLI 命令列表 +- 失败或跳过的接口 +- 脱敏策略 +``` + +## 触发示例 + +- “帮我评估 GitLink 上 AI 论文代码仓库的科研可信度。” +- “对这个 GitLink 仓库做复现性、许可证和敏感信息风险检查。” +- “搜索 5 个数据集相关仓库,输出科研可信度排行榜和 Mermaid 图谱。” diff --git a/skills/gitlink-research-trust/examples/research-trust-workflow.md b/skills/gitlink-research-trust/examples/research-trust-workflow.md new file mode 100644 index 0000000..d6ed828 --- /dev/null +++ b/skills/gitlink-research-trust/examples/research-trust-workflow.md @@ -0,0 +1,65 @@ +# gitlink-research-trust 使用示例 + +## 目标 + +搜索 GitLink 上公开科研仓库,评估 3-5 个候选仓库,并生成可信度报告、CSV 摘要、Mermaid 图谱和脱敏证据日志。 + +## 示例命令 + +```bash +export GITLINK_CONFIG_DIR="${GITLINK_CONFIG_DIR:-$HOME/.config/gitlink-cli}" + +gitlink-cli auth status + +gitlink-cli search +repos -k "research" --format json +gitlink-cli search +repos -k "dataset" --format json +gitlink-cli search +repos -k "AI" --format json + +gitlink-cli repo +info --owner --repo --format json +gitlink-cli repo +tree --owner --repo --ref --format json +gitlink-cli repo +readme --owner --repo --ref --format json +``` + +## Agent 处理步骤 + +1. 合并搜索结果,按关键词命中数、活跃度、Fork/Star/关注信号排序。 +2. 对每个候选仓库读取 `repo +info`、`repo +tree` 和 `repo +readme`。 +3. 从目录树识别 `LICENSE`、`requirements.txt`、`pyproject.toml`、`package.json`、`go.mod`、`tests`、`scripts`、`examples`、`CITATION.cff`。 +4. 从 README 识别论文、DOI、arXiv、BibTeX、数据集、实验命令、安装说明和示例。 +5. 按 100 分评分模型生成报告。 +6. 写入 `evidence.jsonl` 前脱敏 Token、Cookie、密码和私钥。 + +## 输出示例 + +```text +reports/research-trust-20260625/ +├── index.md +├── research_trust_report.md +├── summary.csv +├── graph.mmd +├── analysis.json +└── evidence.jsonl +``` + +## Mermaid 图谱片段 + +```mermaid +graph TD + topic["科研开源可信度"] + repo["owner/repo"] + paper["论文/引用"] + data["数据集"] + experiment["实验复现"] + license["许可证"] + topic --> repo + repo --> paper + repo --> data + repo --> experiment + repo --> license +``` + +## 注意事项 + +- 对第三方仓库保持只读。 +- 不把认证凭据写入报告。 +- 如果 README 或目录树接口失败,保留错误摘要并继续分析其他仓库。