Agent skill

Preregister

by pedrohcgs in pedrohcgs/claude-code-my-workflow

Draft a structured preregistration document (OSF, AsPredicted, or AEA RCT Registry style) from a research spec or free-form study description.

MITAuto-check passedResearch & Science

Install Preregister

skills CLI
$ npx skills add pedrohcgs/claude-code-my-workflow --skill preregister -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install pedrohcgs/claude-code-my-workflow preregister --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/pedrohcgs/claude-code-my-workflow.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/preregister .claude/skills/preregister && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
preregister
GitHub stars
1.7k
Token cost
~3.1k tokens
SKILL.md length
1,376 words
Files
1
Skills in repo
59
Repo updated
First seen
Licence
MIT

At a glance

Draft a structured preregistration document (OSF, AsPredicted, or AEA RCT Registry style) from a research spec or free-form study description.

  • Works in 6 steps: Read inputs → Pick the style → Generate the document → …
  • User says preregister
  • SKILL.md covers Why preregister, When to use, When NOT to use and Workflow, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Preregister is an agent skill from pedrohcgs/claude-code-my-workflow. Draft a structured preregistration document (OSF, AsPredicted, or AEA RCT Registry style) from a research spec or free-form study description. Output is a Markdown file with hypotheses, design, sampling plan, analysis plan, exclusions, and inference criteria — annotated with MUST / SHOULD / MAY clarity flags. Use when user says "preregister", "draft a preregistration", "OSF preregistration", "AsPredicted", "AEA RCT registry", "PAP", "preanalysis plan", or before launching an experiment / data collection /…

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Research & Science. The repository describes itself as: A ready-to-fork Claude Code template for academics using LaTeX/Beamer + R. Multi-agent review, quality gates, adversarial QA, and replication protocols. The licence is MIT.

When your agent uses it

  • User says preregister
  • Draft a preregistration
  • OSF preregistration
  • AEA RCT registry

Example prompts

  • “preregister”
  • “draft a preregistration”
  • “OSF preregistration”
  • “/preregister”

Requirements

  • Pre-approved tools (allowed-tools): Read, Write, Agent, Task

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Read inputs
  2. Pick the style
  3. Generate the document
  4. Cross-checks (before writing to disk)
  5. Post-flight verification
  6. Output

What it can do on your machine

Read from SKILL.md and the folder at commit ae72617. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Agent
    • Task

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Preregister loads about 3.1k tokens when it runs. Until then it costs about 170 tokens; SKILL.md has 1,376 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~170
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from pedrohcgs/claude-code-my-workflow at commit ae72617, republished under its MIT licence (© pedrohcgs). 1,376 words, ~3,069 tokens.

Download SKILL.mdSave it as .claude/skills/preregister/SKILL.md (or your agent's skills folder).
name
preregister
description
Draft a structured preregistration document (OSF, AsPredicted, or AEA RCT Registry style) from a research spec or free-form study description. Output is a Markdown file with hypotheses, design, sampling plan, analysis plan, exclusions, and inference criteria — annotated with MUST / SHOULD / MAY clarity flags. Use when user says "preregister", "draft a preregistration", "OSF preregistration", "AsPredicted", "AEA RCT registry", "PAP", "preanalysis plan", or before launching an experiment / data collection / analysis on data the analyst has not yet seen. NOT a registry submission tool — produces a document the user uploads to OSF / AsPredicted / AEA themselves.
allowed-tools
Read, Write, Agent, Task
argument-hint
[--style osf|aspredicted|aea-rct] [--input <spec-or-description>] [--no-verify]
disable-model-invocation
true
metadata.author
Claude Code Academic Workflow
metadata.version
1.0.0

/preregister — Preregistration Document Generator

Produce a registry-ready preregistration document. The user uploads it to a real registry (OSF / AsPredicted / AEA RCT Registry) — this skill writes the prose and structure, it does not submit anywhere.

Why preregister

Preregistration is a written commitment to your hypotheses, design, and analysis plan before you see the data (or, for observational analyses, before you analyse the realised outcome). It separates confirmatory tests from exploratory tests and protects you from p-hacking, HARKing, and forking-paths. Different fields use different registries:

  • Political science, psychology, broad social science → OSF (osf.io/registries) is the default. AsPredicted (aspredicted.org) is a popular short form for experiments.
  • Economics field experiments → AEA RCT Registry (socialscienceregistry.org) is mandatory for AEA journal submission since 2018.
  • Public health / clinical trials → ClinicalTrials.gov or ISRCTN (NOT covered by this skill — use the trial-registry's own template).

When to use

  • Before launching an experiment (lab, field, or survey).
  • Before collecting observational data on a target population for a specific RQ.
  • Before analysing data you have access to but haven't yet examined for the focal hypothesis.
  • During R&R when a referee asks for a written preanalysis plan.

When NOT to use

  • After you've seen the realised outcomes and want to "preregister retrospectively" — that is not preregistration. The skill will refuse if the input description includes results.
  • For exploratory analyses — those don't need preregistration; they need transparent labelling.
  • For meta-analyses — use PROSPERO directly, not this template.

Workflow

PHASE 1 — Read inputs

Two input modes:

  1. --input <path> — a research spec produced by /interview-me (saved under quality_reports/specs/) or any structured Markdown file. Read the spec and extract: research question, hypotheses (directional!), data source, design, sample, analysis approach. If the spec records a paper type (/interview-me writes it on a **Paper type:** line, e.g. survey-experiment), use it to bias the style choice.
  2. No --input — prompt the user for a 1–3 paragraph description of the study, then proceed. If the description omits a directional hypothesis, ask once. Do not fabricate.

Refusal conditions (must be checked before any drafting):

  • Description contains realised results ("we found", "the estimate is", "p =") → refuse with: "Preregistration is forward-looking; this description includes results. Did you mean /respond-to-referees or to write a methods section?"
  • Description has no testable hypothesis at all (pure exploratory framing) → flag and ask whether the user wants the exploratory analysis version of the OSF template (still useful, but not a registered confirmatory test).
PHASE 2 — Pick the style

Default per field (used when --style is not given):

Field signalDefault style
**Paper type:** survey-experiment or political-science / psychology contextosf
Field experiment in econ / labelled "RCT" / IRB-approved randomised interventionaea-rct
9-question quick-form ask, lab psych experiment, time-pressureaspredicted
Anything elseosf

User can override with --style osf|aspredicted|aea-rct.

PHASE 3 — Generate the document

Read templates/preregistration-template.md. The template has three style sections; only use the section matching the chosen style (don't merge — registries differ).

Common to all styles, the document MUST include:

  • Title and authors.
  • Date and version.
  • Pointer back to the source spec (if --input was given) so traceability survives.

Style-specific sections:

  • osf — Hypotheses (directional, numbered) · Design · Sampling Plan · Variables · Analysis Plan · Inference Criteria · Data Exclusions · Missing Data Handling · Exploratory Analyses (clearly labelled as such) · Other.
  • aspredicted — 9 numbered fields per the AsPredicted form: (1) data collection status, (2) hypothesis, (3) key dependent variable, (4) conditions, (5) analyses, (6) outliers/exclusions, (7) sample size + stopping rule, (8) anything else, (9) name (study not paper).
  • aea-rct — Intervention · Outcomes (primary, secondary) · Primary hypotheses · Sample (target N, eligibility, randomization unit, randomization method) · IRB approval · Trial dates · Power calc · Pre-analysis plan attachment · Status (not yet on the air / ongoing / completed).

Annotate each section with one of:

  • MUST — registry requires this; the document cannot be submitted without it.
  • SHOULD — strongly recommended; reviewers expect it.
  • MAY — optional; include if relevant.

Re-use the MUST/SHOULD/MAY framework from templates/requirements-spec.md. For each MUST that the input did not supply, write [CLARIFY: <specific question>] rather than fabricating content.

PHASE 4 — Cross-checks (before writing to disk)

Refuse to mark the document "ready" if any of these fails:

  • Hypothesis directionality. Each hypothesis must contain a direction ("higher than", "increases", "negatively predicts", "no effect" is acceptable as a directional claim under equivalence-testing). Reject "is associated with" without a sign.
  • Estimator named. Analysis plan names a specific estimator (OLS, logit, fixest::feols, lme4::lmer, ATT difference-in-means …) and a primary outcome variable. "Regression" alone is insufficient.
  • Sample plan numeric. Target N, stopping rule, or power-calc target appear. "As many as possible" is not a sample plan. For RCTs and prospective designs, follow /power-analysis's SKILL.md (read it — the skill is user-invoked only, so it cannot be called from here) to produce the MDE / required-N and a ready-to-paste power paragraph for this field.
  • Exclusions ex ante. Outlier and exclusion rules are stated before the data is seen ("we will exclude observations with completion time < 1 minute"). Vague "we'll deal with outliers" fails.
  • Internal consistency. If the design is randomised, the unit of randomisation matches the unit of analysis OR the analysis plan addresses clustering. If observational, identification strategy is stated.

For each failure, the document gets a [CLARIFY: …] placeholder; the document is written to disk but flagged in the output summary as "INCOMPLETE — N MUST items unresolved".

Show full SKILL.md (521 more words)Show less
PHASE 5 — Post-flight verification

If the document cites prior literature in the rationale section (e.g., "Building on Hainmueller et al. 2014, we expect …"), invoke /verify-claims via the Agent tool to fact-check those citations. Pass the draft path and a list of explicit citations. The claim-verifier agent (fresh context, never sees the draft) returns PASS / PARTIAL / FAIL per citation. Surface any FAIL/PARTIAL in the output summary.

Skip post-flight if:

  • No prior-literature citations in the document.
  • User passes --no-verify (flag inherited from /lit-review and /research-ideation post-flight).
PHASE 6 — Output

Write to quality_reports/preregistrations/YYYY-MM-DD_<slug>.md (gitignored — preregistration is meant to be timestamped and uploaded externally, not committed alongside code).

Print to chat:

✓ Preregistration draft saved: quality_reports/preregistrations/<file>.md
  Style: <osf|aspredicted|aea-rct>
  Sections: <count> total — <complete> complete, <clarify> with [CLARIFY:] placeholders
  Citations verified: <PASS>/<PARTIAL>/<FAIL>  (or "no citations to verify")
  Next: review the [CLARIFY:] placeholders, fill in, then upload to <registry-url>

Include the registry URL: OSF → osf.io/registries, AsPredicted → aspredicted.org, AEA RCT → socialscienceregistry.org.

Cross-references

  • templates/preregistration-template.md — the three style templates this skill consumes.
  • templates/requirements-spec.md — MUST/SHOULD/MAY annotation language re-used here.
  • .claude/skills/interview-me/SKILL.md — produces the spec this skill consumes via --input.
  • .claude/skills/power-analysis/SKILL.md — followed (not invoked) to supply the MDE / required-N + power paragraph for the sample-plan field (RCTs).
  • .claude/skills/verify-claims/SKILL.md — Phase 5 invokes this for citation post-flight.
  • .claude/references/discipline-cards.md — field defaults that drive --style selection.
  • .claude/rules/replication-protocol.md — preregistration is the forward commitment; replication-protocol is the backward contract.

Examples

Example 1 — Poli-sci survey experiment from a spec

User says: "Preregister this study" (with --input quality_reports/specs/2026-04-15_priming-effects.md) Actions:

  1. Read spec; **Paper type:** survey-experiment → default style osf.
  2. Extract 2 directional hypotheses, MTurk N=1,200, OLS with treatment dummies.
  3. Generate OSF document, all MUST sections filled, 1 MAY left blank.
  4. No prior-lit citations beyond the spec — skip post-flight. Result: Saved to quality_reports/preregistrations/2026-04-15_priming-effects.md. User uploads to OSF.
Example 2 — Econ field experiment, AEA RCT Registry

User says: "Draft an AEA RCT preregistration for the cash-transfer pilot" (with --style aea-rct --input quality_reports/specs/2026-03-10_ct-pilot.md) Actions:

  1. Read spec; randomization unit = village, primary outcome = consumption.
  2. Generate AEA RCT fields. IRB number missing in spec → [CLARIFY: IRB approval number].
  3. Cross-check: estimator (cluster-robust OLS), primary outcome stated, exclusion rule (intent-to-treat) stated. Pass.
  4. No prior-lit cites — skip post-flight. Result: Document written. Output summary flags 1 [CLARIFY:] item to fill before AEA submission.
Example 3 — Free-form description, AsPredicted short form

User says: "Preregister my next priming experiment, AsPredicted style" (no --input) Actions:

  1. Prompt for the 1–3 paragraph description.
  2. User supplies a paragraph; hypothesis lacks direction → ask once: "Direction?"
  3. User clarifies; populate the 9 AsPredicted fields.
  4. Sample-size stopping rule omitted → [CLARIFY: target N or stopping rule]. Result: Short form written; one MUST [CLARIFY:] flagged; user told to fill before pasting into AsPredicted.

Troubleshooting

"Description contains results" — by design. Move results into a methods + results write-up; preregistration is forward-looking.

Citation post-flight fails with FAIL — claim-verifier could not find a cited paper in WebSearch / corpus. Either the citation is real but the verifier missed it (common with very recent / paywalled work — cite explicitly with URL), or the citation is hallucinated. Inspect manually before upload.

Different registries asking for different things — use the registry's own template if this skill's mapping is too coarse. The three styles cover ~90% of social-science preregistrations; edge cases (PROSPERO, ClinicalTrials.gov, ISRCTN) need the registry's native form.

Output dir doesn't exist — quality_reports/preregistrations/.gitkeep should exist on a fresh fork; if missing, the skill will create the directory before writing.

© pedrohcgs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/preregister of pedrohcgs/claude-code-my-workflow.

Open the folder on GitHubat commit ae72617

Compare with similar skills

Preregister next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Preregister compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Preregister this skillpedrohcgs/claude-code-my-workflow1.7k—~3.1kAutomated safety check: PassMIT
Academic Paper Writing PipelineImbad0202/academic-research-skills51k—~16kAutomated safety check: PassCustom licence
Scientific Venue Templatesdavila7/claude-code-templates32k9 repos~5.1kAutomated safety check: NotesMIT
Horizontal-Vertical Deep ResearchKKKKhazix/khazix-skills21k—~2.1kAutomated safety check: PassMIT
Econ Writehanlulong/econ-writing-skill6472 repos~14kAutomated safety check: PassMIT
Math Modeling Competition WorkflowXiaoMaColtAI/math-modeling-skill1.9k—~1.2kAutomated safety check: PassNone

Similar skills

  • Academic Paper Writing Pipeline

    Imbad0202/academic-research-skills

    Runs a 12-agent pipeline that plans, drafts, cites, reviews and formats academic papers, with modes for revision, rebuttals, abstracts and citation checks.

    51k GitHub stars~16k tokensUpdated today
    Research & ScienceAuto-check passed
  • Scientific Venue Templates

    davila7/claude-code-templates

    Supplies LaTeX templates and formatting rules for journals, conferences, posters, and grant proposals, then can check a draft against them.

    32k GitHub starsUsed in 9 repos~5.1k tokens
    Research & ScienceAuto-check: notes
  • Horizontal-Vertical Deep Research

    KKKKhazix/khazix-skills

    Runs a two-axis deep research method on a product, company, concept or person: its full history over time, compared with peers today, delivered as a typeset PDF report.

    21k GitHub stars~2.1k tokensUpdated 8 days ago
    Research & ScienceAuto-check passed
  • Econ Write

    hanlulong/econ-writing-skill

    Expert economics paper writing assistant synthesizing advice from 50+ top guides by Cochrane, McCloskey, Shapiro, Head, Bellemare, Goldin, Glaeser, Kremer, and other leading economists.

    647 GitHub starsUsed in 2 repos~14k tokens
    Research & ScienceAuto-check passed
  • Math Modeling Competition Workflow

    XiaoMaColtAI/math-modeling-skill

    Three-role workflow for math modeling contests: problem analysis, code and results, then a paper, with independent subagent checks at each stage gate.

    1.9k GitHub stars~1.2k tokensUpdated today
    Research & ScienceAuto-check passed
  • NSFC Grant Rationale Writer

    huangwb8/ChineseResearchLaTeX

    Writes, restructures, reviews and polishes the rationale section of NSFC research grant applications in LaTeX, with backups and a diff before every write.

    2.9k GitHub stars~945 tokensUpdated 5 days ago
    Research & ScienceAuto-check passed

More from pedrohcgs/claude-code-my-workflow

All 59 skills in this repo
  • Devils Advocate

    pedrohcgs/claude-code-my-workflow

    Adversarial 5-7 question challenge to a deck's pedagogical choices — ordering, prerequisites, cognitive load, motivation.

    1.7k GitHub starsUsed in 2 repos~641 tokens
    Auto-check passed
  • Vaccinate

    pedrohcgs/claude-code-my-workflow

    Qualify a check before it is allowed to clear anything — prove it can detect the failure it is meant to catch.

    1.7k GitHub stars~2.1k tokensUpdated 11 days ago
    Auto-check: notes
  • Compile Latex

    pedrohcgs/claude-code-my-workflow

    Compile a Beamer LaTeX slide deck with XeLaTeX (3 passes + bibtex).

    1.7k GitHub starsUsed in 1 repo~492 tokens
    Auto-check: notes
  • Context Status

    pedrohcgs/claude-code-my-workflow

    Show current context status and session health. An agent skill from pedrohcgs/claude-code-my-workflow.

    1.7k GitHub starsUsed in 1 repo~613 tokens
    Auto-check: notes
  • Capture Environment

    pedrohcgs/claude-code-my-workflow

    Snapshot the computational environment for a replication package — detects the analysis stack (R / Stata / Python) and emits the right lockfiles (renv.lock + sessionInfo.txt, requirements.txt /…

    1.7k GitHub stars~2.8k tokensUpdated 11 days ago
    Auto-check: notes
  • Checkpoint

    pedrohcgs/claude-code-my-workflow

    Save a structured state snapshot before stopping or handing off.

    1.7k GitHub stars~2.8k tokensUpdated 11 days ago
    Auto-check: notes

Questions about Preregister

What does Preregister do?

Draft a structured preregistration document (OSF, AsPredicted, or AEA RCT Registry style) from a research spec or free-form study description. Preregister is an agent skill from pedrohcgs/claude-code-my-workflow. Draft a structured preregistration document (OSF, AsPredicted, or AEA RCT Registry style) from a research spec or free-form study description.

When should I use Preregister?

Preregister fits situations like: user says preregister; draft a preregistration; OSF preregistration; AEA RCT registry.

How do I install Preregister in Claude Code?

Run `npx skills add pedrohcgs/claude-code-my-workflow --skill preregister -a claude-code`. Or copy the skill folder (.claude/skills/preregister in pedrohcgs/claude-code-my-workflow) into .claude/skills/preregister in your project. Claude Code loads it when a task matches its description.

How do I install Preregister in Codex?

Run `npx skills add pedrohcgs/claude-code-my-workflow --skill preregister -a codex`. Or copy the skill folder (.claude/skills/preregister in pedrohcgs/claude-code-my-workflow) into .agents/skills/preregister in your project. Codex loads it when a task matches its description.

Can I use Preregister in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pedrohcgs/claude-code-my-workflow --skill preregister -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/preregister, .gemini/skills/preregister, .github/skills/preregister and .opencode/skills/preregister in your project.

What does Preregister need to run?

SKILL.md names no scripts, command-line tools or credentials: Preregister is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Write, Agent, Task.

Does Preregister access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Preregister safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Preregister use?

Preregister is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Preregister use?

About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Preregister?

Skills that share tags, products or a category with Preregister: Academic Paper Writing Pipeline (Imbad0202/academic-research-skills, 51k stars), Scientific Venue Templates (davila7/claude-code-templates, 32k stars), Horizontal-Vertical Deep Research (KKKKhazix/khazix-skills, 21k stars) and Econ Write (hanlulong/econ-writing-skill, 647 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Preregister?

pedrohcgs (a GitHub user) maintains it in pedrohcgs/claude-code-my-workflow, which has 1,653 GitHub stars. The repository holds 59 skills in this directory. The repository was last updated on September 27, 2026.

Source: pedrohcgs/claude-code-my-workflow on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.