Agent skill

refactoring-03-config-reproducibility

Use when improving run configuration, seeding, and reproducibility for Python research code.

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/refactoring-03-config-reproducibility

SKILL.md

Refactoring 03: Config and Reproducibility

Goal

Make experiments reproducible by centralizing configuration, controlling randomness, and recording run metadata.

Sequence

  • Order: 03
  • Previous: refactoring-02-dependencies-env
  • Next: refactoring-04-data-io-validation

Workflow

  • Centralize runtime parameters into a config object or file (YAML/TOML/argparse).
    • Success: All run parameters are set through a single config surface.
  • Seed all RNGs (Python, NumPy, framework) and make the seed a first class parameter.
    • Success: Runs are repeatable with the same seed.
  • Record metadata: config snapshot, git commit hash, and environment info with outputs.
    • Success: Each run output includes config and environment metadata.
  • Create a consistent output directory layout for artifacts and metrics.
    • Success: Outputs follow a documented directory structure.
  • Remove hidden global state and implicit defaults where possible.
    • Success: Behavior is driven by explicit parameters.

Guardrails

  • Keep config changes backward compatible when possible.
  • Do not add heavy config frameworks unless required.
  • Favor explicit parameters over environment variables.

Didn't find tool you were looking for?

Be as detailed as possible for better results