empirical-integrity
БесплатноБез исполняемых скриптовНе проверенUse when writing or editing a manuscript (.qmd, .Rmd, .ipynb, .tex, .md) that states numbers, statistics, tables, test results, or methodology facts (search…
Об этом скилле
Empirical integrity
Bootstrap (first run in this project)
Before applying the rules below, check that this skill's regression tests are installed in the project:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/setup/check_project_scaffold.py" \
scripts/test_common.py scripts/test_empirical_integrity.py
If the output lists missing files, install them:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/setup/install_templates.py" \
test_common.py:scripts/test_common.py \
test_empirical_integrity.py:scripts/test_empirical_integrity.py
Then tell the user what was installed and flag that the top of
scripts/test_empirical_integrity.py has project-specific settings
(paths to manuscript / stats / figures, plus the FORBIDDEN_LITERALS
tuple) they should review.
Next, check whether the project's .claude/settings.json has the
analysis/results/ deny rules that protect manuscript_stats.json
from hand-editing:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/setup/check_deny_rules.py" \
"Write(//**/analysis/results/**)" "Edit(//**/analysis/results/**)"
If the output lists missing rules, add them via the shipped helper:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/setup/add_deny_rules.py" \
"Write(//**/analysis/results/manuscript_stats.json)" \
"Edit(//**/analysis/results/manuscript_stats.json)" \
"Write(//**/analysis/results/**)" \
"Edit(//**/analysis/results/**)"
The helper is idempotent (no-ops for rules already present) and
creates .claude/settings.json if it doesn't exist.
These rules block the agent's Write and Edit tools from touching
anything under analysis/results/ (including manuscript_stats.json
and coded_papers.csv). Regeneration via
Bash(python3 analysis/manuscript_stats.py) is unaffected because the
deny rules target only Write/Edit, not Bash.
If the project has no CLAUDE.md yet, suggest using
${CLAUDE_PLUGIN_ROOT}/templates/manuscript_claude_md.md as a starting
point — but don't write it without the user's say-so. CLAUDE.md is
user-owned.
Core rule
Never write a number, table, statistic, percentage, test result, or quantitative claim that does not come directly from a script reading the underlying data. Do not round, adjust, or approximate data values.
This rule extends to methodological facts: search dates, database
names, model names, keyword strings, year bounds, screening counts, and
any other statement that describes how the data was produced. A search
date typed as "October 2025" is just as much a hallucination risk as a
p-value typed as "0.03". Methodological facts must come from a metadata
file written by the pipeline (e.g. search_metadata.json) and reach
the manuscript through the stats dictionary — never typed in prose,
never read directly from the raw metadata file. See Inline
expressions below for the pattern.
The authoritative pipeline
Every quantitative claim in a research report must trace back through this chain:
analysis/raw/ → analysis scripts → analysis/results/ → manuscript
(code chunks or inline expressions)
analysis/results/ is the single source of truth for numbers cited
in the manuscript. The directory is written exclusively by analysis
scripts — typically several of them, each owning a slice of the output
(e.g. model-fitting, descriptive statistics, figures, and the
manuscript_stats.py flat-dict builder). Analysis scripts routinely
produce far more files than the manuscript cites — exploratory
outputs, supplementary tables, diagnostic plots. That is fine. The
subset that ends up in the manuscript is whatever the code chunks
and inline expressions actually read; the rest lives in
analysis/results/ as a record of the analysis but has no special
status until a code chunk or inline expression pulls from it.
The manuscript itself reads from these files — it never reads raw data directly, never modifies them, and never produces numbers of its own.
Project-specific paths: Check CLAUDE.md. If the project defines different locations, use those. Default conventions: raw data in
analysis/raw/, authoritative outputs inanalysis/results/, analysis scripts inanalysis/, stats-dictionary builder atanalysis/manuscript_stats.py.
Two acceptable ways to put numbers in the manuscript
1. Code chunks that render tables from authoritative results
A manuscript code chunk can render a table two ways, both acceptable
as long as every value traces back to analysis/results/ and the
chunk contains presentation logic only, never analysis logic (no
model fitting, no recomputation, no data transformation).
Pre-baked CSV or markdown. The analysis script writes a ready-to- print CSV or markdown file, and the chunk reads and emits it. Robust because the manuscript has no dependency on analysis-time packages beyond a minimal reader; portable across render environments; plain tex
Установить empirical-integrity в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл empirical-integrity?
Use when writing or editing a manuscript (.qmd, .Rmd, .ipynb, .tex, .md) that states numbers, statistics, tables, test results, or methodology facts (search dates, model names, keyword strings) — every such value must come from a pipeline-generated file via an inline expression. Trigger phrases "add the sample size", "report the results", "update the table", "insert this statistic". Do NOT use for citation claims — use `grounded-citations` / `fact-check`.
Как установить скилл empirical-integrity?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл empirical-integrity запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic