environments

environments is a skill for Claude Code, Codex from langchain-ai/open-swe. It costs 84 tokens per session (1,227 once invoked), scanned A, original, MIT.

Instructions for creating and changing Open SWE environments, which are saved sandbox setups containing project files, tools, and configuration. They explain how to build and publish those setups for later runs.

In plain words
What is it for?
They help administrators create, edit, rebuild, inspect logs for, and publish sandbox environments.
Why use it?
They clarify who may change an environment, where changes must be made, and how to avoid publishing incomplete setups or leaving secrets in them.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one.

Good fit They help administrators create, edit, rebuild, inspect logs for, and publish sandbox environments.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/langchain-ai/open-swe/environments
About the project

Open SWE is an open-source software factory that gives coding tasks to an asynchronous agent, which investigates repositories, changes code, validates the results, and delivers pull requests. Engineering teams use it to automate code changes, reviews, CI follow-up, and related repository work from dashboards and connected tools.

langchain-ai/open-swe · 10,688 stars · on GitHub · langchain.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add langchain-ai/open-swe --skill environments
Clone the repo
git clone --depth 1 https://github.com/langchain-ai/open-swe

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for environments

README.md
[![agentmods](https://agentmods.dev/badge/skills/langchain-ai/open-swe/environments/github.svg)](https://agentmods.dev/skills/langchain-ai/open-swe/environments)
Your own site
<a href="https://agentmods.dev/skills/langchain-ai/open-swe/environments"><img src="https://agentmods.dev/badge/skills/langchain-ai/open-swe/environments/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for environments

Your own site · 80×15
<a href="https://agentmods.dev/skills/langchain-ai/open-swe/environments"><img src="https://agentmods.dev/badge/skills/langchain-ai/open-swe/environments.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,227 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00084 $0.01227
Opus 5 $0.00042 $0.00613
Sonnet 5 $0.00017 $0.00245
Haiku 4.5 $0.00008 $0.00123

Measured today against content hash cd3227088840, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

environments scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agent/bundled_skills/environments/SKILL.md · 60 lines

How it starts

The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Environments

An environment is two things: a record (name, prompt, repos, sizing, optional scripts) and a published sandbox image, <prefix>-environment-<slug>:latest. Runs in that environment boot from the image and get the prompt appended to their system prompt. The environment named default is what every run uses unless the thread picked another one.

Only workspace admins can change environments, and only from an admin thread. Anyone can read them on Workspace settings → Environments. If the asker is not an admin, tell them what would need to happen and who can do it; do not try the tools.

The one rule: build here, publish from here

You do not write an environment as a script and hope. You build it in the admin thread's own sandbox with ordinary tools — execute, the file tools — and when it works you call publish_environment. That captures this sandbox as the image and writes the record only after the capture succeeded. Nothing is half-written on failure, and the environment is usable the moment the call returns.

Everything on the sandbox filesystem is captured, so provision it fully and leave no tokens, credentials, or proxy secrets on disk.

Which image to start from

The image you publish is whatever you are sitting on plus your changes, so start the admin thread on the right one:

You want to… Start the admin thread… Then
Edit an environment in that environment (composer → Environment picker) change it, publish_environment under the same name
Fork one into a new environment in the parent change what differs, publish_environment under a new name
Build from scratch in no environment, or sandbox_reset with the base snapshot_id provision everything, publish

Already in a thread and need a different image? sandbox_reset(snapshot_id=…) with an id from list_environments, or sandbox_reset(snapshot="<prefix>-environment-<slug>:latest"). The old sandbox is detached, not deleted.

Read the full file on GitHub · 60 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 60 lines · 84 tokens per session scan A cd3227088840

Subscribe to this mod's changes

environments is a skill published in the GitHub repository langchain-ai/open-swe (10,688 stars, last pushed today), licensed MIT. It adds 84 tokens to every session and 1,227 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-10.