Rseng Reproducible Environmentsのロゴ

Rseng Reproducible Environments

コミュニティ
fdiblen
rseng-reproducible-environments

Covers making research software environments reproducible: pinning a language version and its dependencies in a per-project virtual environment, choosing a package/environment manager, and packaging code and its full stack into a container. Use when the user asks how to set up venv/conda/poetry/uv/renv, lock or pin dependencies, share a runnable environment, escape "dependency hell" or "works on my machine", write a Dockerfile, build an Apptainer/Singularity image for HPC, or decide between a virtual environment and a container. For regenerating a project's results end to end see rseng-reproducibility; for environments of multi-step pipelines see rseng-workflows.

概要

公開者fdiblen
リポジトリrseng-agent-skills
スキル名rseng-reproducible-environments
スター
26
フォーク
2
同梱ファイル
1
ライセンスCC-BY-4.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    fdiblenがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Rseng Reproducible Environments」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/fdiblen/rseng-agent-skills/tree/main/skills/rseng-reproducible-environments
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/fdiblen/rseng-agent-skills.git /tmp/rseng-agent-skills
mkdir -p .claude/skills
cp -r /tmp/rseng-agent-skills/skills/rseng-reproducible-environments .claude/skills/rseng-reproducible-environments
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでRseng Reproducible Environmentsを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にRseng Reproducible Environmentsを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Rseng Reproducible Environmentsは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Reproducible software environments

Use this skill when software must behave the same on another machine, a cluster, a CI runner, or a reviewer's laptop as it does on the author's. Two complementary tools deliver this: a per-project virtual environment that isolates the language interpreter and its libraries, and a container that packages the code together with its entire dependency stack. Reach for the virtual environment when developing or modifying code in one language; reach for the container when the environment must travel across machines, platforms, or pipelines unchanged.

Pick the right level of isolation

Match the tool to how far the software has to travel and what it depends on:

  • Language-specific virtual environment - isolates one interpreter/compiler version plus library versions for a single project. Default choice while developing, running, or modifying someone's code in one language.
  • Container (Docker, Apptainer/Singularity, Docker Compose) - packages the whole environment, including non-language system libraries and OS-level config. Choose when the code must run unchanged across collaborators' machines, clusters, or cloud, or plug into CI/CD.
  • System-level tools (Vagrant, NixOS, Packer) - reproduce a whole machine image or OS configuration as code. Use when the OS itself is part of what must be reproduced.
  • Workflow environments (Nextflow, Snakemake, Galaxy, CWL/WDL) - manage reproducible environments for multi-step, multi-tool analysis pipelines; hand off to the workflows skill for these.

Decision rule: developing in one language -> virtual environment; must run identically elsewhere, has system-level dependencies, or feeds CI/CD -> container; the OS is part of the artifact -> system-level tool; a multi-step pipeline -> workflow manager.

Always work inside a per-project virtual environment

A virtual environment gives each project its own interpreter version and its own library versions, so projects with clashing requirements coexist without interference:

  • Create one environment per project, never one global environment shared across everything - global installs cause silent version clashes and the "spaghetti setup" where nobody knows which dependency is actually in use.
  • Keep environments small and scoped; add libraries to a project's own environment as the project needs them.
  • Use separate environments to run legacy and current code side by side (e.g. a Python 2 project alongside a new Python 3 one), and to test a dependency upgrade on a branch without disturbing the working version.
  • Sharing a description of the environment is what makes work portable, reusable, and reproducible - it lets others recreate the same setup and run or extend the software.

Choose one package and environment manager, then commit to it

You need a package manager (install/update/remove libraries) and an environment manager (create/isolate environments); some tools do both. Pick per language and stick with it - mixing ad-hoc tools is a common source of breakage:

  • Python, pure-Python dependencies: venv + pip, or a combined tool like Poetry or uv (uv is a fast single tool that replaces pip and venv).
  • Python with non-Python (e.g. C/C++) dependencies or multi-platform scientific stacks: Conda, which distributes non-Python packages and manages its own environments.
  • R: renv. Julia: Pkg.jl. C++: Conan. Java: Maven. Ruby: Bundler.
  • Cross-language / HPC generic managers: Spack, Nix/NixOS, Guix.

Tie-breakers when several tools fit: prefer what the project, team, or community already uses so help is available, then personal preference. State the chosen tool explicitly so contributors do not each reach for a different one.

Pin dependencies for reproducibility

Sharing a runnable description of the environment is the deliverable, not just the code:

  • Record the exact interpreter/compiler version and library versions the software is known to work with, and commit that manifest with the code: pyproject.toml + a native lockfile from a modern manager such as uv, environment.yml, renv.lock, Manifest.toml. A bare requirements.txt is an export format, not a project definition.
  • One-off scripts count too: give them PEP 723 inline script metadata and run them with uv run script.py, which resolves and pins the declared dependencies on the fly and replaces the loose requirements.txt-next-to-a-script pattern entirely.
  • Prefer a lockfile that pins transitive dependencies exactly when bit-for-bit reproducibility matters; a loosely pinned manifest that floats to the latest compatible version is fine for actively developed code that must track upstream.
  • Pin tightly (exact versions) for released, cited, or result-producing software; pin loosely (compatible ranges) for libraries meant to stay current - and say which policy the project follows.
  • When a project is locked to an older dependency, isolate the upgrade attempt in its own environment/branch rather than upgrading in place.

Containerize when the environment must travel

Containers bundle code plus every dependency and configuration so developers, collaborators, and reviewers run the identical setup, ending dependency hell and "works on my machine" failures. Reach for a container when:

  • the software needs specific libraries, versions, or system configuration;
  • it must run across different machines, clusters, or cloud environments;
  • it has to slot into automated workflows or CI/CD;
  • long-term reproducibility and scalability matter.

Benefits to explain when recommending one: reproducibility and portability, fast onboarding (collaborators just pull and run), version control (tag images to code versions), automation-friendliness (build images in CI/CD), and lower overhead than full virtual machines.

Build a Docker image (general-purpose, cloud, networked services)

Standard recipe for a Python project:

  • Start from a minimal, explicit base image, e.g. python:3.10-slim, or ubuntu:22.04 for a general Linux base - pin the tag, never rely on latest.
  • Copy in the project, install dependencies from the committed manifest, and declare the entry point.
  • Use multi-stage builds to keep the final image small when build tools are not needed at runtime.
FROM python:3.10-slim
WORKDIR /app
COPY . .
RUN pip install -r requirements.txt
CMD ["python", "script.py"]
  • Run, mounting data instead of baking it in: docker run --rm -v /path/to/data:/data my-image:1.0.0 python /data/experiment.py
  • Expose ports for interactive/networked services: docker run -p 8080:80 my-image:1.0.0
  • Distribute via a registry with a version tag, then push/pull: docker tag my-image:1.0.0 user/my-image:1.0.0 && docker push user/my-image:1.0.0
  • Tag images to match code versions so an image is traceable to a commit or release.

Build an Apptainer/Singularity image (HPC, no root)

Prefer Apptainer (formerly Singularity) on clusters where users lack root access; it is built for reproducible science and large-scale workloads:

  • Build a .sif file, reusing an existing Docker image when convenient: apptainer build my_container.sif docker://python:3.10-slim
  • Run: apptainer exec my-container.sif python /data/experiment.py
  • Version by naming the file, e.g. my-container-v1.0.0.sif, and store it in institutional or shared storage.
  • Apptainer generally does not support Docker-style port mapping; for networked services prefer Docker.

Wire containers into CI/CD

Run tests inside the same image the software ships in, so CI reproduces the production environment. Reference the custom image as the job image and run the test suite against it; install only extra dependencies not already baked in. This keeps test and deployment steps consistent and lets image builds themselves be automated.

Working with this skill

The generated references.md beside this file lists the source material and pointers:

  • references.md - verified Learn more pointers

Learn more (verified):

Parity between dev and the shipped runtime

When a project runs both bare (dev) and containerized (compose, production), the two environments drift: an env var set in the shell but absent from compose, a dependency in the image but not the lockfile, different service hostnames. Declare shared configuration ONCE (.env.example consumed by both), derive the image from the same lockfile the dev environment uses, and treat "works locally, fails in compose" as an environment diff to be found (rseng-debugging reads the startup logs; rseng-testing's entry-point check catches it before handoff).

Related skills

Check whether any of these applies before moving on:

  • rseng-dependency-management - pinning policy and update cadence
  • rseng-hpc-computing - Apptainer on clusters without root
  • rseng-legacy-code - running old code in isolated environments
  • rseng-notebooks - kernel environments belong in lockfiles
  • rseng-security - scanning images and pinned dependencies
  • rseng-workflows - per-step environments in pipelines

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Rseng Reproducible Environments」では何ができますか?

Covers making research software environments reproducible: pinning a language version and its dependencies in a per-project virtual environment, choosing a package/environment manager, and packaging code and its full stack into a container. Use when the user asks how to set up venv/conda/poetry/uv/renv, lock or pin dependencies, share a runnable environment, escape "dependency hell" or "works on my machine", write a Dockerfile, build an Apptainer/Singularity image for HPC, or decide between a virtual environment and a container. For regenerating a project's results end to end see rseng-repr...

TypingMindでRseng Reproducible Environmentsを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Rseng Reproducible Environmentsはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにRseng Reproducible Environmentsをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/fdiblen/rseng-agent-skills/tree/main/skills/rseng-reproducible-environmentsを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Rseng Reproducible Environmentsを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Rseng Reproducible Environmentsで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもRseng Reproducible Environmentsを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Rseng Reproducible Environments」は無料ですか?

はい。fdiblenがCC-BY-4.0ライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇