Логотип Psy Ana Coder

Psy Ana Coder

Спільнота
soupandpsy
psy-ana-coder

Generate, modify, or debug reproducible R or Python analysis code from a completed analysis config YAML or concrete existing script. Use for data import/cleaning, statistical models, assumption checks, effect sizes, sensitivity analyses, publication figures, reports, session information, and analysis-script runtime errors. Do not choose unresolved statistical methods or issue publication-readiness verdicts; use psy-ana-designer or psy-ana-reviewer for those stages.

Огляд

Видавецьsoupandpsy
Репозиторійamazing-psycoder-skills
Назва навичкиpsy-ana-coder
Зірки
38
Форки
1
Файли в пакеті
5
ЛіцензіяMIT
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 5

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Опубліковано на GitHub користувачем soupandpsy. Перегляньте вихідний вміст перед установленням.

Встановлення

Установіть навичку ШІ Psy Ana Coder у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до Плагіни → Навички.
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/soupandpsy/amazing-psycoder-skills/tree/main/amazing-psycoder/psy-ana-coder
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Нова навичка → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/soupandpsy/amazing-psycoder-skills.git /tmp/amazing-psycoder-skills
mkdir -p .claude/skills
cp -r /tmp/amazing-psycoder-skills/amazing-psycoder/psy-ana-coder .claude/skills/psy-ana-coder
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Psy Ana Coder в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Psy Ana Coder, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції Markdown, а не код для певного постачальника, тому навичка Psy Ana Coder не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож невикористана навичка нічого не коштує.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Analysis Coder

Authoritative-source boundary: never load or copy files under python/demo/ or r/demo/ during generation. They are quarantined historical demonstrations and do not satisfy the v1.4.0 analysis contract. Use only the confirmed config plus the current spec, mapping, and checklist selected below.

Version

v1.4.0 — unified evidence-gated contract, 2026-07-23. Sub-skill of amazing-psycoder.

Purpose

Receive the analysis config from psy-ana-designer and implement it in R or Python. Preserve the same estimand and decision rules across languages, but do not claim API/capability equivalence: if a selected model has no validated implementation in the chosen ecosystem, block or obtain approval for a scientifically equivalent alternative.

Does not design analyses — only implements a confirmed analysis plan.

Platform Routing

Analysis config YAML
       │
       ├── User language = R      → r/     (tidyverse, lme4, ggplot2, RMarkdown)
       └── User language = Python → python/ (pandas, statsmodels, seaborn, Jupyter)

Each platform includes authoritative spec/, mapping/, and checklist/ components. Existing demo/ directories are quarantined historical material and are excluded from generation context.

Phase 0: Config Ingestion & Validation

Goal: Receive and validate the analysis config YAML, and confirm the language preference.

0.1 Receive Config

"Please provide the analysis config YAML generated by psy-ana-designer. You may paste its content, or provide a file path (e.g., analysis_config.yaml)."

Validate immediately after reading the config:

  • version is compatible (current contract: v1.2)
  • Required fields: analysis_mode, exact runtime.language/runtime.language_version/dependency strategy/concrete dependency_file/target environment, design.design_type, design.observation_level, design.dvs, questions[].estimand, questions[].selected_method, and model.stochastic
  • If model.stochastic: true, model.seed is required; deterministic plans need no ceremonial seed
  • At least one questions[] entry
  • Field types are correct (rt_lower is numeric when used, correction is explicit and supported by the selected inference, etc.)

Select PYTHON_BIN only after $PYTHON_BIN -c "import yaml" succeeds; if no interpreter passes, stop and provide the isolated validation-environment setup from <amazing-psycoder-root>/PLATFORMS.md. Run $PYTHON_BIN <amazing-psycoder-root>/scripts/validate_analysis.py <analysis_config.yaml> and treat every error as blocking. After generation, run it again with --code <analysis-file> --language r|python; a pass means ready for execution testing at most. After a clean run, add --execution-log <configured-log> and resolve every hash/environment error before routing outputs to Reviewer.

Validation failure → list missing/incorrect fields, ask the user to correct and re-submit. Do not proceed.

0.2 Runtime Confirmation

Route to the platform declared in runtime.language and confirm that its exact version/dependency strategy is available. Generate the declared runtime.dependency_file from the packages actually imported, with direct dependencies exactly pinned or resolved in a lockfile; never invent unused packages merely to fill a template. If the selected estimator is unsupported there, report the concrete limitation and return to Designer for an approved method/runtime revision; do not silently switch ecosystems or implementations.

0.3 Generate Preview

Display the generation plan:

  • Platform: R / Python
  • Model: {model types extracted from config}
  • Figures: {figure list extracted from config}
  • Output files: analysis.R/py + report.Rmd/ipynb + the declared dependency pin/lock artifact

"Confirm the plan above is correct? Then code generation will begin."

After user confirmation, proceed to generation.

Red Lines

#Rule
1Stochastic step without a seed/control strategy → do not deliver
2Exclusion log missing → do not deliver
3Applicable diagnostics/fallback code missing → do not deliver; never add irrelevant omnibus assumption tests
4Claim-appropriate effect estimate and uncertainty missing → do not deliver
5Multiple comparison scheme not reflected → do not deliver
6Environment info (sessionInfo/sys.version) not output → do not deliver
7Never generate code with hardcoded paths
8Comment language MUST match user language → do not deliver
9Declared dependency artifact absent, incomplete for actual imports, or inconsistent with the target runtime → do not deliver
10Execution manifest is written only on success, so a failed clean run leaves no machine-readable failure evidence → do not deliver

Shared Analysis Logic

The logic below applies to both R and Python equally. For platform-specific API mappings, see each platform's mapping/ file.

Comment Language Specification (Highest Priority)

All generated code comments must use the user's language. Chinese user → Chinese comments, English user → English comments. Comments should explain "why this is done" rather than merely "what is done."

Each step's comments should include:

  • The purpose of this step (why this step is necessary)
  • The meaning and provenance of key parameters (e.g., "the protocol-confirmed RT lower bound is applied as an anticipatory-response rule"; never invent a universal cutoff)
  • The rationale for the chosen statistical method (e.g., the model estimates the declared trial-level contrast while representing the confirmed subject/item dependence)
  • Result interpretation hints that emphasize estimates, uncertainty, diagnostics, and limitations rather than treating a non-significant assumption test as proof

The comment style follows "pedagogical comments" — enabling a colleague unfamiliar with this analysis method to understand what every step does and why it is done.

12-Step Script Structure

1. Title comment    Experiment name, estimand/model, date, config version
2. Environment setup    Package loading, environment capture, conditional stochastic controls
3. Data import    Read + column name validation (missing column → error)
4. Data cleaning   Apply only the config-declared rules in their declared order; never assume correct-only or SD trimming
5. Exclusion log    Print exclusion counts and proportions at each step
6. Descriptive stats    n, mean, sd, se, ci95, median, mad, grouped by condition
7. Model diagnostics    Estimand/model-appropriate residual, convergence, dispersion, calibration, or predictive checks
8. Statistical modeling    t-test / ANOVA / lmer / glmer / Bayes (per config selection)
9. Effect estimates      Planned contrasts/OR/probability differences/effect sizes with uncertainty
10. Declared comparisons   Model-scale/marginal contrasts + the confirmed claim-family/multiplicity strategy when applicable
11. Figure generation   Generate only declared estimand-supporting figures and save them to disk
12. Environment info    Version + package versions

(This is Phase 1 — the generation phase executed after Phase 0 validation passes.)

Priority: implement questions[].selected_method and its confirmed formula/estimand. If these are absent or incompatible with the data hierarchy, stop and route to psy-ana-designer; the Coder must not choose a new inferential method.

Model Implementation Guard

selected_method + estimand + outcome family + observation hierarchy
  ├── compatible → implement exactly and add declared diagnostics/sensitivity rules
  ├── unsupported by chosen language/runtime → report concrete dependency limitation and return for an approved alternative
  └── incompatible/unresolved → stop; route to psy-ana-designer

Formula/dependence validation: Before using model_formula and dependence_structure, verify:

  • Trial/event-level repeated data → formula or estimator must represent declared subject/item/session dependence; the exact random structure is design-dependent
  • Binary DV → use the confirmed binomial/ordinal likelihood and dependence structure (for example GLMM, GEE, or a justified Bayesian hierarchy); never use a Gaussian LMM merely because it is convenient
  • Variable names in the formula must exist in the data columns Validation failure → block generation and return an actionable config error. Never silently substitute another model.

Data Aggregation Rules

AnalysisAggregation Level
Paired t-testSubject × Condition means
lmer / MixedLMTrial level (no aggregation)
Descriptive statisticsCondition
Participant exclusionSubject

Missing Config Fields

Do not silently invent cleaning thresholds, missing-data policy, contrasts, multiplicity correction, figures, or effect estimates. Missing scientific choices block generation and return to psy-ana-designer. Pure presentation defaults (file names, theme, image resolution) may be applied if logged in the report and do not change inference.

Figure Mapping

See psy-ana-designer's plots/ directory (48 detailed figure specifications) and the R ↔ Python mapping table in this document.

Figure TypeWhen to UseElements
RaincloudWithin-subjects two-groupViolin + boxplot + individual scatter
Individual linesWithin-subjectsOne line per person + red mean
Boxplot + scatterMulti-groupBoxplot + jitter
Interaction plotMulti-factorGrouped lines + error bars
QQ plotNormality testTheoretical quantiles vs actual

Effect Size Quick Reference

MethodMetricInterpretation
t-testDesign-appropriate standardized and/or raw contrast + 95% CIInterpret against the construct and domain evidence; do not impose universal small/medium/large cutoffs
ANOVAEstimand-compatible contrast and CI; η²/ω² when usefulInterpret magnitude in the construct, scale, and design context; do not impose universal cutoffs
Mixed modelPlanned marginal contrast + CI; optionally marginal/conditional R²Focal effect plus model fit
Logistic modelOdds ratio and/or probability-scale contrast + 95% CIState the reference direction and interpret on a domain-relevant scale

Multiple Comparison Schemes

MethodCharacteristics
Holm / BonferroniFamily-wise error control for a declared family; Holm is often less conservative
FDR (BH)False-discovery-rate control for a declared discovery family
Tukey HSDSimultaneous inference for a declared all-pairwise family under its model assumptions
Planned/hierarchical/no adjustmentUse when the question structure justifies it and record the claim family and rationale

Sensitivity Analysis

Run only prespecified sensitivity analyses (cleaning, missingness, distribution/random structure, or estimator variants). Report estimate/uncertainty changes, not merely whether p-values cross 0.05.

Report Template

Generate a reproducible report: R → RMarkdown/Quarto, Python → Jupyter or a script-rendered HTML report. Include title, exclusion provenance, descriptive statistics, model estimates, diagnostics, figures, and environment info. When execution is possible, run in a clean process and save analysis-run.json with command/timestamps/exit status, config/code/dependency/input hashes, warnings, output inventory plus hashes, and environment snapshot. Generation without a successful run is only ready_for_execution, never publication-ready.


R ↔ Python Mapping

OperationRPython
Data importDispatch from declared format to readr/readxl/arrow/jsonliteDispatch from declared format to the matching pandas reader
Filterfilter(col > x)df[df['col'] > x]
Group summarygroup_by() %>% summarise()df.groupby().agg()
Pipe%>%Chained calls
Paired t-testt.test(y~x, paired=TRUE)scipy.stats.ttest_rel(a,b)
Independent Welch t-testt.test(y~x, var.equal=FALSE)scipy.stats.ttest_ind(a,b,equal_var=False)
Within-subjects ANOVAafex::aov_ez()pingouin.rm_anova()
Between-subjects ANOVAoneway.test(y~x)scipy.stats.f_oneway()
Mixed modellme4::lmer()statsmodels.MixedLM()
Logistic mixedlme4::glmer(binomial)Bambi Bernoulli multilevel model, or a documented BinomialBayesMixedGLM design within its limits; plain Logit() has no random effects
Distribution diagnosticsModel-specific residual/convergence/dispersion checksModel-specific residual/convergence/dispersion or posterior-predictive checks
Homogeneity of varianceleveneTest()scipy.stats.levene()
Cohen's deffectsize::cohens_d()pingouin.compute_effsize()
η²effectsize::eta_squared()pingouin.anova(detailed=True)
R² (mixed)performance::r2()Manual calculation
Estimated marginal meansemmeans::emmeans()statsmodels pairwise
Post-hoc comparisonspairs(emm, adjust=)multipletests(pvals, method=)
Raincloud plotggrain::geom_rain()ptitprince.RainCloud()
Save figureggsave()plt.savefig()
Seedset.seed()np.random.seed()
Environment infoexact R-version check + sessionInfo() + declared dependency artifactexact Python-version check + platform/package snapshot + declared dependency artifact

Routing

Analysis config YAML (input)
       │
       ├── Target=R      → r/spec/ + r/mapping/
       │                  → Generate: analysis.R + report.Rmd → save to output.save_path/
       └── Target=Python → python/spec/ + python/mapping/
                          → Generate: analysis.py + report.ipynb → save to output.save_path/
       Both routes also generate runtime.dependency_file beside the project config.
       │
       ▼
psy-ana-reviewer (audit)

After generation: Code has been saved to {output.save_path}/.

"Code generation complete. Next step: input /psy-ana-reviewer and provide the generated script path for audit."

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ Psy Ana Coder?

Generate, modify, or debug reproducible R or Python analysis code from a completed analysis config YAML or concrete existing script. Use for data import/cleaning, statistical models, assumption checks, effect sizes, sensitivity analyses, publication figures, reports, session information, and analysis-script runtime errors. Do not choose unresolved statistical methods or issue publication-readiness verdicts; use psy-ana-designer or psy-ana-reviewer for those stages.

Навіщо використовувати Psy Ana Coder у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Psy Ana Coder — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Psy Ana Coder у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/soupandpsy/amazing-psycoder-skills/tree/main/amazing-psycoder/psy-ana-coder. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Psy Ana Coder?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Psy Ana Coder?

Зі скількома забажаєте. Якщо модель підтримує навички, ви можете використовувати з нею Psy Ana Coder — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama та інші — усе в TypingMind із власними ключами API.

Чи безкоштовна навичка ШІ Psy Ana Coder?

Так. Навичку опубліковано на GitHub: soupandpsy, за ліцензією MIT. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це багаторазовий набір інструкцій, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти для виклику — код, який десь виконується й повертає результат. Натомість навичка ШІ надає моделі знання та порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇