refactor-research-code

refactor-research-code is a skill for Claude Code, Codex from ShaishavMaisuria/research-paper-lifecycle-skills. It costs 60 tokens per session (3,265 once invoked), scanned A, original, Apache-2.0.

A cleanup workflow for research code that prepares a repository for public release while preserving the results reported in a paper.

In plain words
What is it for?
It helps organize files, remove unused experiment code, extract configuration, document how to run the project, and prepare double-blind releases.
Why use it?
Research repositories often contain dead experiments, hardcoded paths, undocumented steps, and identifying details. It separates harmless cleanup from changes that might alter results and asks before making risky changes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is python3 ../reflect-and-improve/scripts/reflect_log.py append \.

Good fit It helps organize files, remove unused experiment code, extract configuration, document how to run the project, and prepare double-blind releases.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/ShaishavMaisuria/research-paper-lifecycle-skills
agentmods
npx agentmods add skills/shaishavmaisuria/research-paper-lifecycle-skills/refactor-research-code

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 refactor-research-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/shaishavmaisuria/research-paper-lifecycle-skills/refactor-research-code/github.svg)](https://agentmods.dev/skills/shaishavmaisuria/research-paper-lifecycle-skills/refactor-research-code)
Your own site
<a href="https://agentmods.dev/skills/shaishavmaisuria/research-paper-lifecycle-skills/refactor-research-code"><img src="https://agentmods.dev/badge/skills/shaishavmaisuria/research-paper-lifecycle-skills/refactor-research-code/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for refactor-research-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/shaishavmaisuria/research-paper-lifecycle-skills/refactor-research-code"><img src="https://agentmods.dev/badge/skills/shaishavmaisuria/research-paper-lifecycle-skills/refactor-research-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,265 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00060 $0.03265
Opus 5 $0.00030 $0.01632
Sonnet 5 $0.00012 $0.00653
Haiku 4.5 $0.00006 $0.00327

Measured 12d ago against content hash 46cc91e92790, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

refactor-research-code 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 12d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/release_audit.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/refactor-research-code/SKILL.md · 239 lines

How it starts

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

Refactor Research Code

Take a research repo from "works on my machine" to a clean, documented, re-runnable public release — without changing a single number the paper reports. Research code accretes dead experiment branches, hardcoded paths, magic hyperparameters, an undocumented "run this file, then that one" ritual, and identifying breadcrumbs. This skill removes that cruft and gives the repo a sensible layout, but it treats result preservation as the prime directive: it classifies every proposed change as safe (mechanical, behavior-preserving) or ask-first (could move the numbers), and it never touches an ask-first item without the author's explicit say-so.

It is not generic refactoring (no perf rewrites, no "modernize the API," no restructuring for its own sake). The only goal is release readiness with identical behavior. When a "cleanup" would change what the code computes, the right move is to flag it and ask — not to make the repo prettier at the cost of the paper's claims.

When to use

  • "Clean up / refactor my research code for release." / "It's a mess — get it publishable."
  • "Remove the dead experiment branches and commented-out code."
  • "Separate config from code." / "These hyperparameters are hardcoded everywhere."
  • "Make my runs deterministic / re-runnable." / "Document the entrypoint."
  • "Give the repo a clear layout." / "Strip my identity for double-blind."
  • Before test-research-code (which adds tests/seeds/env) and prepare-artifacts (which packages and hosts for a badge) — this is the structural cleanup that comes first.

What this is NOT (route elsewhere)

You want… Use instead
Add smoke tests, pin seeds, capture the environment test-research-code
Package + archival DOI/SWHID + badge taxonomy + appendix prepare-artifacts
Deep double-blind sweep of the paper + reversible de-anon anonymize-paper
Confirm the produced numbers match the paper's tables verify-results
Reorganize the paper's sections/argument refactor-structure

Read the full file on GitHub · 239 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago First seen · 239 lines · 60 tokens per session scan A 46cc91e92790

Subscribe to this mod's changes

refactor-research-code is a skill published in the GitHub repository ShaishavMaisuria/research-paper-lifecycle-skills (42 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 60 tokens to every session and 3,265 once invoked, about $0.0003 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

aaai-reproducibility

Use when strengthening an AAAI paper's reproducibility checklist (placed after references), experimental traceability, seed and hyperparameter reporting, compute and cost disclosure, dataset access and licensing, code/data ZIP readiness, and the claim-to-evidence map that Phase-1 reviewers use to judge rigor across…

brycewang-stanford/Awesome-Journal-Skills · 72 tokens

acl-reproducibility

Use when strengthening reproducibility evidence for an ACL paper reviewed through ACL Rolling Review, covering the Responsible NLP checklist end to end, hyperparameter and compute reporting, prompt and decoding disclosure for LLM experiments, data contamination auditing, variance across runs, and checklist-to-paper…

brycewang-stanford/Awesome-Journal-Skills · 60 tokens

aaai-experiments

Use when designing or auditing AAAI experiments for the broad-AI program committee, including baselines, ablations, statistical significance, robustness, human evaluation, AI-for-Social-Impact and alignment/safety evidence, compute and cost reporting, and reproducibility-checklist alignment for Phase-1 survival.

brycewang-stanford/Awesome-Journal-Skills · 66 tokens

aaai-topic-selection

Use when deciding whether a project is a strong AAAI submission across its broad AI scope, should be reframed or routed to a dedicated track such as AI for Social Impact or AI Alignment, or should instead go to IJCAI, NeurIPS, ICML, ICLR, AISTATS, UAI, ACL, CVPR, KDD, CHI, ICRA, or another specialist venue.

brycewang-stanford/Awesome-Journal-Skills · 88 tokens

acl-experiments

Use when designing or auditing experiments for an ACL paper, covering tuned LLM baselines, multi-dataset and multilingual evaluation, statistical significance and variance, human evaluation with agreement reporting, contamination and prompt-sensitivity controls, ablations, and error-analysis expectations in NLP…

brycewang-stanford/Awesome-Journal-Skills · 59 tokens

acmmm-experiments

Use when designing or auditing the experiments of an ACM MM (ACM Multimedia) paper — matched baselines per modality, ablations that isolate the cross-modal fusion, user studies or QoE measurement where the claim is subjective, dataset and media licensing, and honest compute reporting, so evidence supports a multimedia…

brycewang-stanford/Awesome-Journal-Skills · 68 tokens