analysis-code-conventions

Routes analysis code decisions to conventions for stages, helpers, dataflow, and R/Python style.

1|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/tony-zhelonkin/scio --skill analysis-code-conventions-tony-zhelonkin
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: analysis-code-conventions
Source: https://github.com/tony-zhelonkin/scio/tree/main/skills/analysis-code-conventions
Command: npx skills add https://github.com/tony-zhelonkin/scio --skill analysis-code-conventions-tony-zhelonkin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Analysis codebases in computational biology projects accumulate inconsistent structure: stages bloated with implementation detail, helpers without clear boundaries, unrecoverable intermediate state, and R/Python idioms that pass review but fail at runtime. This Skill provides a routing layer that directs each structural or line-level decision to the right convention guide before code is written or reviewed. ## Core Features & Use Cases - Decision routing tree: Classifies the decision at hand (stage visibility, helper family design, restartability, promotion, language style) and loads the matching reference guide. - Five in-depth references: Covers stage narrative readability, helper-family API design, checkpoint and cross-stage data contracts, promotion-to-package readiness, and house R/Python idiom including common runtime traps. - Boundary routing: Defers figure design, assay-specific methodology, notebook exploration, and architecture planning to the skills that own them, keeping conventions non-overlapping. - Use Case: When refactoring a 02_analysis stage that mixes parsing logic with scientific narrative, load the stage-narrative and helper-family-apis references to decide what stays visible, what moves behind a named entry point, and how the handoff is checkpointed. ## Quick Start Ask the assistant to review or refactor an analysis stage in 02_analysis using the analysis code conventions, and it will route the decision to the appropriate reference guide before editing.

Frequently Asked Questions about analysis-code-conventions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure analysis stages for readability?▼

Keep the stage readable in story order: visible inputs, consequential operations named in domain language, checks that gate execution, and explicit outputs. Move parsing, reshaping, and tool mechanics behind named helper entry points so reviewers follow the analysis without simulating implementation.

When should R or Python helpers become a package?▼

Promote a helper family when two or more projects need it without project-specific edits, callers rely on a stable conceptual API, and independent tests can express its behavior. Keep it local while vocabulary remains dataset-specific or the API changes with each analysis question.

How do I make an analysis pipeline restartable?▼

Place checkpoints at boundaries where recovery avoids meaningful compute, record the inputs and configuration that make state current, and use write-then-rename for outputs. Verify by running fresh, resuming from each checkpoint, and confirming changed inputs invalidate dependent state.

What R coding mistakes pass review but fail at runtime?▼

Common traps include 1:length(vec) iterating on empty vectors, using T instead of the reserved TRUE, growing vectors with c() in loops, attach() hiding scope, and <<- assigning to unknown locations. Use seq_along, TRUE, vapply, and explicit returns instead.

When should I not use analysis code conventions?▼

Skip this Skill for one-off exploratory notebooks with no durable analysis boundary, purely scientific choices where code placement is already settled, and requests to change lint predicates, which require separate evidence and design work.