scientific-coding — Claude Code plugin: what it does, how to install
Adds twelve scientific programming principles to Claude Code. It enforces strict reproducibility and immutable raw data instead of industry-style defaults.
/plugin marketplace add anthropics/claude-plugins-community
/plugin install scientific-coding@claude-communityWhat scientific-coding does
This plugin triggers automatically during simulation and numerical analysis. It reshapes how Claude Code approaches research problems. Truth matters more than user convenience. The agent must fail loudly rather than return an unnoticed incorrect result.
The repository stores guidelines in SKILL.md alongside catalogs in examples/common-mistakes.md. Claude Code is instructed to require explicit units and random seeds. Hardcoded defaults inside functions are banned. All parameters belong in external configuration files.
The skill also enforces a hard boundary on edits. It forbids refactoring validated research code. Once calculations match reality checks and conservation laws, rewriting them for style is prohibited.
What it helps with
- prevent silent numerical failures by forcing code to crash loudly
- guarantee reproducible runs through pinned versions and explicit seeds
- protect raw experimental datasets from in-place modifications
- stop unwanted refactoring of already validated scientific routines
Example prompts for the agent
- Run a numerical simulation for this system and validate against known conservation laws
- Compute statistical effect sizes on this dataset without p-hacking
- Implement this numerical solver with explicit unit conversions and shape checks
How to install scientific-coding
Plugin marketplace
/plugin marketplace add anthropics/claude-plugins-community/plugin install scientific-coding@claude-communityStep by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own
Questions about scientific-coding
How to install scientific-coding in Claude Code?
Run /plugin marketplace add anthropics/claude-plugins-community in Claude Code, then run /plugin install scientific-coding@claude-community.
What does scientific-coding do?
It teaches Claude Code twelve core principles for scientific computing. The agent prioritizes correctness and numerical stability over execution performance.
How does the plugin handle defaults and configuration?
It prohibits hardcoded default parameters in source code. All experiment parameters must be specified explicitly or defined within dedicated configuration files.
Source text
SKILL.md · MIT
# Scientific Coding Skill
A [Claude Code plugin](https://code.claude.com/docs/en/plugins) that teaches Claude to write correct scientific code.
Scientific code serves truth, not users. This plugin encodes the principles that follow from that distinction: fail loudly instead of silently, require explicit parameters instead of dangerous defaults, prioritize correctness over convenience.
## Install
### As a plugin (from GitHub)
In Claude Code, run:
```
/plugin marketplace add cemde/Scientific-Coding-Skill
/plugin install scientific-coding@cemde-Scientific-Coding-Skill
```
The first command adds this repo as a plugin marketplace. The second installs the skill from it. The skill will be available in all your projects.
### As a standalone skill (copy into your project)
Clone the repo and copy the skill directory:
```bash
# Into a single project
cp -r Scientific-Coding-Skill/skills/scientific-coding your-project/.claude/skills/
# Into all your projects (personal skills)
cp -r Scientific-Coding-Skill/skills/scientific-coding ~/.claude/skills/
```
### For local development
```bash
claude --plugin-dir /path/to/Scientific-Coding-Skill
```
## What It Does
The skill activates automatically when Claude writes code for scientific computing, data analysis, simulations, numerical methods, or statistical analysis. 12 principles:
1. **Understand the experiment** before deciding what to parameterize
2. **You are a co-researcher** -- ask questions, verify, read papers
3. **Fail loudly** -- a crash beats a silently wrong result
4. **No defaults in code** -- defaults belong in config files
5. **Be explicit** about units, shapes, assumptions, conversions
6. **Correctness over performance** -- numerical stability first
7. **Raw data is immutable** -- never modify, always trace
8. **Reproducibility is non-negotiable** -- explicit seeds, pinned versions
9. **Validate against reality** -- known solutions, conservation laws, convergence
10. **Statistical honesty** -- no p-hacking, report effect sizes
11. **Do not reinvent** -- use established tools, skip custom infrastructure
12. **Do not refactor validated code** -- working science code is sacred
See [skills/scientific-coding/SKILL.md](skills/scientific-coding/SKILL.md) for the full set of principles.
## Structure
```
Scientific-Coding-Skill/
├── .claude-plugin/
│ ├── plugin.json # Plugin manifest
│ └── marketplace.json # Marketplace catalog
├── skills/
│ └── scientific-coding/
│ ├── SKILL.md # Core principles
│ └── examples/
│ ├── common-mistakes.md
│ └── full-analysis.md
└── README.md
```
## Contributing
Contributions are welcome. In particular:
- **Validation experiments.** Have you tested whether this skill actually changes Claude's coding behavior? We would love to see before/after comparisons, failure cases, or systematic evaluations.
- **New principles or examples.** If you have encountered a scientific coding mistake that LLMs make repeatedly, open an issue or PR.
- **Corrections.** If a principle is wrong, misleading, or missing nuance, say so.
Open an issue or submit a pull request at [github.com/cemde/Scientific-Coding-Skill](https://github.com/cemde/Scientific-Coding-Skill).
## Acknowledgements
This skill was developed through iterative refinement between a researcher and Claude, attempting to bridge the gap between how LLMs are trained to write code (for production) and how scientific code must be written (for truth). Contributions, criticism, and validation experiments from the community are appreciated.
## Citation
If you use this skill in your research or reference it in a publication, see [CITATION.cff](CITATION.cff).
```bibtex
@software{emde2025scientificcoding,
author = {Emde, Cornelius},
title = {Scientific Coding Skill},
year = {2025},
url = {https://github.com/cemde/Scientific-Coding-Skill},
version = {0.1.0}
}
```
© cemde · MIT · cemde/Scientific-Coding-Skill