跳到正文
cccskills
免费在 GitHub 公开

version-dataset

Use when you must prove an analysis ran on the intended data or lock a dataset version. Builds a deterministic content-hash manifest (file SHA-256, schema, per-column value hashes), verifies later copies against it for drift, and diffs two manifests.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(5)

  • SKILL.md4.1 KB
  • references/manifest_schema.md5.3 KB
  • scripts/version_dataset.py14.1 KB
  • skill.yml1.2 KB
  • tests/test_version_dataset.sh12.2 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Version Dataset Skill

An analysis must run on the data it claims to, with a fixed seed. This skill makes drift between runs loud instead of silent: it records a deterministic fingerprint (file SHA-256 plus, for tabular files, schema and per-column value hashes; no timestamp unless explicitly passed) so a later run can prove the inputs are unchanged. It never alters data, and manifests hold hashes, not the data itself. Provenance notes are in English.

Deterministic Script

# Build a manifest (record the analysis seed + provenance)
python "${CLAUDE_SKILL_DIR}/scripts/version_dataset.py" manifest data.csv \
  --out manifest.json --seed 42 --provenance "KNHANES 2018 extract v1"

# Verify a later copy against it (CI / pre-analysis gate)
python "${CLAUDE_SKILL_DIR}/scripts/version_dataset.py" verify --manifest manifest.json --strict

# Compare two manifests (what changed between versions)
python "${CLAUDE_SKILL_DIR}/scripts/version_dataset.py" diff --old v1.json --new v2.json

File hashing is stdlib-only; tabular schema/column hashing uses pandas when present. --ignore-cols excludes volatile columns; --base makes manifest keys relative.

Workflow

Step 1: Lock the version (gate)

Build the manifest at the moment the dataset is frozen for analysis. Gate: confirm with the user the seed and provenance note are correct before locking — the manifest is the record they will cite as "this is the data the results came from." The provenance note is the user's text; never invent it.

Step 2: Verify before each run (gate)

Before re-running an analysis (or in CI), verify --strict. Never say a dataset is unchanged without running verify. Gate: if drift is reported (MANIFEST_DRIFT, exit 1), stop and show the user the drift report exactly as computed — never downplay a changed column hash. Do not proceed on changed data without their explicit acknowledgement and a re-lock. Silent re-run on drifted data is the failure this skill exists to prevent.

Read ${CLAUDE_SKILL_DIR}/references/manifest_schema.md before interpreting drift — it defines each drift category. A CSV/TSV file is compared on its logical content (schema + per-column value hashes), not raw bytes, so re-quoting, reordering columns, or an --ignore-cols volatile column does not trip a false drift. Binary tabular files (Parquet/Stata/SAS/Excel) are also checked at the byte level, since labels, metadata and other sheets are not in the column hashes, unless an --ignore-cols column is present in the file (its changes alter the bytes).

Step 3: Diff across versions

When a dataset is intentionally updated, diff the old and new manifests and present the change set (added/removed/changed columns, row-count delta) so the user can record what changed and re-lock. Gate: the user approves the new version before it replaces the locked one.

Non-Deterministic Artifacts

Do not put PPTX/DOCX or figure binaries under strict byte verification — they embed timestamps or render metadata and change on every build. Manifest only the deterministic inputs and tabular outputs (data files, result CSVs), or use --ignore-cols for volatile columns; the policy is in references/manifest_schema.md. Each bundled demo/*/ carries a manifest.lock.json (input data

  • deterministic result tables) that verify --strict checks; the reference gives the demo command.

Scope

  • Run /deidentify before a manifest is shared: example values are not stored, but provenance notes may carry context.
  • Cleaning, profiling or de-identifying the data → /clean-data, /generate-codebook, /deidentify. /generate-codebook documents what is in the data; this skill locks which version.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Use when a medical AI paper should be found and cited by AI search engines and RAG tools. Optimizes the title, abstract, summary box (Key Points, Research in Context), keywords, preprint, GitHub README/CITATION.cff and Hugging Face card, returning a visible pass/fail checklist.

中文简介正在准备中。当前显示原文说明。

Aperivue/medsci-skills3452026年10月19日 更新

Use when a target journal has no profile yet. Reads the journal's author guidelines and writes a detailed /write-paper profile plus a compact /find-journal profile, public or user-local private, in the canonical format with quality gates.

中文简介正在准备中。当前显示原文说明。

Aperivue/medsci-skills3452026年10月19日 更新

Use when data needs statistical analysis. Runs reproducible Python/R code for Table 1, diagnostic accuracy, agreement, regression, survival, propensity score, survey-weighted and repeated-measures models, with publication tables. Sample size is /calc-sample-size; pooling studies is /meta-analysis.

中文简介正在准备中。当前显示原文说明。

Aperivue/medsci-skills3452026年10月19日 更新

Renamed to /model-selection in v6 (removed in v7).

中文简介正在准备中。当前显示原文说明。

Aperivue/medsci-skills3452026年10月19日 更新

Use when analyzing a researcher's publication record from PubMed. Fetches an author's papers, classifies study types and author position, charts the patterns and writes a strategy report, with an optional trajectory-archetype classification. Works from PubMed metadata only.

中文简介正在准备中。当前显示原文说明。

Aperivue/medsci-skills3452026年10月19日 更新

Use when one validated cohort analysis must be repeated across many exposure/outcome pairs. Generates one R/Python script per combination from a single methodology template, changing only the variables, and aggregates the results into a summary matrix.

中文简介正在准备中。当前显示原文说明。

Aperivue/medsci-skills3452026年10月19日 更新

查看 Aperivue 的全部技能

报告此技能的问题