From 8642f4026ee3258dd7a51d9f8b1bd6088846193f Mon Sep 17 00:00:00 2001 From: NeeNe <26158277@qq.com> Date: Sun, 5 Jul 2026 13:07:28 +0800 Subject: [PATCH 1/3] feat(skills): add research assistant skill suite --- .gitea/workflows/ci.yml | 3 + .github/workflows/test.yml | 3 + Makefile | 7 +- doc/changes/research-skills-suite.md | 22 +++ docs/research-skills-agent-test-report.md | 147 ++++++++++++++++ scripts/validate-research-skills.py | 160 ++++++++++++++++++ skills/README.md | 63 +++++++ .../SKILL.md | 73 ++++++++ .../examples/artifact-handbook.md | 25 +++ .../references/handbook-template.md | 59 +++++++ .../SKILL.md | 79 +++++++++ .../examples/collaboration-map.md | 23 +++ .../references/profile-fields.md | 20 +++ skills/gitlink-research-compliance/SKILL.md | 77 +++++++++ .../examples/compliance-audit.md | 21 +++ .../references/risk-rules.md | 11 ++ .../gitlink-research-data-provenance/SKILL.md | 79 +++++++++ .../examples/data-provenance-audit.md | 22 +++ .../references/provenance-rules.md | 12 ++ .../gitlink-research-knowledge-graph/SKILL.md | 90 ++++++++++ .../examples/keyword-map.md | 24 +++ .../references/graph-schema.md | 37 ++++ .../SKILL.md | 82 +++++++++ .../examples/weekly-report.md | 25 +++ .../references/risk-model.md | 11 ++ .../gitlink-research-reproducibility/SKILL.md | 90 ++++++++++ .../examples/reproducibility-audit.md | 23 +++ .../references/checklist.md | 12 ++ 28 files changed, 1298 insertions(+), 2 deletions(-) create mode 100644 doc/changes/research-skills-suite.md create mode 100644 docs/research-skills-agent-test-report.md create mode 100644 scripts/validate-research-skills.py create mode 100644 skills/gitlink-research-artifact-handbook/SKILL.md create mode 100644 skills/gitlink-research-artifact-handbook/examples/artifact-handbook.md create mode 100644 skills/gitlink-research-artifact-handbook/references/handbook-template.md create mode 100644 skills/gitlink-research-collaboration-map/SKILL.md create mode 100644 skills/gitlink-research-collaboration-map/examples/collaboration-map.md create mode 100644 skills/gitlink-research-collaboration-map/references/profile-fields.md create mode 100644 skills/gitlink-research-compliance/SKILL.md create mode 100644 skills/gitlink-research-compliance/examples/compliance-audit.md create mode 100644 skills/gitlink-research-compliance/references/risk-rules.md create mode 100644 skills/gitlink-research-data-provenance/SKILL.md create mode 100644 skills/gitlink-research-data-provenance/examples/data-provenance-audit.md create mode 100644 skills/gitlink-research-data-provenance/references/provenance-rules.md create mode 100644 skills/gitlink-research-knowledge-graph/SKILL.md create mode 100644 skills/gitlink-research-knowledge-graph/examples/keyword-map.md create mode 100644 skills/gitlink-research-knowledge-graph/references/graph-schema.md create mode 100644 skills/gitlink-research-progress-tracker/SKILL.md create mode 100644 skills/gitlink-research-progress-tracker/examples/weekly-report.md create mode 100644 skills/gitlink-research-progress-tracker/references/risk-model.md create mode 100644 skills/gitlink-research-reproducibility/SKILL.md create mode 100644 skills/gitlink-research-reproducibility/examples/reproducibility-audit.md create mode 100644 skills/gitlink-research-reproducibility/references/checklist.md diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 94fb619..d28b9ad 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -26,5 +26,8 @@ jobs: - name: Test run: make test + - name: Validate research Skills + run: make validate-research-skills + - name: Check formatting run: make fmt diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3d5673c..45247a1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,5 +26,8 @@ jobs: - name: Scan i18n key references run: go run ./internal/i18n/cmd/check --scan-code + - name: Validate research Skills + run: python3 scripts/validate-research-skills.py + - name: Run Go tests run: go test ./... diff --git a/Makefile b/Makefile index 8c6702d..f0a177b 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ BINARY := gitlink-cli VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev") LDFLAGS := -s -w -X '$(MODULE)/cmd.Version=$(VERSION)' -.PHONY: build install clean test check vet fmt cover lint +.PHONY: build install clean test check vet fmt cover lint validate-research-skills build: go build -ldflags "$(LDFLAGS)" -o $(BINARY) . @@ -35,7 +35,10 @@ cover: lint: golangci-lint run ./... -check: fmt vet lint test +validate-research-skills: + python3 scripts/validate-research-skills.py + +check: fmt vet lint test validate-research-skills @echo "All checks passed." hooks: diff --git a/doc/changes/research-skills-suite.md b/doc/changes/research-skills-suite.md new file mode 100644 index 0000000..58b7aac --- /dev/null +++ b/doc/changes/research-skills-suite.md @@ -0,0 +1,22 @@ +# Research skills suite + +Adds seven read-only research-oriented Agent Skills for GitLink repositories: + +- `gitlink-research-reproducibility`: reproducibility checklist and remediation plan for research code. +- `gitlink-research-compliance`: license, security policy, dependency, and sensitive-file risk audit. +- `gitlink-research-progress-tracker`: weekly progress report and risk early warning for research projects. +- `gitlink-research-collaboration-map`: contributor, Issue, and PR collaboration mapping for research teams. +- `gitlink-research-knowledge-graph`: keyword-based research landscape and lightweight knowledge graph workflow. +- `gitlink-research-data-provenance`: dataset source, citation, license, and privacy-risk audit. +- `gitlink-research-artifact-handbook`: research artifact handbook generation for demos, handoff, and open-source release. + +These Skills are designed as standalone `gitlink-cli` Skill PR deliverables. They do not depend on external project code and can also be composed by end-to-end research workflows. + +Validation: + +```bash +make validate-research-skills +git diff --check +``` + +Agent verification guidance is documented in `docs/research-skills-agent-test-report.md`. diff --git a/docs/research-skills-agent-test-report.md b/docs/research-skills-agent-test-report.md new file mode 100644 index 0000000..55cfeec --- /dev/null +++ b/docs/research-skills-agent-test-report.md @@ -0,0 +1,147 @@ +# Research Skills Agent Test Report + +## Scope + +This report covers the seven read-only research Skills added for the GitLink competition: + +- `gitlink-research-reproducibility` +- `gitlink-research-compliance` +- `gitlink-research-progress-tracker` +- `gitlink-research-collaboration-map` +- `gitlink-research-knowledge-graph` +- `gitlink-research-data-provenance` +- `gitlink-research-artifact-handbook` + +The Skills are standalone `gitlink-cli` Agent Skills. They do not depend on external project code and can be submitted as an independent Skill PR. + +## Automatic Validation + +Run: + +```bash +make validate-research-skills +git diff --check +``` + +The validation script checks: + +- every Skill has valid `SKILL.md` frontmatter with the expected name and a useful trigger description; +- every Skill instructs the Agent to read `gitlink-shared`; +- every Skill is read-only by default and uses `gitlink-cli --format json`; +- every Skill includes command coverage for its scenario; +- every Skill has at least one reference file and one example file; +- examples contain user request, Agent steps, expected answer, and concrete `gitlink-cli` commands; +- `skills/README.md` and `doc/changes/research-skills-suite.md` index all seven Skills. + +## Offline Agent Test Prompts + +These prompts can be used in Claude Code, Cursor, Codex, or OpenClaw after installing the Skills. + +### Reproducibility + +```text +Use gitlink-research-reproducibility to audit songhui18/ICCV2021. Produce a reproducibility score, missing items, and top three remediation actions. Do not write back to GitLink. +``` + +Expected behavior: + +- read `gitlink-shared`; +- run `repo +info` and `repo +tree`, or fall back to `api GET /sub_entries`; +- cite command sources; +- produce a checklist report. + +### Compliance + +```text +Use gitlink-research-compliance to check Gitconomy/Git4Research before open-source release. Report license, SECURITY, CONTRIBUTING, dependency, and sensitive-file risks. +``` + +Expected behavior: + +- perform read-only file tree checks; +- avoid printing sensitive contents; +- state that the output is an engineering pre-check, not legal advice. + +### Progress Tracking + +```text +Use gitlink-research-progress-tracker to generate a weekly research progress report for songhui18/ICCV2021, including Issue/PR queues and risk warnings. +``` + +Expected behavior: + +- collect repo, Issue, PR, Release, and contributor data; +- separate facts from recommendations; +- avoid posting a comment unless explicitly requested. + +### Collaboration Map + +```text +Use gitlink-research-collaboration-map to analyze collaboration structure for Gitconomy/Git4Research. Identify maintainers, contributors, open collaboration gaps, and suggested next actions. +``` + +Expected behavior: + +- use public contributor, Issue, PR, language, and optional user data; +- avoid private contact information; +- base recommendations on evidence. + +### Knowledge Graph + +```text +Use gitlink-research-knowledge-graph to search GitLink for “论文复现” and “open research”, then output a Markdown trend summary and graph JSON. +``` + +Expected behavior: + +- run bounded keyword searches; +- deep-analyze no more than eight repositories; +- produce `nodes` and `edges` using the documented graph schema; +- mark platform-data limits. + +### Data Provenance + +```text +Use gitlink-research-data-provenance to audit songhui18/ICCV2021 for dataset source, citation, license, and privacy risks. Do not print raw data contents. +``` + +Expected behavior: + +- collect repo info and selected file trees; +- report paths and risk types only; +- distinguish missing evidence from confirmed risk. + +### Artifact Handbook + +```text +Use gitlink-research-artifact-handbook to generate a research artifact handbook for Gitconomy/Git4Research, suitable for project handoff and competition demo. +``` + +Expected behavior: + +- collect repo, README, tree, Issue/PR, Release, language, and contributor signals when available; +- produce a structured handbook with missing fields marked as `待补充`; +- avoid writing Wiki, Issue, Release, or repository files unless explicitly requested. + +## Real Agent Verification + +For competition submission, record at least one Agent run with screenshots or video: + +1. Install or expose the Skills to the Agent. +2. Run one prompt from this report against a public GitLink repository. +3. Show the Agent reading the Skill, running read-only `gitlink-cli` commands, and producing the report. +4. Show that no write operation was performed. + +Recommended demo target: + +```text +songhui18/ICCV2021 +``` + +This repository has richer Issue and PR data, which makes progress tracking and collaboration mapping more visible. + +## Known Limitations + +- The automatic script validates Skill structure and workflow instructions; it does not prove semantic quality of an LLM-generated report. +- Real GitLink API verification requires network access and may require authentication for private repositories. +- Screenshots or video still need to be captured in the selected Agent UI for the competition submission package. diff --git a/scripts/validate-research-skills.py b/scripts/validate-research-skills.py new file mode 100644 index 0000000..60b9f99 --- /dev/null +++ b/scripts/validate-research-skills.py @@ -0,0 +1,160 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import re +import sys +from pathlib import Path + + +RESEARCH_SKILLS = { + "gitlink-research-reproducibility": { + "commands": ["repo +info", "repo +tree", "api GET"], + "references": ["checklist.md"], + "examples": ["reproducibility-audit.md"], + "keywords": ["复现", "README", "LICENSE", "依赖"], + }, + "gitlink-research-compliance": { + "commands": ["repo +info", "repo +tree", "api GET"], + "references": ["risk-rules.md"], + "examples": ["compliance-audit.md"], + "keywords": ["合规", "敏感", "LICENSE", "SECURITY"], + }, + "gitlink-research-progress-tracker": { + "commands": ["issue +list", "pr +list", "release +list"], + "references": ["risk-model.md"], + "examples": ["weekly-report.md"], + "keywords": ["进度", "周报", "风险", "预警"], + }, + "gitlink-research-collaboration-map": { + "commands": ["repo +contributors", "issue +list", "pr +list"], + "references": ["profile-fields.md"], + "examples": ["collaboration-map.md"], + "keywords": ["协作", "贡献者", "合作", "画像"], + }, + "gitlink-research-knowledge-graph": { + "commands": ["search +repos", "repo +info", "repo +languages"], + "references": ["graph-schema.md"], + "examples": ["keyword-map.md"], + "keywords": ["知识图谱", "热点", "选题", "趋势"], + }, + "gitlink-research-data-provenance": { + "commands": ["repo +info", "repo +tree", "api GET"], + "references": ["provenance-rules.md"], + "examples": ["data-provenance-audit.md"], + "keywords": ["数据", "隐私", "来源", "许可证"], + }, + "gitlink-research-artifact-handbook": { + "commands": ["repo +info", "repo +tree", "repo +readme", "release +list"], + "references": ["handbook-template.md"], + "examples": ["artifact-handbook.md"], + "keywords": ["成果", "手册", "交接", "复现"], + }, +} + + +def fail(message: str) -> None: + print(f"ERROR: {message}", file=sys.stderr) + raise SystemExit(1) + + +def read(path: Path) -> str: + try: + return path.read_text(encoding="utf-8") + except FileNotFoundError: + fail(f"missing file: {path}") + + +def parse_frontmatter(text: str, path: Path) -> dict[str, str]: + if not text.startswith("---\n"): + fail(f"{path} does not start with YAML frontmatter") + try: + _, frontmatter, _ = text.split("---", 2) + except ValueError: + fail(f"{path} has incomplete YAML frontmatter") + parsed: dict[str, str] = {} + for line in frontmatter.strip().splitlines(): + if ":" not in line: + fail(f"{path} frontmatter line has no colon: {line}") + key, value = line.split(":", 1) + parsed[key.strip()] = value.strip().strip('"') + return parsed + + +def assert_contains(text: str, needle: str, path: Path) -> None: + if needle not in text: + fail(f"{path} is missing required text: {needle}") + + +def assert_regex(text: str, pattern: str, path: Path) -> None: + if not re.search(pattern, text, flags=re.MULTILINE): + fail(f"{path} does not match required pattern: {pattern}") + + +def validate_skill(root: Path, name: str, spec: dict[str, list[str]]) -> None: + skill_dir = root / "skills" / name + skill_md = skill_dir / "SKILL.md" + text = read(skill_md) + frontmatter = parse_frontmatter(text, skill_md) + + if frontmatter.get("name") != name: + fail(f"{skill_md} has wrong name: {frontmatter.get('name')}") + description = frontmatter.get("description", "") + if len(description) < 30: + fail(f"{skill_md} description is too short") + for keyword in spec["keywords"]: + if keyword not in text and keyword not in description: + fail(f"{skill_md} is missing scenario keyword: {keyword}") + + assert_contains(text, "gitlink-shared", skill_md) + assert_contains(text, "gitlink-cli", skill_md) + assert_contains(text, "--format json", skill_md) + assert_regex(text, r"只读|默认只读", skill_md) + assert_regex(text, r"不输出 Token|Token", skill_md) + + for command in spec["commands"]: + assert_contains(text, command, skill_md) + + for filename in spec["references"]: + path = skill_dir / "references" / filename + ref_text = read(path) + if len(ref_text.strip().splitlines()) < 5: + fail(f"{path} is too small to be useful") + + for filename in spec["examples"]: + path = skill_dir / "examples" / filename + example_text = read(path) + assert_contains(example_text, "User request", path) + assert_contains(example_text, "Agent steps", path) + assert_contains(example_text, "Expected answer", path) + assert_contains(example_text, "gitlink-cli", path) + + +def validate_readme(root: Path) -> None: + readme = root / "skills" / "README.md" + text = read(readme) + for name in RESEARCH_SKILLS: + assert_contains(text, name, readme) + + +def validate_change_note(root: Path) -> None: + note = root / "doc" / "changes" / "research-skills-suite.md" + text = read(note) + for name in RESEARCH_SKILLS: + assert_contains(text, name, note) + if "scripts/validate-research-skills.py" not in text and "make validate-research-skills" not in text: + fail(f"{note} is missing the research Skills validation command") + + +def main() -> int: + root = Path(__file__).resolve().parents[1] + for name, spec in RESEARCH_SKILLS.items(): + validate_skill(root, name, spec) + print(f"ok {name}") + validate_readme(root) + validate_change_note(root) + print("research skill validation passed") + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/skills/README.md b/skills/README.md index d507074..6a426cd 100644 --- a/skills/README.md +++ b/skills/README.md @@ -105,6 +105,48 @@ 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/ @@ -148,6 +190,18 @@ skills/ | **gitlink-workflow** | AI 工作流 | Issue 分类、PR Review、Release Notes | | **gitlink-health** | 开源项目健康度 | 详情见SKILL.md | +### 科研场景 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` | + --- ## 🎯 使用场景 @@ -252,6 +306,15 @@ gitlink-cli org +info -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-artifact-handbook/SKILL.md b/skills/gitlink-research-artifact-handbook/SKILL.md new file mode 100644 index 0000000..b956032 --- /dev/null +++ b/skills/gitlink-research-artifact-handbook/SKILL.md @@ -0,0 +1,73 @@ +--- +name: gitlink-research-artifact-handbook +description: "科研成果沉淀手册生成:基于 GitLink 仓库 README、目录结构、Release、Issue、PR、贡献者和语言信息,生成面向答辩、开源发布或课题组交接的科研成果手册。用于梳理代码、实验、论文、数据、贡献和复现入口。" +--- + +# gitlink-research-artifact-handbook + +开始前必须先阅读 `../gitlink-shared/SKILL.md`,确认认证、权限、安全规则和 GitLink API 注意事项。 + +## 安全规则 + +- 默认只读执行,不创建 Wiki、不发布 Release、不提交文件。 +- 所有 GitLink 操作必须使用 `gitlink-cli`。 +- 所有命令使用 `--format json`。 +- 不输出 Token、Cookie 或认证 Header。 +- 如果用户要求把手册写回 Wiki、Issue 或仓库文件,必须先输出 dry-run 草稿并等待确认。 + +## 工作流 + +1. 采集仓库概览、语言和贡献者: + +```bash +gitlink-cli repo +info --owner --repo --format json +gitlink-cli repo +languages --owner --repo --format json +gitlink-cli repo +contributors --owner --repo --format json +``` + +2. 采集根目录和关键目录: + +```bash +gitlink-cli repo +tree --owner --repo --ref --format json +gitlink-cli repo +readme --owner --repo --ref --format json +``` + +如果 `repo +tree` 不可用,回退: + +```bash +gitlink-cli api GET ///sub_entries --query 'filepath=&ref=' --format json +``` + +3. 采集协作和发布信息: + +```bash +gitlink-cli issue +list --owner --repo --state open --format json +gitlink-cli pr +list --owner --repo --state merged --format json +gitlink-cli release +list --owner --repo --format json +``` + +4. 按 `references/handbook-template.md` 生成科研成果沉淀手册。 + +## 输出格式 + +```markdown +# 科研成果沉淀手册:/ + +## 1. 项目概览 +## 2. 研究问题与成果定位 +## 3. 代码与目录导览 +## 4. 实验和数据入口 +## 5. 复现步骤 +## 6. 协作与贡献记录 +## 7. 发布与引用信息 +## 8. 交接清单 +``` + +## 分析原则 + +- 手册是“可交接材料”,不是营销稿;优先列入口、证据和缺失项。 +- 不要编造论文标题、数据来源或实验结果;缺失时写“待补充”。 +- 对 Issue/PR 只做摘要,不贴完整讨论。 +- 如果仓库没有 Release,建议使用 Release 固化阶段成果。 +- 如果根目录 README 已完整,保留其结构并补交接清单;如果 README 很弱,按模板重建手册。 + diff --git a/skills/gitlink-research-artifact-handbook/examples/artifact-handbook.md b/skills/gitlink-research-artifact-handbook/examples/artifact-handbook.md new file mode 100644 index 0000000..2107f78 --- /dev/null +++ b/skills/gitlink-research-artifact-handbook/examples/artifact-handbook.md @@ -0,0 +1,25 @@ +# Artifact handbook example + +User request: + +```text +请为 Gitconomy/Git4Research 生成一份科研成果沉淀手册,用于课题组交接和答辩展示。 +``` + +Agent steps: + +```bash +gitlink-cli repo +info --owner Gitconomy --repo Git4Research --format json +gitlink-cli repo +readme --owner Gitconomy --repo Git4Research --ref main --format json +gitlink-cli repo +tree --owner Gitconomy --repo Git4Research --ref main --format json +gitlink-cli issue +list --owner Gitconomy --repo Git4Research --state open --format json +gitlink-cli pr +list --owner Gitconomy --repo Git4Research --state merged --format json +gitlink-cli release +list --owner Gitconomy --repo Git4Research --format json +``` + +Expected answer: + +- Produce a handbook using the template. +- Mark missing evidence as `待补充`. +- Confirm that no Wiki, Issue, PR, Release, or file write operation was performed. + diff --git a/skills/gitlink-research-artifact-handbook/references/handbook-template.md b/skills/gitlink-research-artifact-handbook/references/handbook-template.md new file mode 100644 index 0000000..d439696 --- /dev/null +++ b/skills/gitlink-research-artifact-handbook/references/handbook-template.md @@ -0,0 +1,59 @@ +# Research artifact handbook template + +```markdown +# 科研成果沉淀手册:/ + +## 1. 项目概览 + +- 仓库: +- 默认分支: +- 主要语言: +- 维护状态: +- 数据来源: + +## 2. 研究问题与成果定位 + +- 研究问题: +- 方法或系统: +- 对应论文/报告: +- 创新点: + +## 3. 代码与目录导览 + +| 路径 | 作用 | 证据来源 | +|---|---|---| + +## 4. 实验和数据入口 + +| 内容 | 路径/链接 | 状态 | 待补充 | +|---|---|---|---| + +## 5. 复现步骤 + +1. 环境准备: +2. 数据准备: +3. 训练/运行: +4. 评估: + +## 6. 协作与贡献记录 + +- 贡献者: +- 关键 Issue: +- 已合并 PR: + +## 7. 发布与引用信息 + +- Release: +- License: +- Citation: + +## 8. 交接清单 + +- [ ] README 完整 +- [ ] LICENSE 明确 +- [ ] 依赖文件存在 +- [ ] 数据来源明确 +- [ ] 实验命令可运行 +- [ ] Release 或归档版本可引用 +``` + diff --git a/skills/gitlink-research-collaboration-map/SKILL.md b/skills/gitlink-research-collaboration-map/SKILL.md new file mode 100644 index 0000000..6d52289 --- /dev/null +++ b/skills/gitlink-research-collaboration-map/SKILL.md @@ -0,0 +1,79 @@ +--- +name: gitlink-research-collaboration-map +description: "科研协作画像与合作建议:分析 GitLink 科研仓库的贡献者、Issue、PR、语言和用户信息,识别核心维护者、潜在协作者、未响应研究问题和协作分工建议。用于课题组协作复盘、跨团队合作匹配和学生贡献画像。" +--- + +# gitlink-research-collaboration-map + +开始前必须先阅读 `../gitlink-shared/SKILL.md`,确认认证、权限、安全规则和 GitLink API 注意事项。 + +## 安全规则 + +- 只读执行,不自动指派 Issue、不邀请成员。 +- 所有 GitLink 操作必须使用 `gitlink-cli`。 +- 所有命令使用 `--format json`。 +- 不输出 Token、Cookie 或认证 Header。 +- 不输出私人联系方式或敏感个人信息。 +- 协作建议必须基于公开仓库数据,避免做人身评价。 + +## 工作流 + +1. 获取仓库、语言、贡献者: + +```bash +gitlink-cli repo +info --owner --repo --format json +gitlink-cli repo +languages --owner --repo --format json +gitlink-cli repo +contributors --owner --repo --format json +``` + +如 shortcut 不可用,回退: + +```bash +gitlink-cli api GET ///languages --format json +gitlink-cli api GET ///contributors --format json +``` + +2. 获取 Issue 和 PR: + +```bash +gitlink-cli issue +list --owner --repo --state open --format json +gitlink-cli issue +list --owner --repo --state closed --format json +gitlink-cli pr +list --owner --repo --state open --format json +gitlink-cli pr +list --owner --repo --state merged --format json +``` + +3. 对高频作者或贡献者,按需获取公开用户信息: + +```bash +gitlink-cli user +info --login --format json +``` + +4. 按 `references/profile-fields.md` 生成协作画像。 + +## 输出格式 + +```markdown +# 科研协作画像:/ + +## 协作结构 + +| 角色 | 候选人/账号 | 证据 | 建议 | +|---|---|---|---| +| 核心维护者 | ... | commits/issues/pr | ... | + +## 未响应问题 + +| Issue/PR | 主题 | 等待动作 | 建议协作者 | +|---|---|---|---| + +## 合作建议 + +1. ... +``` + +## 分析原则 + +- 贡献者画像使用“贡献事实”和“适合跟进的任务”,不要给人格标签。 +- Issue/PR 作者、assignee、reviewer 字段可能缺失,缺失时不要强推断。 +- 镜像仓库的 GitLink 协作数据可能很少,需要标注局限。 +- 合作建议应给出证据:语言栈、历史贡献、Issue/PR 主题。 diff --git a/skills/gitlink-research-collaboration-map/examples/collaboration-map.md b/skills/gitlink-research-collaboration-map/examples/collaboration-map.md new file mode 100644 index 0000000..8b68296 --- /dev/null +++ b/skills/gitlink-research-collaboration-map/examples/collaboration-map.md @@ -0,0 +1,23 @@ +# Collaboration map example + +User request: + +```text +请分析 Gitconomy/Git4Research 的科研协作结构,找出核心维护者和可跟进的问题方向。 +``` + +Agent steps: + +```bash +gitlink-cli repo +info --owner Gitconomy --repo Git4Research --format json +gitlink-cli repo +contributors --owner Gitconomy --repo Git4Research --format json +gitlink-cli issue +list --owner Gitconomy --repo Git4Research --state open --format json +gitlink-cli pr +list --owner Gitconomy --repo Git4Research --state open --format json +``` + +Expected answer: + +- Separate facts from recommendations. +- Mention data limits if the repository has little Issue/PR activity. +- Do not expose private contact information. + diff --git a/skills/gitlink-research-collaboration-map/references/profile-fields.md b/skills/gitlink-research-collaboration-map/references/profile-fields.md new file mode 100644 index 0000000..4bc06c9 --- /dev/null +++ b/skills/gitlink-research-collaboration-map/references/profile-fields.md @@ -0,0 +1,20 @@ +# Collaboration profile fields + +| 字段 | 来源 | 用途 | +|---|---|---| +| contributor login/name | `repo +contributors` | 识别代码贡献者 | +| commits/contributions | `repo +contributors` | 粗略衡量贡献量 | +| issue author | `issue +list` | 识别问题提出者 | +| issue assignee | `issue +list` | 识别责任分配 | +| issue labels | `issue +list` | 判断研究主题或任务类型 | +| PR author | `pr +list` | 识别代码贡献者和集成者 | +| PR status | `pr +list` | 判断协作流转状态 | +| language | `repo +languages` | 推断技术栈 | + +Suggested role labels: + +- 核心维护者:代码贡献和 Issue/PR 参与均较多。 +- 问题提出者:Issue 活跃但代码贡献少,适合需求澄清和复现实验。 +- 实验贡献者:PR 或实验相关 Issue 活跃。 +- 潜在协作者:与主要语言或研究主题匹配,但当前参与较少。 + diff --git a/skills/gitlink-research-compliance/SKILL.md b/skills/gitlink-research-compliance/SKILL.md new file mode 100644 index 0000000..c351c58 --- /dev/null +++ b/skills/gitlink-research-compliance/SKILL.md @@ -0,0 +1,77 @@ +--- +name: gitlink-research-compliance +description: "科研开源合规与敏感风险检查:审计 GitLink 科研仓库的许可证、SECURITY、CONTRIBUTING、依赖声明和敏感文件风险。用于开源发布前预检查、论文代码发布合规清单和整改建议。" +--- + +# gitlink-research-compliance + +开始前必须先阅读 `../gitlink-shared/SKILL.md`,确认认证、权限、安全规则和 GitLink API 注意事项。 + +## 安全规则 + +- 只读执行,不删除文件、不改 `.gitignore`、不关闭 Issue。 +- 所有 GitLink 操作必须使用 `gitlink-cli`。 +- 所有命令使用 `--format json`。 +- 不输出 Token、Cookie 或认证 Header。 +- 报告必须注明“工程合规预审,不构成法律意见”。 + +## 工作流 + +1. 采集仓库信息和文件树: + +```bash +gitlink-cli repo +info --owner --repo --format json +gitlink-cli repo +tree --owner --repo --ref --format json +``` + +2. 如果 `repo +tree` 不可用,回退: + +```bash +gitlink-cli api GET ///sub_entries --query 'filepath=&ref=' --format json +``` + +3. 对根目录和高风险目录做规则检查: + +- 根目录:许可证、安全策略、贡献指南、依赖清单、`.gitignore`。 +- 配置目录:`.github`、`.gitlink`、`.vscode`、`config`。 +- 脚本目录:`scripts`、`deploy`、`docker`。 + +4. 按 `references/risk-rules.md` 输出风险分级。 + +## 输出格式 + +```markdown +# 科研开源合规预审:/ + +## 总览 + +| 项目 | 结果 | 风险等级 | 证据 | +|---|---|---|---| + +## 高优先级风险 + +1. ... + +## 整改建议 + +1. ... + +## 说明 + +本报告是工程合规预审,不构成法律意见。 +``` + +## 检查项 + +- 许可证:存在 `LICENSE`,README 中最好也声明许可证。 +- 安全策略:存在 `SECURITY.md`。 +- 贡献指南:存在 `CONTRIBUTING.md`。 +- 依赖声明:存在语言对应依赖文件,便于后续许可证和漏洞扫描。 +- 敏感文件风险:文件名包含 `.env`、`id_rsa`、`.pem`、`.key`、`credential`、`secret`、`token` 时列为风险。 + +## 注意事项 + +- 不要下载或展示疑似密钥内容,只报告路径和风险类型。 +- 如果只能获取根目录文件树,报告必须说明深层敏感文件未覆盖。 +- 私有仓库需要用户自行完成认证,不能要求用户粘贴 Token。 + diff --git a/skills/gitlink-research-compliance/examples/compliance-audit.md b/skills/gitlink-research-compliance/examples/compliance-audit.md new file mode 100644 index 0000000..88fd216 --- /dev/null +++ b/skills/gitlink-research-compliance/examples/compliance-audit.md @@ -0,0 +1,21 @@ +# Compliance audit example + +User request: + +```text +请检查 Gitconomy/Git4Research 是否具备开源发布合规基础。 +``` + +Agent steps: + +```bash +gitlink-cli repo +info --owner Gitconomy --repo Git4Research --format json +gitlink-cli repo +tree --owner Gitconomy --repo Git4Research --ref main --format json +``` + +Expected answer: + +- Report license, security policy, contribution guide, dependency manifest, and sensitive file risks. +- Mention whether the audit is root-only or includes selected subdirectories. +- Avoid quoting or exposing sensitive file contents. + diff --git a/skills/gitlink-research-compliance/references/risk-rules.md b/skills/gitlink-research-compliance/references/risk-rules.md new file mode 100644 index 0000000..8f2c165 --- /dev/null +++ b/skills/gitlink-research-compliance/references/risk-rules.md @@ -0,0 +1,11 @@ +# Compliance risk rules + +| 风险 | 等级 | 判定 | 建议 | +|---|---|---|---| +| 缺少 LICENSE | 高 | 根目录无 LICENSE 文件 | 补充许可证并在 README 声明 | +| 疑似私钥 | 高 | 文件名包含 `id_rsa`、`.pem`、`.key` | 移除文件、轮换密钥、加入 `.gitignore` | +| 疑似环境密钥 | 高 | 文件名包含 `.env`、`credential`、`secret`、`token` | 移除真实配置,保留 `.env.example` | +| 缺少依赖声明 | 中 | 无常见依赖清单 | 补充依赖文件,便于许可证和漏洞审计 | +| 缺少 SECURITY | 中 | 无 `SECURITY.md` | 补充漏洞披露流程 | +| 缺少 CONTRIBUTING | 低 | 无 `CONTRIBUTING.md` | 补充贡献流程和代码规范 | + diff --git a/skills/gitlink-research-data-provenance/SKILL.md b/skills/gitlink-research-data-provenance/SKILL.md new file mode 100644 index 0000000..aeb97ee --- /dev/null +++ b/skills/gitlink-research-data-provenance/SKILL.md @@ -0,0 +1,79 @@ +--- +name: gitlink-research-data-provenance +description: "科研数据来源与隐私审计:检查 GitLink 科研仓库中的数据集说明、下载来源、引用链、隐私风险、数据许可证和大文件痕迹。用于论文代码发布前的数据治理、复现实验数据说明和科研合规预审。" +--- + +# gitlink-research-data-provenance + +开始前必须先阅读 `../gitlink-shared/SKILL.md`,确认认证、权限、安全规则和 GitLink API 注意事项。 + +## 安全规则 + +- 只读执行,不下载大文件、不打开疑似敏感数据内容。 +- 所有 GitLink 操作必须使用 `gitlink-cli`。 +- 所有命令使用 `--format json`。 +- 不输出 Token、Cookie 或认证 Header。 +- 不输出个人隐私、样本原文、密钥或数据内容;只报告路径、类型和风险。 +- 报告必须注明“科研数据治理预审,不构成法律意见或伦理审查结论”。 + +## 工作流 + +1. 采集仓库概览和默认分支: + +```bash +gitlink-cli repo +info --owner --repo --format json +``` + +2. 采集根目录文件树: + +```bash +gitlink-cli repo +tree --owner --repo --ref --format json +``` + +如果 `repo +tree` 不可用,回退: + +```bash +gitlink-cli api GET ///sub_entries --query 'filepath=&ref=' --format json +``` + +3. 如果根目录存在 `data`、`datasets`、`benchmark`、`experiments`、`notebooks`、`docs`、`README`、`paper`、`assets`,只采集一层目录结构: + +```bash +gitlink-cli repo +tree --owner --repo --path data --ref --format json +gitlink-cli repo +tree --owner --repo --path docs --ref --format json +``` + +4. 按 `references/provenance-rules.md` 生成数据来源和隐私风险报告。 + +## 输出格式 + +```markdown +# 科研数据来源与隐私审计:/ + +## 数据治理总览 + +| 检查项 | 结果 | 风险 | 证据 | +|---|---|---|---| + +## 数据来源链 + +| 数据/目录 | 来源说明 | 许可证/引用 | 复现状态 | +|---|---|---|---| + +## 风险与整改 + +1. ... + +## 说明 + +本报告是科研数据治理预审,不构成法律意见或伦理审查结论。 +``` + +## 分析原则 + +- 有数据目录但无来源说明时,风险高于“未发现数据目录”。 +- 发现 `.csv`、`.jsonl`、`.parquet`、`.h5`、`.npy`、`.zip`、`.tar` 等文件名时,只报告文件名和路径,不打印内容。 +- 发现 `patient`、`student`、`email`、`phone`、`idcard`、`address`、`face`、`medical` 等词时,标注隐私复核风险。 +- 如果仓库只包含数据下载脚本,检查脚本是否说明下载地址、数据许可证和引用方式。 +- 无法确认的事项标注“未确认”,不要编造数据来源。 + diff --git a/skills/gitlink-research-data-provenance/examples/data-provenance-audit.md b/skills/gitlink-research-data-provenance/examples/data-provenance-audit.md new file mode 100644 index 0000000..584c5dd --- /dev/null +++ b/skills/gitlink-research-data-provenance/examples/data-provenance-audit.md @@ -0,0 +1,22 @@ +# Data provenance audit example + +User request: + +```text +请检查 songhui18/ICCV2021 是否有科研数据来源、数据许可证或隐私风险问题。 +``` + +Agent steps: + +```bash +gitlink-cli repo +info --owner songhui18 --repo ICCV2021 --format json +gitlink-cli repo +tree --owner songhui18 --repo ICCV2021 --ref master --format json +gitlink-cli repo +tree --owner songhui18 --repo ICCV2021 --path data --ref master --format json +``` + +Expected answer: + +- Report only paths and risk types, not raw data contents. +- Separate data source, license, citation, privacy, and large-file risks. +- State whether the assessment is root-only or includes selected subdirectories. + diff --git a/skills/gitlink-research-data-provenance/references/provenance-rules.md b/skills/gitlink-research-data-provenance/references/provenance-rules.md new file mode 100644 index 0000000..4bcca58 --- /dev/null +++ b/skills/gitlink-research-data-provenance/references/provenance-rules.md @@ -0,0 +1,12 @@ +# Data provenance rules + +| 检查项 | 风险等级 | 判定线索 | 建议 | +|---|---|---|---| +| 数据来源说明缺失 | 高 | 存在 data/datasets/benchmark 目录,但 README 或目录下无来源说明 | 补充数据集名称、下载地址、版本、引用论文和访问日期 | +| 数据许可证缺失 | 高 | 存在数据文件或下载脚本,但无 license/citation/terms | 补充数据许可证、使用条款和引用格式 | +| 隐私数据线索 | 高 | 文件名或目录包含 patient、student、email、phone、idcard、address、face、medical 等 | 进行脱敏和伦理审查,避免公开原始个人数据 | +| 大文件或压缩包 | 中 | 文件名包含 .zip、.tar、.h5、.npy、.parquet 等 | 说明文件来源、校验和、下载方式,不建议直接托管大数据 | +| 数据下载脚本无校验 | 中 | 有 download/get_data 脚本但无 checksum/version | 补充 checksum、版本号和失败处理 | +| 引用链不完整 | 中 | README 未说明数据、论文、代码之间的关系 | 补充数据引用、论文引用和实验脚本映射 | +| 未发现数据痕迹 | 低 | 未见数据目录、下载脚本或数据扩展名 | 在报告中标注未发现,建议说明数据是否需另行申请 | + diff --git a/skills/gitlink-research-knowledge-graph/SKILL.md b/skills/gitlink-research-knowledge-graph/SKILL.md new file mode 100644 index 0000000..38d63c0 --- /dev/null +++ b/skills/gitlink-research-knowledge-graph/SKILL.md @@ -0,0 +1,90 @@ +--- +name: gitlink-research-knowledge-graph +description: "科研热点追踪与轻量知识图谱:按关键词搜索 GitLink 科研仓库,聚合仓库、语言、贡献者、Issue/PR 主题和研究方向,输出趋势分析、图谱节点边和选题建议。用于科研选题、技术生态调研和领域知识图谱构建。" +--- + +# gitlink-research-knowledge-graph + +开始前必须先阅读 `../gitlink-shared/SKILL.md`,确认认证、权限、安全规则和 GitLink API 注意事项。 + +## 安全规则 + +- 只读执行。 +- 所有 GitLink 操作必须使用 `gitlink-cli`。 +- 所有命令使用 `--format json`。 +- 不输出 Token、Cookie 或认证 Header。 +- 控制 API 调用量:每个关键词保留前 8 个仓库,深度分析不超过 8 个仓库。 +- 对镜像仓库标注数据局限,不把 GitLink 平台内 watcher/fork 等同于原平台全量影响力。 + +## 工作流 + +1. 将研究主题拆成 3 到 5 个关键词,覆盖中文、英文、缩写和技术术语。 + +2. 搜索仓库: + +```bash +gitlink-cli search +repos -k --format json +``` + +3. 去重并选取候选仓库: + +- 唯一键优先使用 `author.login/identifier`。 +- 同一仓库匹配多个关键词时保留并记录全部关键词。 +- 总候选控制在 20 个以内。 +- 深度分析优先选择匹配关键词多、更新时间近、关注度高的 5 到 8 个。 + +4. 对重点仓库采集详情: + +```bash +gitlink-cli repo +info --owner --repo --format json +gitlink-cli repo +languages --owner --repo --format json +gitlink-cli repo +contributors --owner --repo --format json +gitlink-cli issue +list --owner --repo --state open --format json +gitlink-cli pr +list --owner --repo --state open --format json +``` + +5. 按 `references/graph-schema.md` 输出图谱 JSON 和趋势报告。 + +## 输出格式 + +```markdown +# 科研热点与知识图谱: + +## 搜索范围 + +关键词:... +命中仓库:... +深度分析:... + +## 趋势洞察 + +1. ... + +## 图谱摘要 + +| 节点类型 | 数量 | +|---|---:| +| repo | ... | +| language | ... | +| contributor | ... | +| topic | ... | + +## 选题建议 + +1. ... +``` + +同时输出或附带如下 JSON 结构: + +```json +{ + "nodes": [], + "edges": [] +} +``` + +## 分析原则 + +- 不要把搜索结果数量直接解释为学术热度,只能作为 GitLink 平台内信号。 +- 图谱边必须有来源命令或字段依据。 +- 选题建议要区分“成熟方向”“新兴方向”“生态空白”。 diff --git a/skills/gitlink-research-knowledge-graph/examples/keyword-map.md b/skills/gitlink-research-knowledge-graph/examples/keyword-map.md new file mode 100644 index 0000000..a790d86 --- /dev/null +++ b/skills/gitlink-research-knowledge-graph/examples/keyword-map.md @@ -0,0 +1,24 @@ +# Keyword knowledge graph example + +User request: + +```text +请围绕“论文复现”和“open research”在 GitLink 上做科研热点搜索,并输出轻量知识图谱。 +``` + +Agent steps: + +```bash +gitlink-cli search +repos -k "论文复现" --format json +gitlink-cli search +repos -k "open research" --format json +gitlink-cli repo +info --owner --repo --format json +gitlink-cli repo +languages --owner --repo --format json +gitlink-cli repo +contributors --owner --repo --format json +``` + +Expected answer: + +- List keywords and candidate repositories. +- Provide a Markdown trend report. +- Provide `nodes` and `edges` JSON using `references/graph-schema.md`. + diff --git a/skills/gitlink-research-knowledge-graph/references/graph-schema.md b/skills/gitlink-research-knowledge-graph/references/graph-schema.md new file mode 100644 index 0000000..06f11cb --- /dev/null +++ b/skills/gitlink-research-knowledge-graph/references/graph-schema.md @@ -0,0 +1,37 @@ +# Research knowledge graph schema + +Node types: + +| Type | Required fields | Description | +|---|---|---| +| `repo` | `id`, `owner`, `repo`, `label` | GitLink repository | +| `language` | `id`, `name` | Programming language | +| `contributor` | `id`, `login` | Public contributor identity | +| `topic` | `id`, `name` | Keyword or inferred research topic | +| `issue` | `id`, `title`, `state` | Representative Issue | +| `pr` | `id`, `title`, `state` | Representative PR | + +Edge types: + +| Type | From | To | Evidence | +|---|---|---|---| +| `uses_language` | repo | language | `repo +languages` | +| `contributed_by` | contributor | repo | `repo +contributors` | +| `matches_topic` | repo | topic | search keyword or description | +| `has_issue` | repo | issue | `issue +list` | +| `has_pr` | repo | pr | `pr +list` | + +Example: + +```json +{ + "nodes": [ + {"id": "repo:Gitconomy/Git4Research", "type": "repo", "label": "Gitconomy/Git4Research"}, + {"id": "topic:open-research", "type": "topic", "label": "open research"} + ], + "edges": [ + {"source": "repo:Gitconomy/Git4Research", "target": "topic:open-research", "type": "matches_topic", "evidence": "search +repos keyword"} + ] +} +``` + diff --git a/skills/gitlink-research-progress-tracker/SKILL.md b/skills/gitlink-research-progress-tracker/SKILL.md new file mode 100644 index 0000000..1868989 --- /dev/null +++ b/skills/gitlink-research-progress-tracker/SKILL.md @@ -0,0 +1,82 @@ +--- +name: gitlink-research-progress-tracker +description: "科研项目进度跟踪与预警:基于 GitLink Issue、PR、Release、贡献者和仓库更新时间生成课题组周报、停滞风险、开放问题队列和下一步建议。用于科研项目管理、中期检查和例会汇报。" +--- + +# gitlink-research-progress-tracker + +开始前必须先阅读 `../gitlink-shared/SKILL.md`,确认认证、权限、安全规则和 GitLink API 注意事项。 + +## 安全规则 + +- 默认只读执行。 +- 所有 GitLink 操作必须使用 `gitlink-cli`。 +- 所有命令使用 `--format json`。 +- 不输出 Token、Cookie 或认证 Header。 +- 不自动关闭 Issue、不合并 PR、不发布周报评论。 +- 如果用户要求发布周报到 Issue,先生成 dry-run 草稿并等待确认。 + +## 工作流 + +1. 获取仓库概览: + +```bash +gitlink-cli repo +info --owner --repo --format json +``` + +2. 获取协作队列: + +```bash +gitlink-cli issue +list --owner --repo --state open --format json +gitlink-cli issue +list --owner --repo --state closed --format json +gitlink-cli pr +list --owner --repo --state open --format json +gitlink-cli pr +list --owner --repo --state merged --format json +``` + +3. 获取版本和贡献者信息: + +```bash +gitlink-cli release +list --owner --repo --format json +gitlink-cli repo +contributors --owner --repo --format json +``` + +如果当前 CLI 版本没有 `repo +contributors`,回退: + +```bash +gitlink-cli api GET ///contributors --format json +``` + +4. 按 `references/risk-model.md` 判断风险,并生成周报。 + +## 输出格式 + +```markdown +# 科研项目周报:/ + +## 本期概览 + +| 指标 | 数值 | +|---|---:| +| 开放 Issue | ... | +| 已关闭 Issue | ... | +| 开放 PR | ... | +| 已合并 PR | ... | +| Release 数 | ... | +| 贡献者 | ... | + +## 风险预警 + +| 风险 | 等级 | 证据 | 建议 | +|---|---|---|---| + +## 下一步建议 + +1. ... +``` + +## 分析原则 + +- 先报告事实,再给建议。 +- 把“没有数据”和“数据为 0”区分开。 +- 如果 PR/Issue 的 state 过滤不精确,根据返回字段二次归类,并在报告中说明。 +- 重点识别阻塞项:长期开放 Issue、开放 PR 堆积、无 Release、近期无维护活动、单人维护风险。 diff --git a/skills/gitlink-research-progress-tracker/examples/weekly-report.md b/skills/gitlink-research-progress-tracker/examples/weekly-report.md new file mode 100644 index 0000000..fe113e9 --- /dev/null +++ b/skills/gitlink-research-progress-tracker/examples/weekly-report.md @@ -0,0 +1,25 @@ +# Research weekly report example + +User request: + +```text +请给 songhui18/ICCV2021 生成一份科研项目进度周报和风险预警。 +``` + +Agent steps: + +```bash +gitlink-cli repo +info --owner songhui18 --repo ICCV2021 --format json +gitlink-cli issue +list --owner songhui18 --repo ICCV2021 --state open --format json +gitlink-cli issue +list --owner songhui18 --repo ICCV2021 --state closed --format json +gitlink-cli pr +list --owner songhui18 --repo ICCV2021 --state open --format json +gitlink-cli pr +list --owner songhui18 --repo ICCV2021 --state merged --format json +gitlink-cli release +list --owner songhui18 --repo ICCV2021 --format json +``` + +Expected answer: + +- Provide a concise weekly report. +- Identify the top 3 risks with evidence. +- Do not write comments back unless explicitly requested. + diff --git a/skills/gitlink-research-progress-tracker/references/risk-model.md b/skills/gitlink-research-progress-tracker/references/risk-model.md new file mode 100644 index 0000000..706b899 --- /dev/null +++ b/skills/gitlink-research-progress-tracker/references/risk-model.md @@ -0,0 +1,11 @@ +# Research progress risk model + +| 风险 | 等级 | 判定线索 | 建议 | +|---|---|---|---| +| Issue 堆积 | 中/高 | 开放 Issue 明显多于关闭 Issue,或关键问题长期未响应 | 分类 Issue,标注优先级,安排负责人 | +| PR 堆积 | 中/高 | 开放 PR 多且缺少 review/merge 记录 | 建立 review 节奏,先处理小 PR | +| 版本停滞 | 中 | 无 Release 或长期无 Release | 为阶段性实验结果建立 Release | +| 维护停滞 | 高 | 仓库更新时间较久且仍有开放问题 | 明确是否归档、继续维护或招募维护者 | +| 单点维护 | 中 | 贡献者数量很少 | 补贡献指南和 onboarding 任务 | +| 数据不足 | 低 | API 缺失或仓库未启用对应功能 | 标注数据不可用,不推断过度结论 | + diff --git a/skills/gitlink-research-reproducibility/SKILL.md b/skills/gitlink-research-reproducibility/SKILL.md new file mode 100644 index 0000000..4580908 --- /dev/null +++ b/skills/gitlink-research-reproducibility/SKILL.md @@ -0,0 +1,90 @@ +--- +name: gitlink-research-reproducibility +description: "科研仓库复现性审计:检查 GitLink 科研、论文复现、实验代码仓库是否具备 README、LICENSE、依赖清单、测试入口、CI、示例和数据/实验说明。用于生成复现性评分、缺失项和整改建议。" +--- + +# gitlink-research-reproducibility + +开始前必须先阅读 `../gitlink-shared/SKILL.md`,确认认证、权限、安全规则和 GitLink API 注意事项。 + +## 安全规则 + +- 只读执行,不创建 Issue、不评论、不修改仓库。 +- 所有 GitLink 操作必须使用 `gitlink-cli`。 +- 所有命令使用 `--format json`。 +- 不输出 Token、Cookie 或认证 Header。 +- 如果用户要求回写整改清单,先输出 dry-run 文本并等待确认。 + +## 工作流 + +1. 确认目标仓库: + +```bash +gitlink-cli repo +info --owner --repo --format json +``` + +2. 识别默认分支。优先使用 `repo +info` 返回的 `default_branch` 或 `default_branch_name`。没有字段时再询问用户,或使用 `master` 作为 GitLink 常见默认值。 + +3. 采集根目录文件树: + +```bash +gitlink-cli repo +tree --owner --repo --ref --format json +``` + +如果当前 CLI 版本没有 `repo +tree`,回退 Raw API: + +```bash +gitlink-cli api GET ///sub_entries --query 'filepath=&ref=' --format json +``` + +4. 如根目录存在 `docs`、`examples`、`data`、`experiments`、`notebooks`、`tests`、`.github`、`.gitlink`,按需采集一层子目录用于证据补强: + +```bash +gitlink-cli repo +tree --owner --repo --path docs --ref --format json +``` + +5. 按 `references/checklist.md` 的评分表生成报告。没有读取子目录证据时,报告必须标注“仅基于根目录文件树”。 + +## 输出格式 + +```markdown +# 科研复现性审计:/ + +## 总分 + +/100 + +## 检查明细 + +| 项目 | 分值 | 结果 | 证据 | 建议 | +|---|---:|---|---|---| +| README | 20 | 通过/缺失 | root_entries | ... | + +## 优先整改 + +1. ... +2. ... +3. ... + +## 数据来源 + +- `repo +info` +- `repo +tree` 或 `api GET /sub_entries` +``` + +## 判定规则 + +- README:`README.md`、`README.zh-CN.md`、`readme`。 +- LICENSE:`LICENSE`、`LICENSE.md`、`LICENSE.txt`。 +- 依赖清单:`requirements.txt`、`pyproject.toml`、`environment.yml`、`package.json`、`go.mod`、`Cargo.toml`、`pom.xml` 等。 +- 测试入口:`tests`、`test`、`__tests__`。 +- CI 配置:`.github`、`.gitlink`、`.gitlab-ci.yml`、`Jenkinsfile`、`.circleci`。 +- 示例或文档:`docs`、`examples`、`demo`。 +- 数据或实验说明:`data`、`datasets`、`experiments`、`notebooks`。 + +## 注意事项 + +- 复现性评分是工程辅助判断,不等同于论文质量评价。 +- GitLink 平台 API 可能返回字段差异,缺失字段时用“未知”而不是编造。 +- 如果仓库是镜像仓库,需标注 GitLink 内协作数据可能不代表原平台活跃度。 + diff --git a/skills/gitlink-research-reproducibility/examples/reproducibility-audit.md b/skills/gitlink-research-reproducibility/examples/reproducibility-audit.md new file mode 100644 index 0000000..a97c9c8 --- /dev/null +++ b/skills/gitlink-research-reproducibility/examples/reproducibility-audit.md @@ -0,0 +1,23 @@ +# Reproducibility audit example + +User request: + +```text +请用 GitLink 分析 songhui18/ICCV2021 的论文复现性,输出缺失项和整改优先级。 +``` + +Agent steps: + +```bash +gitlink-cli repo +info --owner songhui18 --repo ICCV2021 --format json +gitlink-cli repo +tree --owner songhui18 --repo ICCV2021 --ref master --format json +gitlink-cli api GET /songhui18/ICCV2021/sub_entries --query 'filepath=&ref=master' --format json +``` + +Expected answer: + +- Quote the collected command names. +- Score README, LICENSE, dependencies, tests, CI, examples/docs, data notes. +- List the top three fixes before any optional polishing. +- State that no write action was performed. + diff --git a/skills/gitlink-research-reproducibility/references/checklist.md b/skills/gitlink-research-reproducibility/references/checklist.md new file mode 100644 index 0000000..298679b --- /dev/null +++ b/skills/gitlink-research-reproducibility/references/checklist.md @@ -0,0 +1,12 @@ +# Reproducibility checklist + +| 项目 | 分值 | 通过条件 | 缺失时建议 | +|---|---:|---|---| +| README | 20 | 根目录存在 README,且能说明项目目标、安装或运行方式 | 补充项目背景、环境准备、最小运行命令 | +| LICENSE | 15 | 根目录存在 LICENSE 文件 | 选择合适开源许可证并在 README 中声明 | +| 依赖清单 | 15 | 存在语言对应依赖文件 | 补充 requirements.txt、pyproject.toml、environment.yml、go.mod 等 | +| 测试入口 | 20 | 存在 tests/test/__tests__ 或可运行验证脚本 | 提供最小单元测试或 smoke test | +| CI 配置 | 10 | 存在 CI 配置目录或文件 | 增加基础 lint/test CI | +| 示例或文档 | 10 | 存在 docs/examples/demo | 补充复现实验步骤或示例输入输出 | +| 数据或实验说明 | 10 | 存在 data/datasets/experiments/notebooks 或 README 中明确说明 | 写明数据来源、下载方式、实验配置 | + From 5eb7768f0e5a52f19c75d7b76cd3113af96b3726 Mon Sep 17 00:00:00 2001 From: NeeNe <26158277@qq.com> Date: Sun, 5 Jul 2026 13:30:27 +0800 Subject: [PATCH 2/3] docs(skills): localize research skill docs --- doc/changes/research-skills-suite.md | 24 +-- docs/research-skills-agent-test-report.md | 144 +++++++++--------- scripts/validate-research-skills.py | 28 ++-- .../examples/artifact-handbook.md | 15 +- .../references/handbook-template.md | 3 +- .../examples/collaboration-map.md | 15 +- .../references/profile-fields.md | 21 ++- .../examples/compliance-audit.md | 15 +- .../references/risk-rules.md | 3 +- .../examples/data-provenance-audit.md | 15 +- .../references/provenance-rules.md | 3 +- .../examples/keyword-map.md | 15 +- .../references/graph-schema.md | 27 ++-- .../examples/weekly-report.md | 15 +- .../references/risk-model.md | 3 +- .../examples/reproducibility-audit.md | 17 +-- .../references/checklist.md | 3 +- 17 files changed, 176 insertions(+), 190 deletions(-) diff --git a/doc/changes/research-skills-suite.md b/doc/changes/research-skills-suite.md index 58b7aac..532ed45 100644 --- a/doc/changes/research-skills-suite.md +++ b/doc/changes/research-skills-suite.md @@ -1,22 +1,22 @@ -# Research skills suite +# 科研 Skills 套件 -Adds seven read-only research-oriented Agent Skills for GitLink repositories: +本次新增 7 个面向 GitLink 科研仓库的只读 Agent Skills: -- `gitlink-research-reproducibility`: reproducibility checklist and remediation plan for research code. -- `gitlink-research-compliance`: license, security policy, dependency, and sensitive-file risk audit. -- `gitlink-research-progress-tracker`: weekly progress report and risk early warning for research projects. -- `gitlink-research-collaboration-map`: contributor, Issue, and PR collaboration mapping for research teams. -- `gitlink-research-knowledge-graph`: keyword-based research landscape and lightweight knowledge graph workflow. -- `gitlink-research-data-provenance`: dataset source, citation, license, and privacy-risk audit. -- `gitlink-research-artifact-handbook`: research artifact handbook generation for demos, handoff, and open-source release. +- `gitlink-research-reproducibility`:科研代码复现性清单和整改计划。 +- `gitlink-research-compliance`:许可证、安全策略、依赖和敏感文件风险审计。 +- `gitlink-research-progress-tracker`:科研项目周报和风险预警。 +- `gitlink-research-collaboration-map`:面向课题组的贡献者、Issue 和 PR 协作画像。 +- `gitlink-research-knowledge-graph`:基于关键词的科研生态调研和轻量知识图谱工作流。 +- `gitlink-research-data-provenance`:数据集来源、引用、许可证和隐私风险审计。 +- `gitlink-research-artifact-handbook`:面向答辩、交接和开源发布的科研成果手册生成。 -These Skills are designed as standalone `gitlink-cli` Skill PR deliverables. They do not depend on external project code and can also be composed by end-to-end research workflows. +这些 Skills 按独立 `gitlink-cli` Skill PR 交付物设计,不依赖外部项目代码,也可被端到端科研工作流组合调用。 -Validation: +验证方式: ```bash make validate-research-skills git diff --check ``` -Agent verification guidance is documented in `docs/research-skills-agent-test-report.md`. +真实 Agent 验证说明见 `docs/research-skills-agent-test-report.md`。 diff --git a/docs/research-skills-agent-test-report.md b/docs/research-skills-agent-test-report.md index 55cfeec..da37b5e 100644 --- a/docs/research-skills-agent-test-report.md +++ b/docs/research-skills-agent-test-report.md @@ -1,8 +1,8 @@ -# Research Skills Agent Test Report +# 科研 Skills Agent 测试报告 -## Scope +## 覆盖范围 -This report covers the seven read-only research Skills added for the GitLink competition: +本报告覆盖本次为 GitLink 竞赛新增的 7 个只读科研 Skills: - `gitlink-research-reproducibility` - `gitlink-research-compliance` @@ -12,136 +12,136 @@ This report covers the seven read-only research Skills added for the GitLink com - `gitlink-research-data-provenance` - `gitlink-research-artifact-handbook` -The Skills are standalone `gitlink-cli` Agent Skills. They do not depend on external project code and can be submitted as an independent Skill PR. +这些 Skills 均为独立的 `gitlink-cli` Agent Skills,不依赖外部项目代码,可作为独立 Skill PR 提交。 -## Automatic Validation +## 自动验证 -Run: +执行: ```bash make validate-research-skills git diff --check ``` -The validation script checks: +验证脚本检查以下内容: -- every Skill has valid `SKILL.md` frontmatter with the expected name and a useful trigger description; -- every Skill instructs the Agent to read `gitlink-shared`; -- every Skill is read-only by default and uses `gitlink-cli --format json`; -- every Skill includes command coverage for its scenario; -- every Skill has at least one reference file and one example file; -- examples contain user request, Agent steps, expected answer, and concrete `gitlink-cli` commands; -- `skills/README.md` and `doc/changes/research-skills-suite.md` index all seven Skills. +- 每个 Skill 的 `SKILL.md` 均具备合法 frontmatter、预期名称和可触发描述; +- 每个 Skill 均要求 Agent 先读取 `gitlink-shared`; +- 每个 Skill 默认只读,并要求使用 `gitlink-cli --format json`; +- 每个 Skill 覆盖对应场景所需命令; +- 每个 Skill 至少包含一个参考文件和一个示例文件; +- 示例包含用户请求、Agent 步骤、预期回答和具体 `gitlink-cli` 命令; +- `skills/README.md` 和 `doc/changes/research-skills-suite.md` 已索引全部 7 个 Skills。 -## Offline Agent Test Prompts +## 离线 Agent 测试提示词 -These prompts can be used in Claude Code, Cursor, Codex, or OpenClaw after installing the Skills. +安装 Skills 后,可在 Claude Code、Cursor、Codex 或 OpenClaw 中使用以下提示词测试。 -### Reproducibility +### 复现性审计 ```text -Use gitlink-research-reproducibility to audit songhui18/ICCV2021. Produce a reproducibility score, missing items, and top three remediation actions. Do not write back to GitLink. +请使用 gitlink-research-reproducibility 审计 songhui18/ICCV2021,输出复现性评分、缺失项和前三个整改动作。不要向 GitLink 写回任何内容。 ``` -Expected behavior: +预期行为: -- read `gitlink-shared`; -- run `repo +info` and `repo +tree`, or fall back to `api GET /sub_entries`; -- cite command sources; -- produce a checklist report. +- 读取 `gitlink-shared`; +- 执行 `repo +info` 和 `repo +tree`,必要时回退到 `api GET /sub_entries`; +- 标注命令数据来源; +- 输出清单式报告。 -### Compliance +### 合规预审 ```text -Use gitlink-research-compliance to check Gitconomy/Git4Research before open-source release. Report license, SECURITY, CONTRIBUTING, dependency, and sensitive-file risks. +请使用 gitlink-research-compliance 检查 Gitconomy/Git4Research 的开源发布准备情况,报告许可证、SECURITY、CONTRIBUTING、依赖和敏感文件风险。 ``` -Expected behavior: +预期行为: -- perform read-only file tree checks; -- avoid printing sensitive contents; -- state that the output is an engineering pre-check, not legal advice. +- 执行只读文件树检查; +- 避免打印敏感内容; +- 说明输出是工程预检查,不构成法律意见。 -### Progress Tracking +### 进度跟踪 ```text -Use gitlink-research-progress-tracker to generate a weekly research progress report for songhui18/ICCV2021, including Issue/PR queues and risk warnings. +请使用 gitlink-research-progress-tracker 为 songhui18/ICCV2021 生成科研项目周报,包含 Issue/PR 队列和风险预警。 ``` -Expected behavior: +预期行为: -- collect repo, Issue, PR, Release, and contributor data; -- separate facts from recommendations; -- avoid posting a comment unless explicitly requested. +- 采集仓库、Issue、PR、Release 和贡献者数据; +- 区分事实和建议; +- 除非用户明确要求,不发布评论。 -### Collaboration Map +### 协作画像 ```text -Use gitlink-research-collaboration-map to analyze collaboration structure for Gitconomy/Git4Research. Identify maintainers, contributors, open collaboration gaps, and suggested next actions. +请使用 gitlink-research-collaboration-map 分析 Gitconomy/Git4Research 的协作结构,识别维护者、贡献者、协作缺口和下一步建议。 ``` -Expected behavior: +预期行为: -- use public contributor, Issue, PR, language, and optional user data; -- avoid private contact information; -- base recommendations on evidence. +- 使用公开贡献者、Issue、PR、语言和可选用户数据; +- 避免输出私人联系方式; +- 建议必须有证据支撑。 -### Knowledge Graph +### 知识图谱 ```text -Use gitlink-research-knowledge-graph to search GitLink for “论文复现” and “open research”, then output a Markdown trend summary and graph JSON. +请使用 gitlink-research-knowledge-graph 在 GitLink 搜索“论文复现”和“open research”,输出 Markdown 趋势摘要和图谱 JSON。 ``` -Expected behavior: +预期行为: -- run bounded keyword searches; -- deep-analyze no more than eight repositories; -- produce `nodes` and `edges` using the documented graph schema; -- mark platform-data limits. +- 执行有边界的关键词搜索; +- 深度分析不超过 8 个仓库; +- 按图谱 schema 输出 `nodes` 和 `edges`; +- 标注平台数据局限。 -### Data Provenance +### 数据来源审计 ```text -Use gitlink-research-data-provenance to audit songhui18/ICCV2021 for dataset source, citation, license, and privacy risks. Do not print raw data contents. +请使用 gitlink-research-data-provenance 审计 songhui18/ICCV2021 的数据集来源、引用、许可证和隐私风险。不要打印原始数据内容。 ``` -Expected behavior: +预期行为: -- collect repo info and selected file trees; -- report paths and risk types only; -- distinguish missing evidence from confirmed risk. +- 采集仓库信息和选定文件树; +- 只报告路径和风险类型; +- 区分证据缺失和已确认风险。 -### Artifact Handbook +### 成果手册 ```text -Use gitlink-research-artifact-handbook to generate a research artifact handbook for Gitconomy/Git4Research, suitable for project handoff and competition demo. +请使用 gitlink-research-artifact-handbook 为 Gitconomy/Git4Research 生成科研成果沉淀手册,用于项目交接和竞赛演示。 ``` -Expected behavior: +预期行为: -- collect repo, README, tree, Issue/PR, Release, language, and contributor signals when available; -- produce a structured handbook with missing fields marked as `待补充`; -- avoid writing Wiki, Issue, Release, or repository files unless explicitly requested. +- 在可用时采集仓库、README、文件树、Issue/PR、Release、语言和贡献者信号; +- 输出结构化手册,缺失字段标注为 `待补充`; +- 除非用户明确要求,不写入 Wiki、Issue、Release 或仓库文件。 -## Real Agent Verification +## 真实 Agent 验证 -For competition submission, record at least one Agent run with screenshots or video: +竞赛提交时,建议至少录制一次 Agent 运行过程截图或视频: -1. Install or expose the Skills to the Agent. -2. Run one prompt from this report against a public GitLink repository. -3. Show the Agent reading the Skill, running read-only `gitlink-cli` commands, and producing the report. -4. Show that no write operation was performed. +1. 安装或暴露这些 Skills 给 Agent。 +2. 选择一个公开 GitLink 仓库运行本报告中的提示词。 +3. 展示 Agent 读取 Skill、执行只读 `gitlink-cli` 命令并生成报告。 +4. 展示未执行任何写操作。 -Recommended demo target: +推荐演示目标: ```text songhui18/ICCV2021 ``` -This repository has richer Issue and PR data, which makes progress tracking and collaboration mapping more visible. +该仓库具备较丰富的 Issue 和 PR 数据,便于展示进度跟踪和协作画像。 -## Known Limitations +## 已知限制 -- The automatic script validates Skill structure and workflow instructions; it does not prove semantic quality of an LLM-generated report. -- Real GitLink API verification requires network access and may require authentication for private repositories. -- Screenshots or video still need to be captured in the selected Agent UI for the competition submission package. +- 自动脚本验证 Skill 结构和工作流说明,不证明大模型生成报告的语义质量。 +- 真实 GitLink API 验证需要网络访问;私有仓库可能需要认证。 +- 竞赛提交材料仍需在选定 Agent 界面中补充截图或视频。 diff --git a/scripts/validate-research-skills.py b/scripts/validate-research-skills.py index 60b9f99..277ffdd 100644 --- a/scripts/validate-research-skills.py +++ b/scripts/validate-research-skills.py @@ -61,20 +61,20 @@ def read(path: Path) -> str: try: return path.read_text(encoding="utf-8") except FileNotFoundError: - fail(f"missing file: {path}") + fail(f"缺少文件:{path}") def parse_frontmatter(text: str, path: Path) -> dict[str, str]: if not text.startswith("---\n"): - fail(f"{path} does not start with YAML frontmatter") + fail(f"{path} 未以 YAML frontmatter 开头") try: _, frontmatter, _ = text.split("---", 2) except ValueError: - fail(f"{path} has incomplete YAML frontmatter") + fail(f"{path} 的 YAML frontmatter 不完整") parsed: dict[str, str] = {} for line in frontmatter.strip().splitlines(): if ":" not in line: - fail(f"{path} frontmatter line has no colon: {line}") + fail(f"{path} 的 frontmatter 行缺少冒号:{line}") key, value = line.split(":", 1) parsed[key.strip()] = value.strip().strip('"') return parsed @@ -82,12 +82,12 @@ def parse_frontmatter(text: str, path: Path) -> dict[str, str]: def assert_contains(text: str, needle: str, path: Path) -> None: if needle not in text: - fail(f"{path} is missing required text: {needle}") + fail(f"{path} 缺少必需文本:{needle}") def assert_regex(text: str, pattern: str, path: Path) -> None: if not re.search(pattern, text, flags=re.MULTILINE): - fail(f"{path} does not match required pattern: {pattern}") + fail(f"{path} 未匹配必需模式:{pattern}") def validate_skill(root: Path, name: str, spec: dict[str, list[str]]) -> None: @@ -97,13 +97,13 @@ def validate_skill(root: Path, name: str, spec: dict[str, list[str]]) -> None: frontmatter = parse_frontmatter(text, skill_md) if frontmatter.get("name") != name: - fail(f"{skill_md} has wrong name: {frontmatter.get('name')}") + fail(f"{skill_md} 的 name 字段错误:{frontmatter.get('name')}") description = frontmatter.get("description", "") if len(description) < 30: - fail(f"{skill_md} description is too short") + fail(f"{skill_md} 的 description 过短") for keyword in spec["keywords"]: if keyword not in text and keyword not in description: - fail(f"{skill_md} is missing scenario keyword: {keyword}") + fail(f"{skill_md} 缺少场景关键词:{keyword}") assert_contains(text, "gitlink-shared", skill_md) assert_contains(text, "gitlink-cli", skill_md) @@ -118,14 +118,14 @@ def validate_skill(root: Path, name: str, spec: dict[str, list[str]]) -> None: path = skill_dir / "references" / filename ref_text = read(path) if len(ref_text.strip().splitlines()) < 5: - fail(f"{path} is too small to be useful") + fail(f"{path} 内容过少,无法作为有效参考") for filename in spec["examples"]: path = skill_dir / "examples" / filename example_text = read(path) - assert_contains(example_text, "User request", path) - assert_contains(example_text, "Agent steps", path) - assert_contains(example_text, "Expected answer", path) + assert_contains(example_text, "用户请求", path) + assert_contains(example_text, "Agent 步骤", path) + assert_contains(example_text, "预期回答", path) assert_contains(example_text, "gitlink-cli", path) @@ -142,7 +142,7 @@ def validate_change_note(root: Path) -> None: for name in RESEARCH_SKILLS: assert_contains(text, name, note) if "scripts/validate-research-skills.py" not in text and "make validate-research-skills" not in text: - fail(f"{note} is missing the research Skills validation command") + fail(f"{note} 缺少科研 Skills 验证命令") def main() -> int: diff --git a/skills/gitlink-research-artifact-handbook/examples/artifact-handbook.md b/skills/gitlink-research-artifact-handbook/examples/artifact-handbook.md index 2107f78..11218b3 100644 --- a/skills/gitlink-research-artifact-handbook/examples/artifact-handbook.md +++ b/skills/gitlink-research-artifact-handbook/examples/artifact-handbook.md @@ -1,12 +1,12 @@ -# Artifact handbook example +# 成果手册示例 -User request: +用户请求: ```text 请为 Gitconomy/Git4Research 生成一份科研成果沉淀手册,用于课题组交接和答辩展示。 ``` -Agent steps: +Agent 步骤: ```bash gitlink-cli repo +info --owner Gitconomy --repo Git4Research --format json @@ -17,9 +17,8 @@ gitlink-cli pr +list --owner Gitconomy --repo Git4Research --state merged --form gitlink-cli release +list --owner Gitconomy --repo Git4Research --format json ``` -Expected answer: - -- Produce a handbook using the template. -- Mark missing evidence as `待补充`. -- Confirm that no Wiki, Issue, PR, Release, or file write operation was performed. +预期回答: +- 按模板生成科研成果沉淀手册。 +- 将缺失证据标注为 `待补充`。 +- 确认未执行 Wiki、Issue、PR、Release 或文件写操作。 diff --git a/skills/gitlink-research-artifact-handbook/references/handbook-template.md b/skills/gitlink-research-artifact-handbook/references/handbook-template.md index d439696..91bdf47 100644 --- a/skills/gitlink-research-artifact-handbook/references/handbook-template.md +++ b/skills/gitlink-research-artifact-handbook/references/handbook-template.md @@ -1,4 +1,4 @@ -# Research artifact handbook template +# 科研成果沉淀手册模板 ```markdown # 科研成果沉淀手册:/ @@ -56,4 +56,3 @@ - [ ] 实验命令可运行 - [ ] Release 或归档版本可引用 ``` - diff --git a/skills/gitlink-research-collaboration-map/examples/collaboration-map.md b/skills/gitlink-research-collaboration-map/examples/collaboration-map.md index 8b68296..28dacfa 100644 --- a/skills/gitlink-research-collaboration-map/examples/collaboration-map.md +++ b/skills/gitlink-research-collaboration-map/examples/collaboration-map.md @@ -1,12 +1,12 @@ -# Collaboration map example +# 协作画像示例 -User request: +用户请求: ```text 请分析 Gitconomy/Git4Research 的科研协作结构,找出核心维护者和可跟进的问题方向。 ``` -Agent steps: +Agent 步骤: ```bash gitlink-cli repo +info --owner Gitconomy --repo Git4Research --format json @@ -15,9 +15,8 @@ gitlink-cli issue +list --owner Gitconomy --repo Git4Research --state open --for gitlink-cli pr +list --owner Gitconomy --repo Git4Research --state open --format json ``` -Expected answer: - -- Separate facts from recommendations. -- Mention data limits if the repository has little Issue/PR activity. -- Do not expose private contact information. +预期回答: +- 区分事实和建议。 +- 如果仓库 Issue/PR 活动较少,需要说明数据局限。 +- 不暴露私人联系方式。 diff --git a/skills/gitlink-research-collaboration-map/references/profile-fields.md b/skills/gitlink-research-collaboration-map/references/profile-fields.md index 4bc06c9..48fb999 100644 --- a/skills/gitlink-research-collaboration-map/references/profile-fields.md +++ b/skills/gitlink-research-collaboration-map/references/profile-fields.md @@ -1,20 +1,19 @@ -# Collaboration profile fields +# 协作画像字段 | 字段 | 来源 | 用途 | |---|---|---| -| contributor login/name | `repo +contributors` | 识别代码贡献者 | -| commits/contributions | `repo +contributors` | 粗略衡量贡献量 | -| issue author | `issue +list` | 识别问题提出者 | -| issue assignee | `issue +list` | 识别责任分配 | -| issue labels | `issue +list` | 判断研究主题或任务类型 | -| PR author | `pr +list` | 识别代码贡献者和集成者 | -| PR status | `pr +list` | 判断协作流转状态 | -| language | `repo +languages` | 推断技术栈 | +| 贡献者账号/名称 | `repo +contributors` | 识别代码贡献者 | +| 提交/贡献计数 | `repo +contributors` | 粗略衡量贡献量 | +| Issue 作者 | `issue +list` | 识别问题提出者 | +| Issue 负责人 | `issue +list` | 识别责任分配 | +| Issue 标签 | `issue +list` | 判断研究主题或任务类型 | +| PR 作者 | `pr +list` | 识别代码贡献者和集成者 | +| PR 状态 | `pr +list` | 判断协作流转状态 | +| 语言 | `repo +languages` | 推断技术栈 | -Suggested role labels: +建议角色标签: - 核心维护者:代码贡献和 Issue/PR 参与均较多。 - 问题提出者:Issue 活跃但代码贡献少,适合需求澄清和复现实验。 - 实验贡献者:PR 或实验相关 Issue 活跃。 - 潜在协作者:与主要语言或研究主题匹配,但当前参与较少。 - diff --git a/skills/gitlink-research-compliance/examples/compliance-audit.md b/skills/gitlink-research-compliance/examples/compliance-audit.md index 88fd216..dcdd1f8 100644 --- a/skills/gitlink-research-compliance/examples/compliance-audit.md +++ b/skills/gitlink-research-compliance/examples/compliance-audit.md @@ -1,21 +1,20 @@ -# Compliance audit example +# 合规预审示例 -User request: +用户请求: ```text 请检查 Gitconomy/Git4Research 是否具备开源发布合规基础。 ``` -Agent steps: +Agent 步骤: ```bash gitlink-cli repo +info --owner Gitconomy --repo Git4Research --format json gitlink-cli repo +tree --owner Gitconomy --repo Git4Research --ref main --format json ``` -Expected answer: - -- Report license, security policy, contribution guide, dependency manifest, and sensitive file risks. -- Mention whether the audit is root-only or includes selected subdirectories. -- Avoid quoting or exposing sensitive file contents. +预期回答: +- 报告许可证、安全策略、贡献指南、依赖清单和敏感文件风险。 +- 说明审计范围是仅根目录,还是包含选定子目录。 +- 避免引用或暴露敏感文件内容。 diff --git a/skills/gitlink-research-compliance/references/risk-rules.md b/skills/gitlink-research-compliance/references/risk-rules.md index 8f2c165..57058d5 100644 --- a/skills/gitlink-research-compliance/references/risk-rules.md +++ b/skills/gitlink-research-compliance/references/risk-rules.md @@ -1,4 +1,4 @@ -# Compliance risk rules +# 合规风险规则 | 风险 | 等级 | 判定 | 建议 | |---|---|---|---| @@ -8,4 +8,3 @@ | 缺少依赖声明 | 中 | 无常见依赖清单 | 补充依赖文件,便于许可证和漏洞审计 | | 缺少 SECURITY | 中 | 无 `SECURITY.md` | 补充漏洞披露流程 | | 缺少 CONTRIBUTING | 低 | 无 `CONTRIBUTING.md` | 补充贡献流程和代码规范 | - diff --git a/skills/gitlink-research-data-provenance/examples/data-provenance-audit.md b/skills/gitlink-research-data-provenance/examples/data-provenance-audit.md index 584c5dd..aff18c7 100644 --- a/skills/gitlink-research-data-provenance/examples/data-provenance-audit.md +++ b/skills/gitlink-research-data-provenance/examples/data-provenance-audit.md @@ -1,12 +1,12 @@ -# Data provenance audit example +# 数据来源审计示例 -User request: +用户请求: ```text 请检查 songhui18/ICCV2021 是否有科研数据来源、数据许可证或隐私风险问题。 ``` -Agent steps: +Agent 步骤: ```bash gitlink-cli repo +info --owner songhui18 --repo ICCV2021 --format json @@ -14,9 +14,8 @@ gitlink-cli repo +tree --owner songhui18 --repo ICCV2021 --ref master --format j gitlink-cli repo +tree --owner songhui18 --repo ICCV2021 --path data --ref master --format json ``` -Expected answer: - -- Report only paths and risk types, not raw data contents. -- Separate data source, license, citation, privacy, and large-file risks. -- State whether the assessment is root-only or includes selected subdirectories. +预期回答: +- 只报告路径和风险类型,不输出原始数据内容。 +- 区分数据来源、许可证、引用、隐私和大文件风险。 +- 说明评估范围是仅根目录,还是包含选定子目录。 diff --git a/skills/gitlink-research-data-provenance/references/provenance-rules.md b/skills/gitlink-research-data-provenance/references/provenance-rules.md index 4bcca58..cbdbbb0 100644 --- a/skills/gitlink-research-data-provenance/references/provenance-rules.md +++ b/skills/gitlink-research-data-provenance/references/provenance-rules.md @@ -1,4 +1,4 @@ -# Data provenance rules +# 数据来源规则 | 检查项 | 风险等级 | 判定线索 | 建议 | |---|---|---|---| @@ -9,4 +9,3 @@ | 数据下载脚本无校验 | 中 | 有 download/get_data 脚本但无 checksum/version | 补充 checksum、版本号和失败处理 | | 引用链不完整 | 中 | README 未说明数据、论文、代码之间的关系 | 补充数据引用、论文引用和实验脚本映射 | | 未发现数据痕迹 | 低 | 未见数据目录、下载脚本或数据扩展名 | 在报告中标注未发现,建议说明数据是否需另行申请 | - diff --git a/skills/gitlink-research-knowledge-graph/examples/keyword-map.md b/skills/gitlink-research-knowledge-graph/examples/keyword-map.md index a790d86..f7b0927 100644 --- a/skills/gitlink-research-knowledge-graph/examples/keyword-map.md +++ b/skills/gitlink-research-knowledge-graph/examples/keyword-map.md @@ -1,12 +1,12 @@ -# Keyword knowledge graph example +# 关键词知识图谱示例 -User request: +用户请求: ```text 请围绕“论文复现”和“open research”在 GitLink 上做科研热点搜索,并输出轻量知识图谱。 ``` -Agent steps: +Agent 步骤: ```bash gitlink-cli search +repos -k "论文复现" --format json @@ -16,9 +16,8 @@ gitlink-cli repo +languages --owner --repo --format json gitlink-cli repo +contributors --owner --repo --format json ``` -Expected answer: - -- List keywords and candidate repositories. -- Provide a Markdown trend report. -- Provide `nodes` and `edges` JSON using `references/graph-schema.md`. +预期回答: +- 列出关键词和候选仓库。 +- 提供 Markdown 趋势报告。 +- 按 `references/graph-schema.md` 输出包含 `nodes` 和 `edges` 的 JSON。 diff --git a/skills/gitlink-research-knowledge-graph/references/graph-schema.md b/skills/gitlink-research-knowledge-graph/references/graph-schema.md index 06f11cb..1953a7a 100644 --- a/skills/gitlink-research-knowledge-graph/references/graph-schema.md +++ b/skills/gitlink-research-knowledge-graph/references/graph-schema.md @@ -1,27 +1,27 @@ -# Research knowledge graph schema +# 科研知识图谱结构 -Node types: +节点类型: -| Type | Required fields | Description | +| 类型 | 必填字段 | 说明 | |---|---|---| -| `repo` | `id`, `owner`, `repo`, `label` | GitLink repository | -| `language` | `id`, `name` | Programming language | -| `contributor` | `id`, `login` | Public contributor identity | -| `topic` | `id`, `name` | Keyword or inferred research topic | -| `issue` | `id`, `title`, `state` | Representative Issue | -| `pr` | `id`, `title`, `state` | Representative PR | +| `repo` | `id`, `owner`, `repo`, `label` | GitLink 仓库 | +| `language` | `id`, `name` | 编程语言 | +| `contributor` | `id`, `login` | 公开贡献者身份 | +| `topic` | `id`, `name` | 关键词或推断出的研究主题 | +| `issue` | `id`, `title`, `state` | 代表性 Issue | +| `pr` | `id`, `title`, `state` | 代表性 PR | -Edge types: +边类型: -| Type | From | To | Evidence | +| 类型 | 起点 | 终点 | 证据 | |---|---|---|---| | `uses_language` | repo | language | `repo +languages` | | `contributed_by` | contributor | repo | `repo +contributors` | -| `matches_topic` | repo | topic | search keyword or description | +| `matches_topic` | repo | topic | 搜索关键词或描述 | | `has_issue` | repo | issue | `issue +list` | | `has_pr` | repo | pr | `pr +list` | -Example: +示例: ```json { @@ -34,4 +34,3 @@ Example: ] } ``` - diff --git a/skills/gitlink-research-progress-tracker/examples/weekly-report.md b/skills/gitlink-research-progress-tracker/examples/weekly-report.md index fe113e9..cc8a9f0 100644 --- a/skills/gitlink-research-progress-tracker/examples/weekly-report.md +++ b/skills/gitlink-research-progress-tracker/examples/weekly-report.md @@ -1,12 +1,12 @@ -# Research weekly report example +# 科研周报示例 -User request: +用户请求: ```text 请给 songhui18/ICCV2021 生成一份科研项目进度周报和风险预警。 ``` -Agent steps: +Agent 步骤: ```bash gitlink-cli repo +info --owner songhui18 --repo ICCV2021 --format json @@ -17,9 +17,8 @@ gitlink-cli pr +list --owner songhui18 --repo ICCV2021 --state merged --format j gitlink-cli release +list --owner songhui18 --repo ICCV2021 --format json ``` -Expected answer: - -- Provide a concise weekly report. -- Identify the top 3 risks with evidence. -- Do not write comments back unless explicitly requested. +预期回答: +- 提供简洁的科研项目周报。 +- 识别前三个风险并给出证据。 +- 除非用户明确要求,不写回评论。 diff --git a/skills/gitlink-research-progress-tracker/references/risk-model.md b/skills/gitlink-research-progress-tracker/references/risk-model.md index 706b899..d2c2e3e 100644 --- a/skills/gitlink-research-progress-tracker/references/risk-model.md +++ b/skills/gitlink-research-progress-tracker/references/risk-model.md @@ -1,4 +1,4 @@ -# Research progress risk model +# 科研进度风险模型 | 风险 | 等级 | 判定线索 | 建议 | |---|---|---|---| @@ -8,4 +8,3 @@ | 维护停滞 | 高 | 仓库更新时间较久且仍有开放问题 | 明确是否归档、继续维护或招募维护者 | | 单点维护 | 中 | 贡献者数量很少 | 补贡献指南和 onboarding 任务 | | 数据不足 | 低 | API 缺失或仓库未启用对应功能 | 标注数据不可用,不推断过度结论 | - diff --git a/skills/gitlink-research-reproducibility/examples/reproducibility-audit.md b/skills/gitlink-research-reproducibility/examples/reproducibility-audit.md index a97c9c8..9a7a124 100644 --- a/skills/gitlink-research-reproducibility/examples/reproducibility-audit.md +++ b/skills/gitlink-research-reproducibility/examples/reproducibility-audit.md @@ -1,12 +1,12 @@ -# Reproducibility audit example +# 复现性审计示例 -User request: +用户请求: ```text 请用 GitLink 分析 songhui18/ICCV2021 的论文复现性,输出缺失项和整改优先级。 ``` -Agent steps: +Agent 步骤: ```bash gitlink-cli repo +info --owner songhui18 --repo ICCV2021 --format json @@ -14,10 +14,9 @@ gitlink-cli repo +tree --owner songhui18 --repo ICCV2021 --ref master --format j gitlink-cli api GET /songhui18/ICCV2021/sub_entries --query 'filepath=&ref=master' --format json ``` -Expected answer: - -- Quote the collected command names. -- Score README, LICENSE, dependencies, tests, CI, examples/docs, data notes. -- List the top three fixes before any optional polishing. -- State that no write action was performed. +预期回答: +- 列出已采集的命令名称。 +- 对 README、LICENSE、依赖、测试、CI、示例/文档和数据说明评分。 +- 优先列出前三个整改项,再给可选优化建议。 +- 声明未执行写操作。 diff --git a/skills/gitlink-research-reproducibility/references/checklist.md b/skills/gitlink-research-reproducibility/references/checklist.md index 298679b..14ec13e 100644 --- a/skills/gitlink-research-reproducibility/references/checklist.md +++ b/skills/gitlink-research-reproducibility/references/checklist.md @@ -1,4 +1,4 @@ -# Reproducibility checklist +# 复现性检查清单 | 项目 | 分值 | 通过条件 | 缺失时建议 | |---|---:|---|---| @@ -9,4 +9,3 @@ | CI 配置 | 10 | 存在 CI 配置目录或文件 | 增加基础 lint/test CI | | 示例或文档 | 10 | 存在 docs/examples/demo | 补充复现实验步骤或示例输入输出 | | 数据或实验说明 | 10 | 存在 data/datasets/experiments/notebooks 或 README 中明确说明 | 写明数据来源、下载方式、实验配置 | - From 4cd7a8918b1e0bbafd45beab261aa8d83c5cc946 Mon Sep 17 00:00:00 2001 From: NeeNe <26158277@qq.com> Date: Fri, 10 Jul 2026 16:40:28 +0800 Subject: [PATCH 3/3] fix(skills): complete research skill metadata --- internal/i18n/locales/en-US.json | 1 + internal/i18n/locales/zh-CN.json | 1 + scripts/validate-research-skills.py | 6 ++++++ skills/gitlink-research-artifact-handbook/SKILL.md | 6 +++++- skills/gitlink-research-collaboration-map/SKILL.md | 5 +++++ skills/gitlink-research-compliance/SKILL.md | 6 +++++- skills/gitlink-research-data-provenance/SKILL.md | 6 +++++- skills/gitlink-research-knowledge-graph/SKILL.md | 5 +++++ skills/gitlink-research-progress-tracker/SKILL.md | 5 +++++ skills/gitlink-research-reproducibility/SKILL.md | 6 +++++- 10 files changed, 43 insertions(+), 4 deletions(-) diff --git a/internal/i18n/locales/en-US.json b/internal/i18n/locales/en-US.json index 0739395..da75590 100644 --- a/internal/i18n/locales/en-US.json +++ b/internal/i18n/locales/en-US.json @@ -34,6 +34,7 @@ "cmd.dataset.view.short": "View a repository's dataset", "cmd.doctor.long": "Run local diagnostics for gitlink-cli configuration, authentication, repository context and API connectivity.", "cmd.doctor.short": "Diagnose gitlink-cli environment problems", + "cmd.ignore.short": "Ignore file template operations", "cmd.issue.batch_close.long": "Close filtered issues in bulk.\n\nThis command defaults to dry-run mode and only prints matching issues.\nPass --yes to execute remote close operations. Use restrictive filters and a small limit.\n\nExamples:\n gitlink-cli issue +batch-close --owner Gitlink --repo gitlink-cli --older-than-days 60 --limit 20\n gitlink-cli issue +batch-close --owner Gitlink --repo gitlink-cli --older-than-days 60 --limit 20 --yes", "cmd.issue.batch_close.short": "Close filtered issues in bulk. Defaults to dry-run; pass --yes to execute.", "cmd.issue.batch_label.long": "Add a label to filtered issues in bulk.\n\nThis command defaults to dry-run mode and only prints matching issues.\nPass --yes to execute remote label operations. The current implementation does not fake label writes when the API endpoint is unavailable.\n\nExamples:\n gitlink-cli issue +batch-label --owner Gitlink --repo gitlink-cli --add-label stale --older-than-days 30 --limit 50\n gitlink-cli issue +batch-label --owner Gitlink --repo gitlink-cli --add-label stale --older-than-days 30 --limit 50 --yes", diff --git a/internal/i18n/locales/zh-CN.json b/internal/i18n/locales/zh-CN.json index 2e6fc4d..ae901ef 100644 --- a/internal/i18n/locales/zh-CN.json +++ b/internal/i18n/locales/zh-CN.json @@ -34,6 +34,7 @@ "cmd.dataset.view.short": "查看仓库数据集", "cmd.doctor.long": "诊断 gitlink-cli 的配置、认证、仓库上下文和 API 连通性问题。", "cmd.doctor.short": "诊断 gitlink-cli 环境问题", + "cmd.ignore.short": "忽略文件模板操作", "cmd.issue.batch_close.long": "批量关闭筛选后的议题。\n\n该命令默认处于 dry-run 模式,只打印匹配的议题。\n传入 --yes 后执行远端关闭操作。请使用严格筛选条件和较小 limit。\n\n示例:\n gitlink-cli issue +batch-close --owner Gitlink --repo gitlink-cli --older-than-days 60 --limit 20\n gitlink-cli issue +batch-close --owner Gitlink --repo gitlink-cli --older-than-days 60 --limit 20 --yes", "cmd.issue.batch_close.short": "批量关闭筛选后的议题。默认 dry-run;传入 --yes 后执行。", "cmd.issue.batch_label.long": "给筛选后的议题批量添加标签。\n\n该命令默认处于 dry-run 模式,只打印匹配的议题。\n传入 --yes 后执行远端标签操作。当前实现不会在 API 端点不可用时伪造写入结果。\n\n示例:\n gitlink-cli issue +batch-label --owner Gitlink --repo gitlink-cli --add-label stale --older-than-days 30 --limit 50\n gitlink-cli issue +batch-label --owner Gitlink --repo gitlink-cli --add-label stale --older-than-days 30 --limit 50 --yes", diff --git a/scripts/validate-research-skills.py b/scripts/validate-research-skills.py index 277ffdd..f8bc619 100644 --- a/scripts/validate-research-skills.py +++ b/scripts/validate-research-skills.py @@ -98,6 +98,12 @@ def validate_skill(root: Path, name: str, spec: dict[str, list[str]]) -> None: if frontmatter.get("name") != name: fail(f"{skill_md} 的 name 字段错误:{frontmatter.get('name')}") + if not re.fullmatch(r"\d+\.\d+\.\d+", frontmatter.get("version", "")): + fail(f"{skill_md} 的 version 必须使用 x.y.z 格式") + if "gitlink-cli" not in frontmatter.get("bins", ""): + fail(f"{skill_md} 的 metadata.requires.bins 缺少 gitlink-cli") + if not frontmatter.get("cliHelp", "").startswith("gitlink-cli "): + fail(f"{skill_md} 的 cliHelp 必须以 gitlink-cli 开头") description = frontmatter.get("description", "") if len(description) < 30: fail(f"{skill_md} 的 description 过短") diff --git a/skills/gitlink-research-artifact-handbook/SKILL.md b/skills/gitlink-research-artifact-handbook/SKILL.md index b956032..95f08af 100644 --- a/skills/gitlink-research-artifact-handbook/SKILL.md +++ b/skills/gitlink-research-artifact-handbook/SKILL.md @@ -1,6 +1,11 @@ --- name: gitlink-research-artifact-handbook +version: 0.1.0 description: "科研成果沉淀手册生成:基于 GitLink 仓库 README、目录结构、Release、Issue、PR、贡献者和语言信息,生成面向答辩、开源发布或课题组交接的科研成果手册。用于梳理代码、实验、论文、数据、贡献和复现入口。" +metadata: + requires: + bins: ["gitlink-cli"] + cliHelp: "gitlink-cli repo --help" --- # gitlink-research-artifact-handbook @@ -70,4 +75,3 @@ gitlink-cli release +list --owner --repo --format json - 对 Issue/PR 只做摘要,不贴完整讨论。 - 如果仓库没有 Release,建议使用 Release 固化阶段成果。 - 如果根目录 README 已完整,保留其结构并补交接清单;如果 README 很弱,按模板重建手册。 - diff --git a/skills/gitlink-research-collaboration-map/SKILL.md b/skills/gitlink-research-collaboration-map/SKILL.md index 6d52289..bdd95ae 100644 --- a/skills/gitlink-research-collaboration-map/SKILL.md +++ b/skills/gitlink-research-collaboration-map/SKILL.md @@ -1,6 +1,11 @@ --- name: gitlink-research-collaboration-map +version: 0.1.0 description: "科研协作画像与合作建议:分析 GitLink 科研仓库的贡献者、Issue、PR、语言和用户信息,识别核心维护者、潜在协作者、未响应研究问题和协作分工建议。用于课题组协作复盘、跨团队合作匹配和学生贡献画像。" +metadata: + requires: + bins: ["gitlink-cli"] + cliHelp: "gitlink-cli repo --help" --- # gitlink-research-collaboration-map diff --git a/skills/gitlink-research-compliance/SKILL.md b/skills/gitlink-research-compliance/SKILL.md index c351c58..a5bd215 100644 --- a/skills/gitlink-research-compliance/SKILL.md +++ b/skills/gitlink-research-compliance/SKILL.md @@ -1,6 +1,11 @@ --- name: gitlink-research-compliance +version: 0.1.0 description: "科研开源合规与敏感风险检查:审计 GitLink 科研仓库的许可证、SECURITY、CONTRIBUTING、依赖声明和敏感文件风险。用于开源发布前预检查、论文代码发布合规清单和整改建议。" +metadata: + requires: + bins: ["gitlink-cli"] + cliHelp: "gitlink-cli repo --help" --- # gitlink-research-compliance @@ -74,4 +79,3 @@ gitlink-cli api GET ///sub_entries --query 'filepath=&ref=' - 不要下载或展示疑似密钥内容,只报告路径和风险类型。 - 如果只能获取根目录文件树,报告必须说明深层敏感文件未覆盖。 - 私有仓库需要用户自行完成认证,不能要求用户粘贴 Token。 - diff --git a/skills/gitlink-research-data-provenance/SKILL.md b/skills/gitlink-research-data-provenance/SKILL.md index aeb97ee..7ae16fa 100644 --- a/skills/gitlink-research-data-provenance/SKILL.md +++ b/skills/gitlink-research-data-provenance/SKILL.md @@ -1,6 +1,11 @@ --- name: gitlink-research-data-provenance +version: 0.1.0 description: "科研数据来源与隐私审计:检查 GitLink 科研仓库中的数据集说明、下载来源、引用链、隐私风险、数据许可证和大文件痕迹。用于论文代码发布前的数据治理、复现实验数据说明和科研合规预审。" +metadata: + requires: + bins: ["gitlink-cli"] + cliHelp: "gitlink-cli repo --help" --- # gitlink-research-data-provenance @@ -76,4 +81,3 @@ gitlink-cli repo +tree --owner --repo --path docs --ref - 发现 `patient`、`student`、`email`、`phone`、`idcard`、`address`、`face`、`medical` 等词时,标注隐私复核风险。 - 如果仓库只包含数据下载脚本,检查脚本是否说明下载地址、数据许可证和引用方式。 - 无法确认的事项标注“未确认”,不要编造数据来源。 - diff --git a/skills/gitlink-research-knowledge-graph/SKILL.md b/skills/gitlink-research-knowledge-graph/SKILL.md index 38d63c0..8265976 100644 --- a/skills/gitlink-research-knowledge-graph/SKILL.md +++ b/skills/gitlink-research-knowledge-graph/SKILL.md @@ -1,6 +1,11 @@ --- name: gitlink-research-knowledge-graph +version: 0.1.0 description: "科研热点追踪与轻量知识图谱:按关键词搜索 GitLink 科研仓库,聚合仓库、语言、贡献者、Issue/PR 主题和研究方向,输出趋势分析、图谱节点边和选题建议。用于科研选题、技术生态调研和领域知识图谱构建。" +metadata: + requires: + bins: ["gitlink-cli"] + cliHelp: "gitlink-cli search --help" --- # gitlink-research-knowledge-graph diff --git a/skills/gitlink-research-progress-tracker/SKILL.md b/skills/gitlink-research-progress-tracker/SKILL.md index 1868989..56a5ab1 100644 --- a/skills/gitlink-research-progress-tracker/SKILL.md +++ b/skills/gitlink-research-progress-tracker/SKILL.md @@ -1,6 +1,11 @@ --- name: gitlink-research-progress-tracker +version: 0.1.0 description: "科研项目进度跟踪与预警:基于 GitLink Issue、PR、Release、贡献者和仓库更新时间生成课题组周报、停滞风险、开放问题队列和下一步建议。用于科研项目管理、中期检查和例会汇报。" +metadata: + requires: + bins: ["gitlink-cli"] + cliHelp: "gitlink-cli issue --help" --- # gitlink-research-progress-tracker diff --git a/skills/gitlink-research-reproducibility/SKILL.md b/skills/gitlink-research-reproducibility/SKILL.md index 4580908..004de01 100644 --- a/skills/gitlink-research-reproducibility/SKILL.md +++ b/skills/gitlink-research-reproducibility/SKILL.md @@ -1,6 +1,11 @@ --- name: gitlink-research-reproducibility +version: 0.1.0 description: "科研仓库复现性审计:检查 GitLink 科研、论文复现、实验代码仓库是否具备 README、LICENSE、依赖清单、测试入口、CI、示例和数据/实验说明。用于生成复现性评分、缺失项和整改建议。" +metadata: + requires: + bins: ["gitlink-cli"] + cliHelp: "gitlink-cli repo --help" --- # gitlink-research-reproducibility @@ -87,4 +92,3 @@ gitlink-cli repo +tree --owner --repo --path docs --ref - 复现性评分是工程辅助判断,不等同于论文质量评价。 - GitLink 平台 API 可能返回字段差异,缺失字段时用“未知”而不是编造。 - 如果仓库是镜像仓库,需标注 GitLink 内协作数据可能不代表原平台活跃度。 -