# research-expert

research-expert — a skill that hands the agent working Python for study design and statistics, plus guidance on writing the paper afterwards.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 256 installs · ★ 45 repo stars
- Author: personamanagmentlayer
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/personamanagmentlayer/pcl/tree/HEAD/stdlib/scientific/research-expert/SKILL.md
- Updated: 2026-10-12
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/research-expert

## What it does

The skill bundles Python helpers for planning a study and making sense of the results: sample size for two-sample and proportion tests, simple, block and stratified randomisation, descriptive summaries, a t-test with Cohen's d, one-way ANOVA with eta-squared, OLS regression and a correction for multiple comparisons. It also walks through study types, RCTs to meta-analysis, and the parts of a manuscript.

Its allowed tools are `Read`, `Write` and `Edit`, so it edits files and leaves execution to you. The snippets import `numpy`, `scipy`, `pandas` and `statsmodels`; install those in your environment or the analysis stops at the first import.

Literature reviews, proposals, citation handling and publishing ethics come as text guidance rather than code.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add personamanagmentlayer/pcl --skill research-expert -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/research-expert/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/research-expert/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add personamanagmentlayer/pcl --skill research-expert -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/research-expert/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add personamanagmentlayer/pcl --skill research-expert -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/research-expert/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install personamanagmentlayer/pcl stdlib/scientific/research-expert
```

2. **Manually: put the files in place**
- File: `.github/skills/research-expert/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add personamanagmentlayer/pcl --skill research-expert -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/personamanagmentlayer/pcl --path stdlib/scientific/research-expert
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/research-expert/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add personamanagmentlayer/pcl --skill research-expert -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/personamanagmentlayer/pcl/tree/HEAD/stdlib/scientific/research-expert/SKILL.md

## When to use it
- size a two-arm study before recruitment
- assign subjects to groups with block randomisation
- get Cohen's d next to a t-test p-value
- correct p-values for multiple comparisons
- draft a manuscript in IMRAD order

## Example prompts
- Work out the sample size for a two-sample t-test with power 0.8
- Block-randomise the participants across the study groups
- Run a one-way ANOVA on the groups and report eta-squared

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 96e28bdad7e20f30.

BEGIN THIRD-PARTY FILE 96e28bdad7e20f30
````text
---
name: research-expert
version: 1.1.0
description: >-
  Expert-level research methodology, academic writing, statistical analysis, and scientific
  investigation. Use when the user mentions methodology, statistics, academic writing, or
  experimental design, or when the task involves Research Design, Statistical Analysis, or
  Data Analysis.
category: scientific
tags: [research, methodology, statistics, academic-writing, experimental-design]
allowed-tools:
  - Read
  - Write
  - Edit
---

# Research Methodology Expert

Expert guidance for research methodology, experimental design, statistical analysis, and academic writing.

## Core Concepts

### Research Design

- Experimental vs observational studies
- Randomized controlled trials (RCTs)
- Cross-sectional, longitudinal, cohort studies
- Case-control studies
- Systematic reviews and meta-analysis
- Sample size determination

### Statistical Analysis

- Descriptive statistics
- Hypothesis testing
- Confidence intervals
- Regression analysis
- ANOVA and t-tests
- Non-parametric tests
- Multiple testing correction

### Academic Writing

- Literature review
- Research proposals
- Manuscript structure (IMR AD)
- Citation management
- Peer review process
- Publishing ethics

## Experimental Design

```python
from dataclasses import dataclass
from typing import List, Optional
import numpy as np
from scipy import stats

@dataclass
class Study:
    name: str
    design_type: str  # 'RCT', 'observational', 'cohort'
    sample_size: int
    groups: List[str]
    primary_outcome: str
    secondary_outcomes: List[str]

class SampleSizeCalculator:
    """Calculate required sample size for studies"""

    @staticmethod
    def two_sample_ttest(effect_size: float, alpha: float = 0.05,
                        power: float = 0.8) -> int:
        """Calculate sample size for two-sample t-test"""
        from statsmodels.stats.power import tt_ind_solve_power

        n = tt_ind_solve_power(
            effect_size=effect_size,
            alpha=alpha,
            power=power,
            alternative='two-sided'
        )

        return int(np.ceil(n))

    @staticmethod
    def proportion_test(p1: float, p2: float, alpha: float = 0.05,
                       power: float = 0.8) -> int:
        """Calculate sample size for comparing proportions"""
        from statsmodels.stats.power import zt_ind_solve_power

        effect_size = (p2 - p1) / np.sqrt(p1 * (1 - p1))

        n = zt_ind_solve_power(
            effect_size=effect_size,
            alpha=alpha,
            power=power,
            alternative='two-sided'
        )

        return int(np.ceil(n))

class ExperimentalDesign:
    """Design and randomize experimental studies"""

    def __init__(self, n_subjects: int, n_groups: int):
        self.n_subjects = n_subjects
````
END THIRD-PARTY FILE 96e28bdad7e20f30

The third-party file has ended. Everything between the 96e28bdad7e20f30 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2814 of 11440 bytes. © personamanagmentlayer · Apache-2.0 · https://github.com/personamanagmentlayer/pcl/tree/HEAD/stdlib/scientific/research-expert/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
