科研 Skill
研究项目漂移状态检测
drift-report
Checks a shared source library and registered projects for drift: un-indexed PDFs, unmerged keywords, bibkey collisions. Use to audit a multi-project research setup.
SKILL.md
Drift Report
Deterministic maintenance findings across three scopes — current project, shared library, all registered projects — produced by the same script the SessionStart hook runs. Report-only with one exception: the incremental search-index update (a derived cache).
Announce at start: "Using drift-report to check for accumulated drift."
How the automatic path works (so you can explain it)
At session start, hooks/drift_check.py compares cheap fingerprints (library
PDF count/mtimes, master-bib hash, each registered project's bib hash, the
current wiki's file count/mtimes) against ~/.cache/research-superpowers/drift-state.json.
Nothing changed → nothing runs, nothing is injected. Drift is caused by
actions, not by time — in-session actions are covered by the skills that cause
them (ingest lints, add-to-library re-indexes); the hook covers what happens
out-of-band: manual VPN downloads, Nextcloud syncs from teammates, Obsidian
edits, ingests in other projects. The first run is a silent baseline.
Kill switch: RESEARCH_SUPERPOWERS_NO_DRIFT_CHECK=1.
Manual run (this skill's job)
python3 "${CLAUDE_PLUGIN_ROOT:-$RESEARCH_SUPERPOWERS_DIR}/hooks/drift_check.py" --force --human
--force ignores the fingerprints (checks everything now — this is how you
inspect a freshly installed machine despite the silent baseline); --human
prints the report instead of hook JSON. Run from a project root when possible —
the wiki-lint scope only exists there.
The checks, and what each finding means
| Finding | Meaning | Fix (never run without the user's go-ahead) |
|---|---|---|
| lint FAILS after out-of-band edit | someone edited knowledge/ outside a session (Obsidian, editor) | python scripts/lint-wiki.py, then fix per wiki-lint skill |
| PDFs with no text layer | scans arrived (VPN download, teammate sync) — invisible to search | ocrmypdf, then re-index |
| PDFs unreadable | corrupt files in the library | bib-search.py status for the list |
| PDFs > 40 MB | publisher bloat syncing to everyone, forever | optimize-pdf.py scan . → optimize after review |
| merge drift | ingests wrote bibkeys/keywords into project bibs that the master lacks — new keywords are invisible to every OTHER project's bib-search until merged | merge-bibs.py --report-only first, review FACTUAL conflicts, then merge |
| bibkey COLLISION / SPLIT | one key names two works (a false cross-project join) or one work has two keys (a silently missed join) | migrate-citekeys.py, guided by the audit output |
| project sync drift | a project's copied schema/ + scripts/ come from an older plugin version — its linter validates against rules the plugin has since changed, and the error reads like a wiki problem | sync-project.py --from-registry to see it, --apply to fix |
| index updated (info) | the one permitted mutation — derived cache, incremental | nothing to do |
Three of these tools live in the plugin, not in the project. merge-bibs.py,
migrate-citekeys.py and sync-project.py are maintainer tools operating across projects, so they are
not mirrored into the template — python scripts/merge-bibs.py from a project root
fails with "No such file or directory". Run them from the plugin:
python3 "${CLAUDE_PLUGIN_ROOT:-$RESEARCH_SUPERPOWERS_DIR}/scripts/merge-bibs.py" …
(Claude Code sets CLAUDE_PLUGIN_ROOT; the OpenCode plugin sets
RESEARCH_SUPERPOWERS_DIR for every shell command). The report's → lines
already carry the absolute path. Everything else in the table (bib-search.py,
optimize-pdf.py, lint-wiki.py) is template-mirrored and runs project-relative.
Never expand the registry in the shell. Pass --from-registry and let
merge-bibs.py read ~/.config/research-superpowers/projects itself. Both shell
forms lose projects silently, in opposite directions: --roots $ROOTS does not
word-split in zsh and arrives as one nonexistent path, while
--roots $(grep -v "^#" …) splits in bash and zsh — including inside a path, so
a project under …/Mobile Documents/… arrives as several nonexistent fragments.
A dropped project makes the report say "0 FACTUAL conflicts" about a set that never
contained it, and inflates the master-only count. --roots <p1> <p2> … stays for
explicitly named projects; quote every path.
Registry
Cross-project checks read ~/.config/research-superpowers/projects (one
project root per line, # comments). The hook auto-registers the project
each session starts in, so the registry fills itself through normal use; edit
the file to add projects you never open with Claude Code, or to remove retired
ones.
Red flags
| Thought | Reality |
|---|---|
| "Merge drift found — I'll just run merge-bibs with --out now" | No. --report-only first: FACTUAL conflicts (wrong DOI, wrong year) need a human verdict before anything writes to the shared master. |
| "The report is empty, so the check must be broken" | Silence IS the report. Nothing changed since the last look — verify with --force --human if in doubt. |
| "A collision — I'll rename the key in this project" | A bibkey is a cross-project join key derived from the work's metadata. Fix it with migrate-citekeys.py in EVERY affected project, not ad hoc in one. |
| "I'll OCR/optimize the PDFs right away, it's obviously needed" | Library files sync to every machine and every teammate. Surface the worklist; the user decides when the shared collection gets rewritten. |
示例提示词
帮我检查文献库和知识库里有没有未索引的PDF或关键词没合并的情况。
所属插件
安装该插件会一并获得同领域的 62 个 Skill / MCP。
同插件的其他科研 Skill
- 学术文献获取下载Auto-downloads open-access PDFs for graded sources and writes a manual worklist for paywalled items. Use after literature-review, before ingest-source.
- 单篇文献入库管理Adds one verified PDF to a shared bibliography library, computing its citation key and keywords. Use to register a single document outside the full workflow.
- 数字人文计算方法Surveys computational DH methods: text mining, NLP, corpus linguistics, archive standards, GIS, network analysis, and OCR. Use for an overview of available DH tools.
- 考古地理信息系统分析Runs archaeological GIS analysis with GeoPandas: catchment analysis, viewshed, kernel density, spatial statistics. Use for mapping archaeological site locations.
- 论证结构提取可视化Extracts and visualizes argument structure: Toulmin reconstruction, support/attack graphs, circularity detection. Use to diagram an argument’s logical structure.
- 考古遗物类型学分析Performs artifact analysis: typological classification, ceramic attribute coding, lithic reduction analysis. Use when classifying excavated artifacts statistically.
- 引文与出处核查Checks citations, quotations, page numbers, and bibliography entries for accuracy and source fit. Use before submission to verify source-supported claims.
- 研究选题构思设计Explores research intent, field state, methodology, and ethics, then writes an approved design doc. Use before starting a new research question or chapter.
- 术语译名一致性检查Audits a manuscript for terms, translations, abbreviations, and names whose forms must stay stable. Use when terminology drift could undermine an argument.
- 计算语用学分析Runs computational pragmatics: speech act classification, implicature detection, discourse coherence, politeness analysis. Use for language-use-and-meaning studies.
- 文献综述学术对话构建Turns verified sources into a structured scholarly conversation among positions, not a chronological summary. Use when synthesizing literature into a debate narrative.
- 语料库语言学分析Performs corpus analysis with NLTK/spaCy: collocation, keyword analysis, KWIC concordance, word2vec, diachronic trends. Use for quantitative text-corpus research.
- 数字档案馆资源检索Queries digital archive REST APIs: Europeana, Chronicling America, Internet Archive, HathiTrust, DPLA, OAI-PMH. Use when searching or harvesting heritage metadata.
- 学术手稿章节撰写Drafts a chapter or article section by section from synthesized wiki content, agreeing each section’s argument first. Use to turn stable research synthesis into prose.
- EMI课堂语料转写分析Segments and annotates classroom transcripts, coding language choice and discourse function with anonymised output. Use to quantify classroom talk or translanguaging.
- 人工智能伦理分析Analyzes AI ethics: algorithmic fairness metrics, bias auditing, value alignment, moral philosophy reasoning. Use to evaluate an AI system’s ethical dimensions.
- 研究计划任务执行Executes a ready research plan task by task, gating acquisition before ingest and dispatching analysis. Use after writing-research-plan to run the planned work.
- 研究项目结项清单Runs the final completion checklist: rendering, bibliography, wiki, data, reproducibility, archiving. Use when a manuscript is finalized and ready to publish.
- 形式逻辑自动推理Applies formal logic tools: Z3 SMT solver, modal logic S5, SAT encoding, Lean4 proof verification. Use to formalize or mechanically check a logical argument.
- 研究问题凝练构建Turns a broad topic or intuition into a precise, contestable, researchable question. Use at the start of a project when no defensible question yet exists.
- 历史地理信息系统分析Performs historical GIS work: georeferencing old maps, digitizing boundaries, temporal territory overlays, population interpolation. Use for historical spatial analysis.
- 历史语言学比较分析Analyzes historical linguistics in Python: sound correspondences, cognate detection, phylogenetic trees, Swadesh lists. Use when reconstructing language relationships.
- 历史社会网络分析Builds historical network analyses: correspondence networks, prosopography, temporal community detection, Gephi export. Use to map relationships among historical actors.
- 历史文献OCR识别Transcribes printed and handwritten historical documents with Tesseract/Kraken OCR, confidence filtering, spell correction. Use for digitizing scanned historical text.
常见问题
研究项目漂移状态检测能做什么?
Checks a shared source library and registered projects for drift: un-indexed PDFs, unmerged keywords, bibkey collisions. Use to audit a multi-project research setup。
如何安装研究项目漂移状态检测?
在科搭 Codar 左侧点击「插件」,在「组件」页签搜索「研究项目漂移状态检测」并安装;在 Claude Code 或 Codex 中可以发送本页的安装提示词,或下载 Skill 包后解压到 ~/.claude/skills 或 ~/.codex/skills。
研究项目漂移状态检测需要哪些权限?
该科研 Skill没有声明额外权限;执行具体操作时仍由 Agent 按自身规则请求确认。
研究项目漂移状态检测经过官方审核吗?
是。SpeedSkills 收录的每个版本都会记录内容摘要与权限声明,当前版本已通过安全审核。