Clinic research design

From aipoch/medical-research-skills · View interactive version

Clinic research design is an AI agent skill from the GitHub repository aipoch/medical-research-skills. Generates a structured prompt framework for clinical study protocols. Supports Diagnostic, Efficacy, Etiology, and Prognosis studies. Calculates sample size and provides logic guides for LLMs.

How to use this skill

Skill file

Source: https://github.com/aipoch/medical-research-skills

When to Use

Key Features

Dependencies

Example Usage

cd "20260316/scientific-skills/Protocol Design/clinic-research-design"
python -m py_compile scripts/main.py
python scripts/main.py --help

Example run plan:

  1. Confirm the user input, output path, and any required config values.
  2. Edit the in-file CONFIG block or documented parameters if the script uses fixed settings.
  3. Run python scripts/main.py with the validated inputs.
  4. Review the generated output and return the final artifact with any assumptions called out.

Implementation Details

Validation Shortcut

Run this minimal command first to verify the supported execution path:

python scripts/main.py --help

Clinic Research Design (Agentic Version)

This skill serves as a Logic & Structure Engine for AI Agents. Instead of outputting a finished text document, it generates a Structured Prompt / Writing Guide.

An Agent (like a specialized medical writer bot) should call this skill to get the "Skeleton" and "Logic", and then use its own LLM capabilities to "Flesh out" the content based on the detailed instructions provided in the output.

Capabilities

  1. Logic Structuring: Automatically selects the correct protocol template (e.g., STARD for diagnostics, SPIRIT for trials) based on input.
  2. Calculation: Performs deterministic sample size calculations (which LLMs are bad at).
  3. Prompt Engineering: Generates context-aware instructions for each section (Introduction, Methods, Stats) tailored to the specific P/I/C/O.

Usage for Agents

When an Agent receives a request like "Write a protocol for a diabetes drug trial", it should:

  1. Call this skill:

```bash

python scripts/main.py --type efficacy --P "Type 2 Diabetes" --I "Metformin" --C "Placebo" --O "HbA1c" --study_design "RCT"

```

  1. Read the Output: The output file (e.g., output/protocol.md) will contain sections like:

> [LLM Instruction]: Write a 3-4 paragraph introduction. Discuss gaps in understanding risk factors for...

  1. Execute Instructions: The Agent should then read these instructions and generate the final, polished content for the user.

Arguments

Output Format

The output is a Markdown file containing:

When Not to Use

Required Inputs

Recommended Workflow

  1. Validate the request against the skill boundary and confirm all required inputs are present.
  2. Select the documented execution path and prefer the simplest supported command or procedure.
  3. Produce the expected output using the documented file format, schema, or narrative structure.
  4. Run a final validation pass for completeness, consistency, and safety before returning the result.

Output Contract

Validation and Safety Rules

Failure Handling

Input Validation

This skill accepts requests that match the documented purpose of clinic-research-design and include enough context to complete the workflow safely.

Do not continue the workflow when the request is out of scope, missing a critical input, or would require unsupported assumptions. Instead respond:

clinic-research-design only handles its documented workflow. Please provide the missing required inputs or switch to a more suitable skill.

Quick Validation

Run this minimal verification path before full execution when possible:

python scripts/main.py --help

Expected output format:

Result file: clinic_research_design_result.md
Validation summary: PASS/FAIL with brief notes
Assumptions: explicit list if any

Deterministic Output Rules

Completion Checklist

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.