agentsclimarketplace

Amazing psycoder

Skill soupandpsy/amazing-psycoder-skills/amazing-psycoder

AI skills for psychology experiment programming and data analysis, from task design and code generation to reproducible statistical workflows.

Install
npx -y skills add soupandpsy/amazing-psycoder-skills --skill amazing-psycoder

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

Entry point for the Amazing PsyCoder system. Routes user requests through two mandatory three-skill chains — Experiment: Designer(5-phase design)→Coder→Reviewer, and Analysis: Designer(5-phase progressive)→Coder→Reviewer. Supports PsychoPy, jsPsych, Psychtoolbox (38 paradigms) for experiments; R and Python for data analysis (60 methods + 48 charts). Trigger for 心理学实验、实验代码、PsychoPy实验、编写实验、数据分析、统计分析、analysis plan、生成分析代码、审计实验代码、审计分析代码.

SKILL.md

27.3 KB, as published. Nobody here has run it

Amazing PsyCoder — System Orchestrator

Version

v1.3 — stable, 2026-06-10. Adds analysis pipeline (psy-ana-designer → psy-ana-coder → psy-ana-reviewer).

Purpose

This is the single entry point for the Amazing PsyCoder system. It orchestrates two mandatory sequential chains that convert psychological experiments from idea to audited code, and experimental data from raw files to publication-ready analysis:

  • Experiment Pipeline: psy-exp-designer (5-phase design) → psy-exp-coder (code generation) → psy-exp-reviewer (audit)
  • Analysis Pipeline: psy-ana-designer (5-phase progressive) → psy-ana-coder (R/Python code) → psy-ana-reviewer (audit)

This skill does NOT generate code itself. It routes the user through the correct sequence and enforces that no step may be skipped.

Platforms: Claude Code / Codex / Hermes / OpenClaw — follows the agentskills.io open standard. See PLATFORMS.md for platform-specific installation and tool mapping.

System Architecture

Experiment Pipeline

User describes experiment (English / 中文)
       │
       ▼
┌──────────────────────────────────────┐
│ ① psy-exp-designer      │  Orchestration layer
│   Input: natural language description│  5-phase design workflow
│   Output: config YAML + conditions   │  Design Decision Registry
│   Gates: Gate 1→2→3→4→5             │  Progressive confirmation
└──────────────┬───────────────────────┘
               │ config YAML (internal artifact, not shown to user)
               ▼
┌──────────────────────────────────────┐
│ ② psy-exp-coder            │  Code generation layer
│   Input: config YAML + conditions    │  12-step code template
│   Output: runnable code + README     │  4-layer priority architecture
│   Gate: 9-item post-generation check │  Canonical Code Skeleton
└──────────────┬───────────────────────┘
               │ Runnable experiment code
               ▼
┌──────────────────────────────────────┐
│ ③ psy-exp-reviewer    │  Audit layer (final mandatory gate)
│   Input: code / config / plan        │  5 review modes
│   Output: audit report + readiness   │  Platform-aware checks
│   Gate: 0 Critical + 0 Major         │  Severity grading
└──────────────────────────────────────┘

Analysis Pipeline

User has experiment data + scientific questions
       │
       ▼
┌──────────────────────────────────────┐
│ ④ psy-ana-designer      │  Analysis design layer
│   Input: experiment config + questions│  5-phase progressive confirmation
│   Output: analysis config YAML        │  12-dimension method comparison
│   Gates: Gate 1→2→3→4→5             │  60 methods + 48 charts refs
└──────────────┬───────────────────────┘
               │ analysis config YAML
               ▼
┌──────────────────────────────────────┐
│ ⑤ psy-ana-coder              │  Analysis code generation
│   Input: analysis config YAML        │  12-step script structure
│   Output: analysis.R/.py + report    │  R (tidyverse/lme4/ggplot2)
│   Gate: 10-item Quality Gate         │  Python (pandas/statsmodels/seaborn)
└──────────────┬───────────────────────┘
               │ Runnable analysis script
               ▼
┌──────────────────────────────────────┐
│ ⑥ psy-ana-reviewer      │  Analysis audit layer
│   Input: analysis script + data      │  4 review modes
│   Output: audit report + readiness   │  Statistical correctness checks
│   Gate: 0 Critical + 0 Major         │  Reproducibility scoring
└──────────────────────────────────────┘

Two independent pipelines. Seven skills total (1 orchestrator + 6 sub-skills). Same rigorous standard. Experiment: Designer→Coder→Reviewer. Analysis: Designer→Coder→Reviewer.

All steps in both pipelines are mandatory — none can be skipped. Experiment: Designer → Coder → Reviewer. Analysis: Designer → Coder → Reviewer. No experiment code is complete without passing reviewer audit. No analysis script is publishable without reproducibility audit.

How to Use This Skill

When a user invokes this skill, analyze their request to determine which pipeline and stage they need. The user's own words tell you where to route them — no forced stage-selection question unless their intent is genuinely ambiguous.

Routing Decision Tree

Route directly based on the user's expressed need:

Analyze the user's request — what do they actually want?
  │
  ├─ 🧪 EXPERIMENT — they want to build/design/code/review an experiment
  │
  │   ├─ "I want to build an experiment" / "我要做一个…实验" / "设计一个…范式"
  │   │    → psy-exp-designer (start Phase 1)
  │   │
  │   ├─ "Generate experiment code from this config" / "用这个config生成实验代码"
  │   │    → User has config → psy-exp-coder
  │   │
  │   ├─ "Generate experiment code" / "生成实验代码"  (no config visible)
  │   │    → "你有实验 config YAML 吗?如果没有,需要先通过 psy-exp-designer 设计实验。"
  │   │       Has config → psy-exp-coder
  │   │       No config → psy-exp-designer
  │   │
  │   ├─ "Review this experiment code" / "审计这个实验" / "实验代码有没有问题"
  │   │    → psy-exp-reviewer
  │   │
  │   └─ "Experiment code error" / "实验代码报错"
  │        → Design error → psy-exp-designer
  │           Code error   → psy-exp-coder
  │
  ├─ 📊 ANALYSIS — they want to design/code/review a data analysis
  │
  │   ├─ "Design my analysis" / "设计分析方案" / "用什么统计方法" / "怎么分析这个数据"
  │   │    → psy-ana-designer (start Phase 1)
  │   │
  │   ├─ "Analyze my data" / "分析我的数据" / "帮我做统计分析"
  │   │    → psy-ana-designer (design before code — never jump straight to coder)
  │   │
  │   ├─ "Generate analysis code from this config" / "用这个analysis config生成代码"
  │   │    → User has analysis_config.yaml → psy-ana-coder
  │   │
  │   ├─ "Generate analysis code" / "生成分析代码"  (no config visible)
  │   │    → "你有 analysis_config.yaml 吗?如果没有,需要先通过 psy-ana-designer 设计分析方案。"
  │   │       Has config → psy-ana-coder
  │   │       No config → psy-ana-designer
  │   │
  │   ├─ "Review this analysis" / "审计分析代码" / "检查分析脚本"
  │   │    → psy-ana-reviewer
  │   │
  │   └─ "Analysis script error" / "分析代码报错" / "分析结果不对"
  │        → Design error (wrong method) → psy-ana-designer
  │           Code error (API misuse)    → psy-ana-coder
  │
  ├─ 🔀 CROSS-PIPELINE — experiment done, now want analysis
  │
  │   ├─ "Experiment passed review, now analyze the data" / "实验做完了,分析数据"
  │   │    → psy-ana-designer
  │   │    → "如果有实验 config YAML 可以直接复用;没有的话我帮你手动收集实验信息。"
  │   │
  │   └─ "Build experiment AND analyze" / "设计实验并分析数据"
  │        → psy-exp-designer first → after pipeline completes, remind user to return for analysis
  │
  ├─ ❓ AMBIGUOUS — unclear which pipeline
  │
  │   └─ "帮我做 Stroop" / "I want to do a Stroop study"
  │        → "你需要设计实验程序,还是分析已有数据?"
  │           Build experiment → psy-exp-designer
  │           Analyze data      → psy-ana-designer
  │
  └─ ℹ️ GENERAL
       ├─ "有哪些范式" → Paradigm Coverage Matrix
       ├─ "有哪些分析方法" → 60 methods + 48 charts summary
       └─ "这个系统怎么用" → System overview + both pipelines

Mandatory Execution Order

Experiment Pipeline:

  1. First: Invoke psy-exp-designer — guide user through 5-phase design. Output: experiment config YAML
  2. Second: Invoke psy-exp-coder — generate platform code from config. Output: .py/.js/.m + README
  3. Third: Invoke psy-exp-reviewer — audit the generated code. Output: audit report + readiness label

Analysis Pipeline:

  1. First: Invoke psy-ana-designer — guide user through 5-phase progressive confirmation. Output: analysis config YAML
  2. Second: Invoke psy-ana-coder — generate R or Python analysis script. Output: analysis.R/.py + report
  3. Third: Invoke psy-ana-reviewer — audit the analysis script. Output: audit report + readiness label

Never skip a step. Never generate experiment code before the trial window timeline is confirmed. Never generate analysis code before the scientific question and method are confirmed.


Design Principles (System-Wide)

#PrincipleDescriptionApplies to
1Output is deliverableEvery phase produces complete, usable artifactsAll
2Progressive confirmationDesign decisions confirmed phase by phase; defaults flagged ⚠️Both Designers
3Decision traceabilityDecision Registry records source of every decisionBoth Designers
4Skeleton-first generationAll code generation MUST start from platform spec Canonical Code SkeletonBoth Coders
5Spec provides API, reference provides logicParadigms/methods define logic; API patterns from specBoth Coders
6Anti-pattern zero-toleranceBlocking APIs, wrong RT sources, missing random effects — blockedBoth Coders & Reviewers
7Your experiment/analysis, our standardsUser owns the design; system guarantees code qualityAll
8Design before codeNo code generation before design is confirmedBoth pipelines
9Post-generation audit mandatoryAll generated code must pass through Reviewer before useBoth Coders & Reviewers
10Input bounds outputReviewer's conclusions cannot exceed what the input supportsBoth Reviewers
11Scientific question drives methodAnalysis methods chosen by scientific question, not habitpsy-ana-designer
1212-dimension comparisonEvery method choice backed by structured A vs B comparisonpsy-ana-designer
13Method before codeAnalysis method must be confirmed before generating analysis codepsy-ana-designer, psy-ana-coder
14Recovery path always providedAudit reports with Critical/Major issues MUST include explicit fix path back to the correct upstream skillBoth Reviewers

Red Lines (System-Wide Absolute Prohibitions)

These rules span all six pipeline skills. Violation is never acceptable:

#RuleOwned byConsequence of violation
R1No code generation before trial window timeline is completepsy-exp-designerStructural errors, expensive late-stage fixes
R2No assumed response mappingpsy-exp-designerGuessing key mapping invalidates accuracy data
R3No time.sleep() in experiment codepsy-exp-coderBlocks event loop, Escape unresponsive
R4No event.getKeys(maxWait=...)psy-exp-coderBlocks event loop
R5No data saved only at experiment endpsy-exp-coderCrash = all data lost
R6No silent filling of [MISSING] valuespsy-exp-designerEvery gap must be resolved by asking user or offering flagged default
R7No Chinese/CJK text without explicit fontpsy-exp-coderPsychoPy default font lacks CJK glyphs; text renders as tofu (□□□)
R8No skipping paradigm Must-Confirm itemspsy-exp-designerUnconfirmed items produce broken experiments
R9No rt_onset omitted on response windowspsy-exp-coderMissing/incorrect RT onset invalidates all reaction time data
R10No code delivery without Reviewer passAllAll code must pass reviewer audit before data collection
R11No analysis method recommendation without 12-dimension comparisonpsy-ana-designerUnexamined method choice risks statistical validity
R12No analysis code without seed + exclusion log + effect sizepsy-ana-coderMissing elements break reproducibility
R13No analysis script delivery without session info outputpsy-ana-coderNon-reproducible without environment capture

Code Generation Architecture (4-Layer Priority)

All platforms use the same 4-layer priority stack. When layers conflict, higher always wins:

Layer 1: spec/          ← Highest: API spec, anti-patterns, Canonical Code Skeleton
Layer 2: mapping/       ← Structural: config YAML fields → platform code structures
Layer 3: paradigms/      ← Paradigm logic: window sequence, accuracy rules, condition structure
Layer 4: demo/          ← Lowest: raw demo code, logic reference only, never API reference

Code generation priority: spec canonical skeleton > spec anti-patterns > config→code mapping > paradigm logic > demos

Platform Layer Fill Status

LayerPsychoPyjsPsychPsychtoolbox
L1 spec/
L2 mapping/
L3 paradigms/✅ 27 paradigms✅ 25 paradigms✅ 5 paradigms
L4 demo/_raw/✅ 45 .py✅ 23 .js✅ 100 .md

Code Template (Overview)

All generated code follows a 12-step structure: imports → parameters → display setup → stimulus preloading → condition loading → helpers → instructions → practice → main loop (blocks → randomization → per-trial windows) → incremental data save → cleanup → package with README. The full template with detailed per-step requirements is in the coder SKILL.md.


Post-Generation Quality Gate (Overview)

Before delivery, all generated code must pass the 9-item Quality Gate defined in the coder SKILL.md. Covers: spec skeleton compliance, anti-pattern scan, API patterns, parameter placement, escape handling, RT source, incremental save, preloading, and CJK font config. Any failure = fix before delivery.


Review Modes and Readiness Labels

Experiment Review Modes (psy-exp-reviewer)

ModeInputMaximum label
code-auditComplete experiment codeready_for_collection
config-auditConfig YAML / trial timelinepre_code_ready
implementation-plan-reviewPseudocode / architecture planpre_code_ready
triage-onlyNatural-language descriptionNone (missing-info list only)
blockedInsufficient inputNone (state what's needed)

Analysis Review Modes (psy-ana-reviewer)

ModeInputMaximum label
analysis-auditComplete analysis script + dataready_for_publication
plan-reviewAnalysis config YAMLanalysis_plan_ready
triage-onlyResearch questionNone (missing-info list only)
blockedInsufficient inputNone

Readiness Labels

LabelPipelineMeaning
ready_for_collectionExperimentZero Critical + zero Major — can collect data
ready_for_publicationAnalysisZero Critical + zero Major — reproducible and complete
ready_after_minor_fixesBothOnly Minor issues remain
not_ready_for_collectionExperimentCritical or Major issues exist — do NOT collect
not_readyAnalysisCritical or Major issues exist
pre_code_readyExperimentDesign complete, ready for code generation
analysis_plan_readyAnalysisAnalysis design complete, ready for code generation
blockedBothInput insufficient for any review

Severity Classification

SeverityDefinitionCan proceed?
CriticalInvalidates all data; must fix before any collectionNo — fix before any data collection or publication
MajorDegrades data quality; fix before formal collectionNo — fix before formal data collection (exp) or publication (ana)
MinorDoes not affect data quality; fix when convenientYes — fix when convenient

Paradigm Coverage Matrix

Core Paradigms (14) — Full Programming-Layer Spec

All 10 required sections filled (When to Use, Core Logic, Must Confirm, Do Not Assume, Condition File Columns, Trial Window Timeline, Data Analysis, Variants, References, Example):

Go/No-go · Navon · Priming · Stroop · Eriksen Flanker · Simon · Rating · Stop-signal · IAT · N-back · Dot-probe · Visual Search · Task Switching · EAST

Extended Paradigms (24) — Full Programming-Layer Spec

Antisaccade · ANT · BART · Bilingual Stroop · Change Detection · Children Flanker · Choice RT · Climate Reflection · CPT · Corsi Blocks · Cyberball · Delay Discounting · Drag and Drop · Mental Rotation · Multisensory Nature · Numerical Stroop · Phone a Friend · Posner Cuing · Psychophysics Staircase · Rating to Choice · Sternberg · Ultimatum Game · WCST · Writing Distraction

Paradigm Count Explained

LayerCountWhat they are
Programming paradigms/38 (14 core + 24 extended)Design references for the 5-phase workflow. Apply to ALL platforms
Coder psychopy/paradigms/27PsychoPy code references with platform-specific generation logic
Coder jspsych/paradigms/25jsPsych code references with timeline plugins
Coder psychtoolbox/paradigms/5PTB code references; most paradigms use 12-step template for manual adaptation

Cross-Platform Mandatory API Quick Reference

DimensionPsychoPyjsPsych (7.x)Psychtoolbox
Keyboardkeyboard.Keyboard(backend='ptb')Plugin class referencesKbQueueCreate + KbQueueCheck
RT sourcekey.rt (USB HID async)data.rt (automatic)firstPress - VBLTimestamp
RT originwin.callOnFlip(kb.clock.reset)Stimulus onset (automatic)VBLTimestamp = Screen('Flip') return
Timing loopCountdownTimertrial_duration parametervbl + (waitframes-0.5)*ifi
Data savetry/finally + per-trial flushon_finish callbacktry/catch + fopen/fprintf/fclose
QuitEscape check in every loop'escape' in choicesKbCheck(KbName('ESCAPE'))
Cleanupwin.close() + core.quit()jsPsych.endCurrentTimeline()sca + Priority(0) + ShowCursor
CJK fontFONT_CONFIG toggle + TextBox2CSS font-familyScreen('TextFont') + TextStyle

Analysis Platform API Quick Reference

DimensionRPython
Data importreadr::read_csv()pandas.read_csv()
Filteringdplyr::filter()df[df['col'] > x]
Grouped statsgroup_by() %>% summarise()df.groupby().agg()
Paired t-testt.test(paired=TRUE)scipy.stats.ttest_rel()
Mixed modellme4::lmer()statsmodels.MixedLM()
GLMM (binomial)lme4::glmer(family=binomial)statsmodels.Logit() / pymer4
Effect sizeeffectsize::cohens_d() / repeated_measures_d()pingouin.compute_effsize()
Post-hocemmeans::emmeans() + pairs()statsmodels.stats.multicomp
Visualizationggplot2 + ggrainmatplotlib + seaborn
Reproducibilityset.seed() + sessionInfo()np.random.seed() + sys.version

Inter-Skill Communication Protocol

Experiment Pipeline

psy-exp-designer → psy-exp-coder:

  • Artifact: Complete config.yaml (internal, never shown to user)
  • Precondition: Gate 5 passed (user confirmed full Design Decision Registry)
  • Coder's duty: Load config → select platform → copy skeleton → map code → Quality Gate → deliver

Coder → Reviewer:

  • Artifact: Generated experiment code (.py / .js / .m) + condition files + README
  • Precondition: Coder's Post-Generation Quality Gate passed
  • Reviewer's duty: Detect platform → load corresponding spec → audit each dimension → output graded report + readiness label

Analysis Pipeline

Designer → Coder:

  • Artifact: analysis_config.yaml (saved to working directory)
  • Precondition: Gate 5 passed (user confirmed full Analysis Decision Registry)
  • Coder's duty: Phase 0 validate config → confirm language (R/Python) → preview plan → generate code → deliver

Coder → Reviewer:

  • Artifact: Generated analysis script (analysis.R/.py) + report (.Rmd/.ipynb)
  • Precondition: Coder's 10-item Quality Gate passed
  • Reviewer's duty: Intake → detect platform → Gate 0 grep scan → 5-dimension audit → output graded report + readiness label + recovery path

Shared Artifacts

ArtifactProducerConsumerFormat
Experiment config YAMLpsy-exp-designerpsy-exp-coder.yaml (internal)
Condition filespsy-exp-designerpsy-exp-coder.xlsx / .csv
Experiment codepsy-exp-coderpsy-exp-reviewer.py / .js / .m
Experiment READMEpsy-exp-coderpsy-exp-reviewer.md
Analysis config YAMLpsy-ana-designerpsy-ana-coder.yaml (saved to disk)
Analysis scriptpsy-ana-coderpsy-ana-reviewer.R / .py
Analysis reportpsy-ana-coderpsy-ana-reviewer.Rmd / .ipynb
Audit reportBoth ReviewersUserMarkdown (graded + readiness label)

Code Output Specification

Experiment Deliverables

FileFormatContent
Platform experiment file.py / .js / .mRunnable code, all parameters at top, FONT_CONFIG toggle if CJK used
Experiment README.mdWindow sequence diagram, condition/block structure, response rules, data columns, how to run, parameter line numbers, known limitations

Analysis Deliverables

FileFormatContent
Analysis script.R / .pyConfig-driven, 12-step structure, seed + exclusion log + effect sizes + session info
Analysis report.Rmd / .ipynbExclusion summary, descriptive stats, model results, figures, environment info

Language Consistency

Code comments and README language MUST match the user's language:

  • 中文用户 → 中文 README + 中文代码注释
  • English user → English README + English code comments

File Structure

amazing-psycoder-skills/
├── amazing-psycoder/                       ← Entry orchestrator (this skill)
│   ├── SKILL.md
│   ├── PLATFORMS.md                        ← Platform adapter reference
│   ├── install.sh                          ← Cross-platform installer
│   │
│   │   # === Experiment Pipeline ===
│   ├── psy-exp-designer/        ← ① Experiment design
│   │   ├── SKILL.md                         ← 5-phase workflow + red lines
│   │   ├── README.md
│   │   ├── paradigms/                       ← 38 paradigm reference files
│   │   └── references/                      ← config-schema, timing, data-recording
│   ├── psy-exp-coder/              ← ② Experiment code generation
│   │   ├── SKILL.md                         ← 4-layer arch + 9-item gate
│   │   ├── README.md
│   │   ├── psychopy/                        ← PsychoPy (full auto)
│   │   ├── jspsych/                         ← jsPsych
│   │   └── psychtoolbox/                    ← PTB
│   ├── psy-exp-reviewer/      ← ③ Experiment audit
│   │   ├── SKILL.md                         ← 5 review modes + platform-aware audit
│   │   └── README.md
│   │
│   │   # === Analysis Pipeline ===
│   ├── psy-ana-designer/        ← ④ Analysis design
│   │   ├── SKILL.md                         ← 5-phase progressive + 12-dimension comparison
│   │   ├── README.md
│   │   ├── methods/                         ← 60 analysis method references
│   │   └── plots/                           ← 48 chart type references
│   ├── psy-ana-coder/               ← ⑤ Analysis code generation
│   │   ├── SKILL.md                         ← 12-step script + R↔Python mapping
│   │   ├── README.md
│   │   ├── r/                               ← R platform (spec/mapping/checklist/demo)
│   │   └── python/                          ← Python platform (spec/mapping/checklist/demo)
│   └── psy-ana-reviewer/       ← ⑥ Analysis audit
│       ├── SKILL.md                         ← 4 review modes + reproducibility scoring
│       ├── README.md
│       ├── r/checklist/                     ← R audit checklist
│       └── python/checklist/                ← Python audit checklist
├── docs/                                    ← Multi-language READMEs
│   ├── README_EN.md
│   ├── README_ZH-HANT.md
│   ├── README_JA.md
│   ├── README_DE.md
│   └── README_FR.md
└── README.md                                ← Main README (简体中文)

When NOT to Use This Skill

  • Quick PsychoPy/jsPsych/PTB API questions: Answer directly; don't invoke the full workflow
  • Quick R/Python stats questions: Answer directly; don't invoke the full analysis pipeline
  • General Python/JavaScript/MATLAB/R questions: Answer directly
  • Non-experiment programming tasks: Not in scope
  • Data analysis without experiment context: The analysis pipeline CAN handle standalone data — psy-ana-designer will manually collect experiment information if no config YAML exists

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.