data-analysis

data-analysis is a skill for Claude Code, Codex from pedrohcgs/claude-code-my-workflow. It costs 104 tokens per session (1,617 once invoked), scanned A, original, MIT.

An end-to-end R workflow for exploring a dataset, cleaning it, running regression analysis, and producing tables and charts suitable for publication. R is a programming language commonly used for statistics and data analysis.

In plain words
What is it for?
Use it with a CSV, RDS, or Stata dataset when you need summary exploration, cleaning, regressions, publication-ready figures and tables, and saved analysis objects.
Why use it?
It organizes the analysis and checks the data and project conventions before code is written, reducing errors such as using nonexistent variables or saving results in the wrong place.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/pedrohcgs/claude-code-my-workflow/data-analysis
Any agent
npx skills add pedrohcgs/claude-code-my-workflow --skill data-analysis
Clone the repo
git clone --depth 1 https://github.com/pedrohcgs/claude-code-my-workflow

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for data-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/pedrohcgs/claude-code-my-workflow/data-analysis.svg)](https://agentmods.dev/skills/pedrohcgs/claude-code-my-workflow/data-analysis)
Your own site
<a href="https://agentmods.dev/skills/pedrohcgs/claude-code-my-workflow/data-analysis"><img src="https://agentmods.dev/badge/skills/pedrohcgs/claude-code-my-workflow/data-analysis.svg" alt="Measured on agentmods" height="20"></a>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,617 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00104 $0.01617
Opus 5 $0.00052 $0.00809
Sonnet 5 $0.00021 $0.00323
Haiku 4.5 $0.00010 $0.00162

Measured 4d ago against content hash 3a4e0fcec292, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

data-analysis scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/data-analysis/SKILL.md · 167 lines

How it starts

The opening of the file, as written. The whole thing — 167 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Data Analysis Workflow

Run an end-to-end data analysis in R: load, explore, analyze, and produce publication-ready output.

Input: $ARGUMENTS — a dataset path (e.g., data/county_panel.csv) or a description of the analysis goal (e.g., "regress wages on education with state fixed effects using CPS data").


Constraints

  • Follow R code conventions in .claude/rules/r-code-conventions.md
  • Save all scripts to scripts/R/ with descriptive names
  • Save all outputs (figures, tables, RDS) to scripts/R/_outputs/
  • Use saveRDS() for every computed object — Quarto slides may need them
  • Use project theme for all figures (check for custom theme in .claude/rules/)
  • Run r-reviewer on the generated script before presenting results

Workflow Phases

Phase 0: Pre-Flight Report

Before writing any analysis code, produce a Pre-Flight Report showing you read the inputs. This prevents the common failure mode where the agent hallucinates variable names or skips project conventions.

Output block (in your response to the user, before Phase 1):

## Pre-Flight Report

**Dataset:** [path]
- Variables found: [list from head()/names()]
- Rows: [count]
- Key types: [e.g., "outcome=numeric, treatment=binary, state=factor"]
- Missing-data summary: [% missing per key var]

**Project conventions read:**
- `.claude/rules/r-code-conventions.md` — [one-line summary of most relevant rule]
- `.claude/rules/content-invariants.md` — [INV-9, INV-10, INV-11, INV-12 applicable]

**Task interpretation:** [one sentence restating what the user asked for]

**Plan:** [3-5 bullet outline of the R script structure]

If any input cannot be read (missing file, unreadable format), stop and ask the user before proceeding.

Phase 1: Setup and Data Loading

  1. Create R script with proper header (title, author, purpose, inputs, outputs)
  2. Load required packages at top (library(), never require())
  3. Set seed once at top in YYYYMMDD format (per r-code-conventions.md), e.g. set.seed(20260415) (INV-9)
  4. Load and inspect the dataset

Read the full file on GitHub · 167 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 167 lines · 104 tokens per session scan A 3a4e0fcec292

Subscribe to this mod's changes

data-analysis is a skill published in the GitHub repository pedrohcgs/claude-code-my-workflow (1,556 stars, last pushed 10d ago), licensed MIT. It adds 104 tokens to every session and 1,617 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

paper-workflow

经管 / 社科实证论文全流程 meta-orchestrator:把选题、设计、数据、估计、方法闸门、 表图、写作、去 AI 味、质量门、修订、投稿与复盘编排成 Stage 0–9 可断点续跑流水线。 本 skill 不重复实现子能力,而是按阶段调用既有 skill 或并行 subagent,并在 Stage 3–4 路由 Python/StatsPAI、Stata、R 三种分析后端,Stage 9 交付一份含正文+表+图+参考文献的 Word 全文定稿(09submission/main.docx,另可出 .tex)。触发:/paper-workflow、 帮我写一篇实证论文、从选题到投稿、端到端 empirical…

brycewang-stanford/Paper-WorkFlow · 262 tokens

fin-paper-convert

Compile LaTeX to PDF and convert to target journal format.

csmar432/finai-research · 12 tokens

aer-consistency

Use when auditing a finished or near-finished AER, AER:Insights, or AEJ manuscript for internal consistency: headline numbers across abstract, introduction, results, and tables; sample sizes; log-point and percentage-point conversions; cross-references; and in-text-citation/bibliography matching. Apply after the body…

brycewang-stanford/AER-Skills · 85 tokens

econ-management-paper-polish

Writing, revision, review, evidence, journal adaptation, and method-safety support for economics, management, finance, accounting, marketing, information systems, public administration, and related business-school papers. Routes by discipline, subfield, language, method, outlet, section, and task mode while preserving…

linkingoscar/econ-management-paper-polish · 139 tokens

did-causal

Use this Skill when the user needs to estimate causal treatment effects using difference-in-differences (DID) designs: two-way fixed effects (TWFE) regression, parallel trends pre-testing, Callaway-Sant'Anna staggered adoption estimator, and Goodman-Bacon decomposition. Covers both Python (linearmodels) and R (did…

xjtulyc/awesome-rosetta-skills · 75 tokens

add-native

Public entry point for native device capabilities and native controls — camera, image picker, barcode/QR scanner, document picker, file picker, secure storage, file system, sharing, PDF generation/viewing, pen/signature capture, background GPS/geolocation tracking, or supported local file workflows — in a Power Apps…

microsoft/power-platform-skills · 96 tokens