Use when a user asks you to study their research codebase + papers and become capable of independent work in their domain. Systematically explore source code, configs, job scripts, and publications to extract reusable patterns, coding conventions, and workflow knowledge.
Installation
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Use when a user asks you to study their research codebase + papers and become capable of independent work in their domain. Systematically explore source code, configs, job scripts, and publications to extract reusable patterns, coding conventions, and workflow knowledge.
version
2.0.0
license
MIT
Scientific Codebase Methodology Distillation
Overview
Distill a scientific computing project into reusable methodology. The process: study a domain expert's research stack — papers, multi-language source code, configuration files, job submission scripts, plotting conventions — and extract the patterns and workflow knowledge needed to independently extend the research to new problems.
The goal is to learn the methodology, not copy the code. Architecture decisions, data flow, naming conventions, config patterns, and quality standards are what make research reproducible and extensible.
When to Use
"Study my code and learn to work independently in my domain"
Onboarding into a new research project that has both code and publications
You want a mental model of what lives where, before reading any single file.
Phase 2: Read the Paper First
Read the paper or technical report before the code. The paper provides:
Problem motivation and definitions
The "headline" methodology (what the code implements)
Expected results and precision targets
Use pdftotext or PyMuPDF/fitz if available. Extract abstract, methodology, and results sections.
Without the paper, you will misunderstand why the code makes specific choices.
Phase 3: Read Existing Methodology Docs
If a SKILL.md, README, or design document already exists, read it completely before touching code. It tells you what the user thinks their methodology is. The gap between this and the actual code is where the most valuable distillation happens.
Also check for supplementary reference repos (group conventions, methodology indexes, internal wikis). They often hold conventions the codebase itself does not document.
Phase 4: Deep Code Exploration (Order Matters)
Read in this priority — highest signal-per-file first:
Config / template files (YAML, JSON) — reveal parameter space and conventions instantly
Main entry points (train.py, main(), example.cpp) — reveal the full pipeline
Core algorithm files — the actual training, inference, or extraction logic
Common pitfalls — failure modes (silent / wrong / crash)
Keep code snippets at the pattern level — show the shape, not the full implementation. Reference source paths for the complete code.
Optimize the entire skill directory, not just the main document. Review templates/, references/, and scripts/ for files that should be updated based on what you learned from the codebase.
Phase 8: Save Persistent Memory
Save durable, cross-session facts:
Server connection details
Key directory paths
Coding style preferences
Naming conventions
Tool choices (e.g., specific plotting libraries, custom style modules)
Do not save task progress or temporary state.
Common Pitfalls
Reading files in random order. Configs → entry points → algorithms → utilities maximizes information per file read.
Trusting the existing skill at face value. Existing documentation may describe an aspirational version, not what production code actually does. Always cross-reference.
Copying code instead of patterns. Reference paths to real code; do not duplicate it in the skill.
Missing the cross-language bridge. ONNX / protobuf / file handoff is often the most important architectural insight and the easiest to overlook.
Ignoring job scripts. They reveal the gap between "works locally" and "runs in production".
Over-saving to memory. Only save stable facts. Never save task state.
Reading code before the paper. Without the conceptual framework, you will misunderstand the why behind code choices.
Verification Checklist
Paper abstract and methodology section read
Full directory tree mapped (≥ 2 levels)
All config formats identified, one example read per format