بنقرة واحدة
script-opinions
Opinions for standalone Python scripts. Analysis runs, HPC jobs, batch processing.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Opinions for standalone Python scripts. Analysis runs, HPC jobs, batch processing.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Style guidelines for writing manuscript text.
Job dispatch infrastructure. Use when packaging a python script for batch / parallel execution, locally or on SLURM.
Guide for controlling Adobe Illustrator via MCP tools and osascript.
Extract scientific journal article PDFs to lossless Markdown using MinerU. Assumes a pre-existing conda env named "mineru".
Agent roles, models, and the dispatch pattern for delegating to subagents.
Executive role for an agent that dispatches subagents.
| name | script-opinions |
| description | Opinions for standalone Python scripts. Analysis runs, HPC jobs, batch processing. |
Scripts must be stateless, headless, reproducible, observable. This extends the coding-style skill for standalone Python scripts.
Scripts should be:
These exist to make scripts debuggable on a cluster you don't control — they are infrastructure, not style.
sys.path hacks. Anchor imports to __file__ or pip-install the repo.logging only. logger.info/debug not print. (Same: match existing frameworks if present.)plt.show(), display(), input(). Use headless backends.logs/, artifacts/.<path>.tmp, then os.replace(tmp, path). For checkpoints and anything preemption could corrupt.ImportError at top level unless truly optional.The skeleton is a floor, not a ceiling — instrument, annotate, and structure the core logic however best serves the script. Use @dataclass by default; pydantic.BaseModel only for runtime validation.
@dataclass ExperimentConfig — typed, flat, hierarchical field names.parse_args() -> ExperimentConfig — argparse. Pull defaults from dataclass.setup_dir_save(config) -> str — creates dir_save/{logs,artifacts,checkpoints}.setup_logging(dir_save, level) — dual handlers: FileHandler(logs/run.log) + StreamHandler(stdout). Both get the full log — no post-hoc copying from SLURM stdout.set_determinism(seed, deterministic_torch=True), save_config(dir_save, config) (writes .yaml or .json).run_experiment(config, logger) — the scientific meat. Readable, flat. The design here is yours — bring judgment about what to measure, log, and save.main() wires: parse → dir → log → config → determinism → run.<dir_save>/
├── config.yaml # parsed args snapshot
├── logs/run.log # mirrored to stdout
├── artifacts/ # arrays, metrics, figures
└── checkpoints/ # optional; resumable state
--dir_save, --name_run, --path_config, --path_data_*, --seed, --deterministic, --save-plots, --checkpoint-every-seconds, --resume.
--checkpoint-every-{seconds,steps} + --resume. Atomic writes. Validate checkpoint before new work.