Logo: Coding SOP

Coding SOP

Communautéit
wentorai
Coding SOP

Standard operating procedure for research experiments, data analysis, and visualization. Covers Python/R script execution, statistical analysis, data wrangling (pandas/tidyverse), publication-quality figures (matplotlib/plotly/ggplot2), and experiment reproducibility.

Add to TypingMind

Iwwersiicht

Editeurwentorai
RepositoryResearch-Claw
Skill-NummCoding SOP
Stären
859
Forks
117
Matgeliwwert Dateien
Nëmmen Instruktiounen
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    wentorai huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Coding SOP an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/wentorai/Research-Claw/tree/main/skills/coding-sop
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wentorai/Research-Claw.git /tmp/Research-Claw
mkdir -p .claude/skills
cp -r /tmp/Research-Claw/skills/coding-sop .claude/skills/wentorai-coding-sop
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Coding SOP an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Coding SOP automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Coding SOP net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Coding SOP — Research Experiments & Data Analysis

1. Experiment Execution SOP

1.1 Hypothesis → Code → Execute → Verify

  1. Hypothesize: state what you expect and why
  2. Design: define variables, controls, sample size / iteration count
  3. Code: workspace_save to outputs/scripts/; include docstring (hypothesis, expected outcome, dependencies)
  4. Execute: exec in workspace (safe commands — see §5); capture stdout + stderr
  5. Verify: compare against hypothesis; check for NaN/Inf/warnings; save to outputs/reports/
  6. Iterate: if contradicted, revise (do NOT cherry-pick); if confirmed, document

1.2 Script Template

Every script must include: shebang, docstring (experiment title, hypothesis, dependencies, date), seed setting (see §6), and four sections: loading, processing, analysis, output.

2. Data Processing SOP

2.1 Pipeline: Clean → Transform → Analyze

  1. Inspect: df.info(), df.describe(), df.head() — check dtypes, nulls, duplicates
  2. Clean: handle missing values (drop/impute/flag — document choice), fix dtypes, remove duplicates, detect outliers (IQR, z-score, domain rules)
  3. Transform: normalize/standardize, encode categoricals, feature engineering, reshape (pivot, melt, merge)
  4. Validate: assert expected shape, sanity-check stats, save cleaned data via workspace_save("sources/data/<name>_clean.csv")

2.2 Common Libraries

Python: pandas/polars (DataFrames), numpy (numerics), dask (large files), spaCy (text). R: dplyr/tidyr (wrangling), data.table/arrow (large files), stringr/tidytext (text).

Browse analysis/wrangling/ for 10 deep-dive skills (pandas, missing data, survey, text mining).

3. Statistical Analysis Guide

3.1 Test Selection Tree

What is your research question?
│
├── Comparing groups?
│   ├── 2 groups
│   │   ├── Continuous DV, normal → Independent t-test
│   │   ├── Continuous DV, non-normal → Mann-Whitney U
│   │   ├── Paired/matched → Paired t-test / Wilcoxon signed-rank
│   │   └── Categorical DV → Chi-square / Fisher's exact
│   ├── 3+ groups
│   │   ├── 1 factor, normal → One-way ANOVA → post-hoc (Tukey/Bonferroni)
│   │   ├── 1 factor, non-normal → Kruskal-Wallis → post-hoc (Dunn)
│   │   ├── 2+ factors → Two-way / N-way ANOVA (check interactions)
│   │   └── Repeated measures → Repeated-measures ANOVA / Friedman
│   └── Pre/post with control → Mixed ANOVA / DiD
│
├── Predicting an outcome?
│   ├── Continuous outcome → Linear regression (OLS)
│   │   ├── Multiple predictors → Multiple regression
│   │   ├── Non-linear → Polynomial / GAM / splines
│   │   └── Endogeneity → IV / 2SLS (see econometrics skills)
│   ├── Binary outcome → Logistic regression
│   ├── Count/ordinal → Poisson / Ordinal logistic
│   ├── Time-to-event → Cox proportional hazards
│   └── Panel data → Fixed/random effects (see econometrics skills)
│
├── Exploring relationships?
│   ├── 2 continuous vars → Pearson r (normal) / Spearman rho (non-normal)
│   ├── 2 categorical vars → Chi-square test of independence
│   ├── Latent constructs → Factor analysis / SEM
│   └── Dimensionality → PCA / t-SNE
│
└── Estimating causal effects?
    ├── Randomized experiment → t-test / ANOVA with random assignment
    ├── Natural experiment → DiD, RDD, IV
    └── Observational → Propensity score matching, synthetic control

3.2 Reporting Checklist

Every test must report: test name, statistic value (t/F/chi-sq/U/z), df, exact p-value, effect size (Cohen's d / eta-sq / Cramer's V / OR), 95% CI, assumptions checked (normality, homoscedasticity, independence), sample size per group.

3.3 Common Pitfalls

  • Multiple comparisons: Bonferroni, Holm, or FDR correction
  • p-hacking: pre-register hypotheses; never fish for p < 0.05
  • Small samples: exact tests or bootstrap over asymptotic tests
  • Normality: Shapiro-Wilk (n < 50) or Q-Q plot + KS test
  • Confounders: include as covariates or stratify

Deep-dive skills: browse analysis/statistics/ (10 skills: Bayesian, meta-analysis, SEM, survival, power analysis, nonparametric) and analysis/econometrics/ (12 skills: causal inference, panel data, IV, time series).

4. Visualization SOP

4.1 Chart Type Selection

Data patternChart type
Distribution (1 var)Histogram, KDE, box/violin plot
Comparison (categories)Bar chart, grouped bar, dot plot
Trend over timeLine chart, area chart
Relationship (2 vars)Scatter plot, regression plot
Correlation matrixHeatmap
CompositionStacked bar, treemap
GeographicChoropleth, point map
Network / graphForce-directed, adjacency matrix
High-dimensionalPCA biplot, t-SNE, UMAP

4.2 Publication-Quality Standards

Set plt.rcParams for journal figures: figure.dpi: 300, font.family: serif, font.size: 10, savefig.bbox: tight. Key rules:

  1. Resolution: 300 DPI minimum (600 DPI for line art)
  2. Format: PDF/SVG for vector; PNG/TIFF for raster (avoid JPEG)
  3. Color: colorblind-safe palettes (viridis, cividis, Set2)
  4. Labels: every axis labeled with units; legend outside if crowded
  5. Font: 8-12pt, match journal spec (serif or sans-serif)
  6. Size: single column ~3.5in, double column ~7in width
  7. Save: workspace_save("outputs/figures/fig-<desc>.pdf", content)

Deep-dive skills: browse analysis/dataviz/ (14 skills: matplotlib, plotly, D3, publication figures, color accessibility, geospatial, network viz).

5. exec Safety & Patterns

Safe (no approval): python3, Rscript, xelatex, pandoc, jq, wc, grep, find. Requires approval_card: pip install, brew install, curl, wget, anything outside workspace. Full safety rules in Workspace SOP.

Common patterns:

  • exec("python3 outputs/scripts/experiment.py") — run analysis
  • exec("Rscript outputs/scripts/analysis.R") — R script
  • exec("python3 -c \"import pandas; ...\"") — quick inspection

Output paths: All script outputs (figures, data, reports) MUST use workspace-relative paths. Set the working directory to workspace root before execution, and use paths like outputs/figures/, outputs/reports/. Template for Python:

python
import os
os.chdir(os.environ.get('WORKSPACE_ROOT', '.'))

6. Reproducibility Protocol

6.1 Environment Recording

At analysis start, capture Python version, platform, and key package versions (numpy, pandas, scipy, matplotlib, sklearn). Save via workspace_save("outputs/reports/env-snapshot-<date>.json").

6.2 Reproducibility Checklist

  • Random seeds: Set at script top for numpy, random, torch, tensorflow
  • Version locking: Record exact versions (pip freeze / conda list)
  • Data provenance: Source URL, download date, SHA-256 for raw data
  • Execution order: Scripts must run independently (no notebook-state dependency)
  • Relative paths: Use workspace-relative paths, not absolute
  • For ML: log hyperparams, track metrics per step, save checkpoints, record hardware

7. Coding Complexity Delegation

Before writing code, assess complexity:

Simple task (single file, stdlib only, no iteration)
  → RC handles directly via exec
Complex task (multi-file, dependencies, iterative debugging)
  → Check MEMORY.md Environment for installed CLIs (codex, claude, opencode)
    → CLI found → inform user, suggest delegating via exec
      → User agrees → exec the CLI (read claude-code / codex-cli / opencode-cli skill)
      → User wants RC → proceed with RC's own capabilities
    → No CLI → recommend installation, wait for user decision
      → User insists → RC proceeds via repeated workspace_save + exec (slower)

Boundary: "complex coding" = multi-file projects, dependency management, iterative debugging, beamer/multi-chapter LaTeX, interactive visualizations. For these, the Claude Code, Codex CLI, and OpenCode CLI skills provide delegation guidance.

8. RC Local Tools Reference

  • workspace_save: persist code to outputs/scripts/ (or outputs/notebooks/), figures to outputs/figures/, processed data to sources/data/. Commit message prefix: Add: / Update:.
  • workspace_append: add results to an existing report or data file without overwriting. Preferred over read + save for incremental updates.
  • workspace_download: save binary outputs (plots, exports) from URLs.
  • exec: run scripts from workspace root. Default timeout 120s (increase for long-running). Always inspect both stdout and stderr. On failure: fix code, workspace_save again, re-run.

Related Research-Plugins Skills

For detailed methodology beyond this SOP, browse these RP skill indexes:

Index pathSkillsCovers
tools/code-exec/7Jupyter, Colab, Kaggle, reproducibility (Python/R)
analysis/statistics/10Hypothesis testing, Bayesian, meta-analysis, SEM, survival
analysis/econometrics/12Causal inference, panel data, IV, DiD, time series, Stata
analysis/wrangling/10pandas, data cleaning, missing data, survey, text mining
analysis/dataviz/14matplotlib, plotly, D3, publication figures, geospatial, networks
domains/ai-ml/27PyTorch, TensorFlow, LLM eval, experiment tracking, ML pipelines
tools/diagram/9Mermaid, PlantUML, GraphViz, flowcharts, scientific diagrams
domains/14716 disciplines — browse domains/{field}/ for domain-specific analysis methods

Heefeg gestallte Froen

Wat mécht de KI-Skill Coding SOP?

Standard operating procedure for research experiments, data analysis, and visualization. Covers Python/R script execution, statistical analysis, data wrangling (pandas/tidyverse), publication-quality figures (matplotlib/plotly/ggplot2), and experiment reproducibility.

Firwat Coding SOP op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Coding SOP besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Coding SOP an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/wentorai/Research-Claw/tree/main/skills/coding-sop an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Coding SOP benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Coding SOP benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Coding SOP domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Coding SOP gratis?

wentorai huet de Skill op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇