consensus-interpret
БесплатноЗапускает вложенные скриптыНе проверенLoad when biologically interpreting a finished verified consensus run (consensus-domains / sc-consensus-clustering) — inline DE, marker-DB lookup, and LLM…
от lilinji★ 18 звёзд на GitHubОб этом скилле
consensus-interpret
When to use
The user has just finished a verified typed consensus run
(consensus-domains or sc-consensus-clustering) and wants the next
manual step (read cross_method_nmi.csv → run spatial-de →
cross-reference markers → name cell types → decide downstream skill) done
automatically with falsifiable evidence binding every LLM claim.
This skill does NOT replace the typed run. It is a strictly downstream
consumer: it reads <typed_run_dir>/{plan.json, consensus_labels.tsv, member_scores.csv, cross_method_nmi.csv} plus the original adata, and
writes its output to a different directory under
analysis://interpreted/<typed_run_id>. The verified-vs-exploratory
boundary established by ADR 0010 is preserved.
Skip when:
- The typed run did not produce
consensus_labels.tsv(i.e.consensus-domainsexited non-zero — fix the typed run first). - You are looking for a generic
query → skilldispatcher; useorchestratorfor that (forward direction). - You want to refine the consensus itself based on LLM judgment; that is explicitly forbidden by §11.4 "LLM never participates in statistical merging" and would be rejected by this skill's T3 invariants.
Inputs & Outputs
Inputs
- Input kinds:
directory - File types:
.json
Outputs
interpreted_report.mdinterpreted_assignments.jsonde_per_cluster.csvcontradiction_regions.csvaudit.json
Flow
1. Preflight (T1 — fail-fast if any fail)
├─ Load plan.json from --input; assert schema_version + typed run integrity
├─ Locate adata at plan.json.input_path (or --adata override); check exists
├─ Load consensus_labels.tsv; assert observation column ⊆ adata.obs.index
├─ Resolve marker DB:
│ --markers <path> if given;
│ else bundled `data/markers/panglaodb_<tissue>.tsv` for --tissue;
│ else exit 5 (MarkerDBUnavailable)
└─ If LLM required and unreachable AND --no-llm not set → exit 6 (LLMUnavailable)
2. Per-cluster differential expression (deterministic, scanpy)
└─ scanpy.tl.rank_genes_groups(adata, groupby=consensus_<operator>, method='wilcoxon')
→ de_per_cluster.csv with top-K markers per cluster (K=20 default)
3. Marker → cell-type lookup (deterministic, pre-LLM)
└─ For each cluster, compute candidate cell types by ranking DB entries
whose gene appears in the cluster's top-K markers (weighted by db.weight × 1/de_rank).
4. LLM grounded interpretation (γ + β; one call per cluster + one synthesis call)
├─ Prompt template embeds (per cluster):
│ cluster_id, n_cells, top-K DE markers,
│ DB candidate cell types (ranked),
│ member_agreement summary, cross_method_nmi neighbors
├─ LLM must return JSON conforming to interpreted_assignments.json
│ schema; mandatory evidence.markers[] with non-empty
│ {gene, db_source, db_celltype}
└─ After all clusters: one synthesis call to produce next_steps[]
with mandatory evidence_refs[] (capped at top-3 by priority)
5. Invariant enforcement (T3 — fail-fast if violated)
├─ Every cluster.evidence.markers != [] → else exit 7
├─ Every next_steps[*].evidence_refs != [] → else exit 7
└─ Banner present and matches one of two allowed values → else exit 7
6. Coverage check (T2 — escalate to T1 if floor breached)
└─ interpretable_cluster_frac < --coverage-floor → exit 8
7. Artifact writes
├─ interpreted_report.md (banner enforced in format_interpreted_report)
├─ interpreted_assignments.json
├─ de_per_cluster.csv
├─ contradiction_regions.csv
└─ audit.json
Gotchas
- It never refines the consensus. The LLM names cell types and recommends next steps but is forbidden from touching the statistical merge — the T3 invariants reject any attempt (ADR 0012 §11.4). Treat the consensus labels as fixed input.
- Marker citations are mandatory. Every cluster's
evidence.markers[]and every next-step'sevidence_refs[]must be non-empty, or the run exits 7 (InvariantViolation). Ungrounded LLM output is rejected, not silently kept. --no-llmchanges the banner, not just the content. Structural-only mode emits[I-noLLM: ...]and drops all cell-type claims; downstream consumers must branch on the banner, not assume biology is present.- Output lands in a separate namespace. Interpreted artifacts go to
analysis://interpreted/<run_id>, never overwriting the verifiedanalysis://typed/<run_id>evidence base (the ADR 0010 boundary).
Failure modes (per ADR 0012)
| Exit | Name | Meaning |
|---|---|---|
| 0 | success | All clusters interpreted (or low_confidence), invariants intact, no degradation triggered |
| 2 | argparse | CLI error |
| 3 | TypedRunInvalid | plan.json missing / malformed / not from a typed run |
| 4 | AdataMismatch | adata obs index disjoint f |
Установить consensus-interpret в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл consensus-interpret?
Load when biologically interpreting a finished verified consensus run (consensus-domains / sc-consensus-clustering) — inline DE, marker-DB lookup, and LLM cell-type naming with mandatory marker citations + evidence-bound next-step recommendations. Skip when the consensus run failed (fix it first); forward query→skill routing (use orchestrator).
Как установить скилл consensus-interpret?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл consensus-interpret запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic