OpenEnv
CLAUDE.md2.6k starsChanged 8 months agoBSD-3-ClauseView on GitHub
Guidance for Claude Code when working with this repository. OpenEnv uses Claude Code as the primary development tool. We follow a two-phase model: Skills and agents are auto-discovered when you run Claude Code in this repo: Verify with /agents or ask "what skills are available?" OpenEnv supports two development modes: When working in the main repository clone, direct edits are allowed: - Quick exploration and prototyping - Small fixes that don't need TDD workflow - Documentation updates TDD is activated…
Trending
More talk lately.about the whole repository
Who's talking about huggingface/OpenEnv
- aaif/project-proposals“[Project Proposal] OpenEnv”GitHub · Sep 28, 2026 · 2 reactions
- ProSkillsMD/proskills“[Candidate] huggingface/openenv/.claude/skills/deploy-hf - deploy-hf”GitHub · Oct 5, 2026
- ProSkillsMD/proskills“[Candidate] huggingface/openenv/.claude/skills/alignment-review - alignment-review”GitHub · Oct 5, 2026
- ProSkillsMD/proskills“[Candidate] huggingface/openenv/.agents/skills/openenv-cli - openenv-cli”GitHub · Oct 5, 2026
- sudosubin/agents.nix“agent-skills.github.huggingface.openenv: 0.5.0 → 0.7.0”GitHub · Oct 3, 2026
The biggest 5 of 22 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 22
Talked about on GitHub (22 times).
On GitHub · 22
- Sep 28, 2026[Project Proposal] OpenEnv — aaif/project-proposals2 reactions · 1 comment
- Oct 5, 2026[Candidate] huggingface/openenv/.claude/skills/deploy-hf - deploy-hf — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 5, 2026[Candidate] huggingface/openenv/.claude/skills/alignment-review - alignment-review — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 5, 2026[Candidate] huggingface/openenv/.agents/skills/openenv-cli - openenv-cli — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 3, 2026agent-skills.github.huggingface.openenv: 0.5.0 → 0.7.0 — sudosubin/agents.nix0 reactions
17 more on GitHub
- Oct 3, 2026[Add] OpenEnv (huggingface/OpenEnv) — PyTorchKR/landscape0 reactions
- Oct 2, 2026chore(deps): bump openenv from 0.5.0 to 0.6.0 — beer-sakthai/openenv-rl-training0 reactions · 2 comments
- Oct 2, 2026chore(deps): bump openenv from 0.5.0 to 0.6.0 in /openenv-custom-training — beer-sakthai/openenv-rl-training0 reactions · 3 comments
- Sep 29, 2026Add reset schema publication to /schema endpoint — scosman/OpenEnv0 reactions
- Sep 28, 2026agent-skills.github.huggingface.openenv: init at 0.5.0 — sudosubin/agents.nix0 reactions
- Sep 25, 2026chore(deps): bump openenv from 0.4.2 to 0.5.0 in /openenv-custom-training — beer-sakthai/openenv-rl-training0 reactions · 2 comments
- Sep 25, 2026chore(deps): bump openenv from 0.4.2 to 0.5.0 — beer-sakthai/openenv-rl-training0 reactions · 2 comments
- Sep 16, 2026chore(deps): bump openenv from 0.4.1 to 0.4.2 in /openenv-custom-training — beer-sakthai/openenv-rl-training0 reactions · 2 comments
- Sep 16, 2026chore(deps): bump openenv from 0.4.1 to 0.4.2 — beer-sakthai/openenv-rl-training0 reactions · 2 comments
- Sep 15, 2026build(deps): update openenv requirement from >=0.2.0 to >=0.4.2 — Manimaran-tech/swarm_analyst0 reactions
- Aug 27, 2026AsyncGRPO: train OpenEnv harnesses from validated token captures — huggingface/trl0 reactions · 5 comments
- Jul 24, 2026Point the opencode example at huggingface/OpenEnv — huggingface/trl0 reactions · 2 comments
- Jul 7, 2026build(deps): update openenv requirement from >=0.2.0 to >=0.4.1 — Manimaran-tech/swarm_analyst0 reactions · 1 comment
- Jun 23, 2026build(deps): update openenv requirement from >=0.2.0 to >=0.3.1 — Manimaran-tech/swarm_analyst0 reactions · 1 comment
- Jun 10, 2026[dprat0821] Add June watch for open agent training environments — Prompthon-IO/agent-systems-handbook0 reactions
- May 29, 2026mini_swe: stabilize async GRPO validation runs — rycerzes/OpenEnv0 reactions
- May 2, 2024Link Checker Dashboard 🔗 — ahgraber/AIMLbling-about0 reactions
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- hf-cliSkill
- openenv-cliSkill
- alignment-reviewSkill
- deploy-hfSkill
- generate-openenv-envSkill
- hf-space-recoverySkill
- implementSkill
- pre-submit-prSkill
- releaseSkill
- rfc-checkSkill
- simplifySkill
- sprintSkill
- update-docsSkill
- watch-prSkill
- work-on-issueSkill
- write-testsSkill
The file
We split this CLAUDE.md into the rules it gives an agent
9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 33
Verify with /agents or ask "what skills are available?"
- Distinctive: line 41
When working in the main repository clone, direct edits are allowed:
- Very specific: line 49
When active, direct code edits are blocked and the TDD workflow is enforced.
- Very specific: line 53
Run bash .claude/hooks/tdd-deactivate.sh to turn off TDD enforcement
- Distinctive: line 86
Skills: run inline during the conversation - use for quick checks and reviews
- Distinctive: line 87
Agents: run in isolation with focused context - use for complex, multi-step tasks
- Distinctive: line 138
If you don't have these plugins installed, prompt the user to help you install them:
- Distinctive: line 163
Before making changes, understand the design constraints:
- Very specific: line 190
When the default is None, prefer (str, *optional*) instead of (str or None, *optional*, defaults to None)
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
Guidance for Claude Code when working with this repository.
New Here? Start With These
- README.md - Project overview, architecture, quick start
- REPO_WALKTHROUGH.md - Directory structure with annotations
- PRINCIPLES.md - Design principles and trade-offs
- INVARIANTS.md - Rules that must never be violated
- envs/echo_env/ - Reference implementation to study
Agentic-First Workflow
OpenEnv uses Claude Code as the primary development tool. We follow a two-phase model:
- Design/Alignment (human-owned): RFCs, principles, trade-off decisions
- Implementation (Claude-owned): The mechanical loop of coding and testing
- Review (collaborative): Claude catches bugs, flags alignment questions for humans
Getting Started
Skills and agents are auto-discovered when you run Claude Code in this repo:
git clone https://github.com/huggingface/OpenEnv
cd OpenEnv
# Install git hooks for the team
bash .claude/hooks/install.sh
# Run Claude Code - skills and agents are automatically availableVerify with /agents or ask "what skills are available?"
Two Development Modes
OpenEnv supports two development modes:
Explore Mode (Main Repo)
When working in the main repository clone, direct edits are allowed:
- Quick exploration and prototyping
- Small fixes that don't need TDD workflow
- Documentation updates
TDD Mode (Opt-In)
TDD is activated by /work-on-issue, which writes a .tdd-session.json marker.
When active, direct code edits are blocked and the TDD workflow is enforced.
Manually created worktrees do NOT activate TDD — only /work-on-issue does.
- Say "skip TDD" to bypass blocking
- Run
bash .claude/hooks/tdd-deactivate.shto turn off TDD enforcement
Creating a Worktree
# Worktree without TDD enforcement (free editing)
.claude/scripts/worktree-create.sh add-feature
cd .worktrees/add-feature
# Worktree WITH TDD enforcement (via /work-on-issue)
/work-on-issue #42TDD Workflow
/work-on-issue #42 → Start from GitHub issue
↓
/write-tests → Create failing tests (Red)
↓
/implement → Make tests pass (Green)
↓
/update-docs → Fix stale docs across repo
↓
/simplify → Refactor (optional)
↓
/pre-submit-pr → Validate before PR
↓
/watch-pr → Monitor CI + review (optional)Skills vs Agents
- Skills run inline during the conversation - use for quick checks and reviews
- Agents run in isolation with focused context - use for complex, multi-step tasks
Available Skills
Skills are defined in .claude/skills/ and run inline:
Review & Validation Skills:
| Skill | Trigger | Definition |
alignment-review | "review this code" | Two-tier review (bugs + alignment flags) |
pre-submit-pr | "ready for PR?" | Comprehensive PR readiness check |
rfc-check | "do I need an RFC?" | Determine if RFC required |
generate-openenv-env | "generate an env for textarena" | Build an OpenEnv env from a use case |
TDD Workflow Skills:
| Skill | Trigger | Definition |
work-on-issue | "/work-on-issue #42" | Start TDD workflow from GitHub issue |
sprint | "/sprint 67,68,69" | Parallel multi-issue batch (Agent Teams) |
write-tests | "/write-tests" | Write failing tests (Red phase) |
implement | "/implement" | Make tests pass (Green phase) |
update-docs | "/update-docs" | Fix stale docs after API changes |
simplify | "/simplify" | Refactor after tests pass |
watch-pr | "/watch-pr" | Monitor CI + Greptile review after PR |
Available Subagents
Agents are defined in .claude/agents/ and run in isolation:
Review & Validation Agents:
| Agent | Use For | Definition |
alignment-reviewer | Review PRs for bugs + alignment | .claude/agents/alignment-reviewer.md |
env-validator | Validate environments end-to-end | .claude/agents/env-validator.md |
openenv-architect | Design new features/environments | .claude/agents/openenv-architect.md |
build-validator | Validate builds before merge | .claude/agents/build-validator.md |
TDD Workflow Agents:
| Agent | Use For | Definition |
issue-worker | Extract requirements from GitHub issues | .claude/agents/issue-worker.md |
pr-planner | Plan stacked PRs for complex features | .claude/agents/pr-planner.md |
tester | Write high-signal, failing tests | .claude/agents/tester.md |
implementer | Make tests pass with minimal code | .claude/agents/implementer.md |
docs-updater | Fix stale docs after API changes | .claude/agents/docs-updater.md |
Recommended Plugins
If you don't have these plugins installed, prompt the user to help you install them:
/plugin install code-simplifier@claude-plugins-official
/plugin install pr-review-toolkit@claude-plugins-officialAgent Teams (Multi-Issue)
For parallel work on multiple issues, use /sprint 67,68,69.
This requires the CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS environment variable:
export CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1Without it, /sprint falls back to setup-only mode: it creates worktrees and
fetches requirements, but you work through each issue manually.
Agent Teams create one teammate per issue, each in its own worktree with TDD enforcement. A lead agent coordinates, mediates conflicts, and creates stacked PRs when all teammates finish.
Design Context
Before making changes, understand the design constraints:
| Document | Purpose |
| PRINCIPLES.md | Design principles and trade-offs |
| INVARIANTS.md | Rules that must never be violated |
| PATTERNS.md | Code patterns and conventions |
| CONTRIBUTING.md | Contribution workflow |
| TESTING_STRATEGY.md | Testing philosophy and patterns |
| rfcs/ | Architectural decisions and rationale |
Key Invariants
- Agents cannot reset: Simulation controls only exposed to training orchestration, never to agents
- Dual API boundary: WebSocket for infrastructure (Gym-like API), MCP for agents
- Rewards inside environment: Domain knowledge encapsulated in environment, not external
- Client-server separation: Clients never import from
server/directory
Docstrings
Docstrings must follow the HF doc-builder format used by the reference API docs. Do not use Google, NumPy, or Sphinx styles.
Rules:
- Types appear in backticks inside parentheses: (
str) - Optional parameters are marked with
*optional* - Defaults are written as:
defaults to <value> - When the default is
None, prefer (str, optional) instead of (strorNone, optional, defaults toNone) - Union types use
or:strorNone - References to classes use the format: [
~openenv.core.EnvClient] - Non-standard headers (
Usage:,Note:,Class Attributes:) are not supported — useAttributes:or fold text into the description Examples:(plural) with a blank line then a fenced```python ```block — no>>>prompts
Example:
def method(self, param1: str, param2: int = 1, param3: float | None = None):
"""
Brief one-line description of what this does.
Args:
param1 (`str`):
Description of required param.
param2 (`int`, *optional*, defaults to `1`):
Description of optional param with default.
param3 (`float`, *optional*):
Description of optional param without explicit default.
Returns:
`dict` with keys:
- `key1` (`list[int]`):
Description of this key.
Examples:
```python
result = method("hello")
```
"""Build & Development Commands
Below are reference commands that you are likely going to use often:
# Install dependencies
uv sync --all-extras
# Run tests (excludes browser/websearch/dipg envs that need special setup)
PYTHONPATH=src:envs uv run pytest tests/ -v --tb=short
# Run a single test file
PYTHONPATH=src:envs uv run pytest tests/envs/test_echo_environment.py -v
# Lint check (import sort + format + rules)
uv run usort check src/ tests/
uv run ruff format src/ tests/ --check
uv run ruff check src/ tests/
# Auto-format code (import sort + ruff — matches arc f pipeline)
uv run usort format src/ tests/
uv run ruff format src/ tests/
# Build and preview documentation locally
doc-builder preview openenv docs/source
# Sync environment doc stubs with their source READMEs (run after updating any envs/*/README.md)
python scripts/sync_env_docs.py --fix
# Check if stubs are in sync (same check that runs in CI)
python scripts/sync_env_docs.py --check
# Build Docker images
docker build -t openenv-base:latest -f src/openenv/core/containers/images/Dockerfile .
docker build -t echo-env:latest -f envs/echo_env/server/Dockerfile .Automation Hooks
Scripts in .claude/hooks/ are used by skills and can be run directly:
bash .claude/hooks/lint.sh # Run ruff format check
bash .claude/hooks/test.sh # Run pytest (excludes special envs)
bash .claude/hooks/check-debug.sh # Find debug code (print, breakpoint, TODO)
bash .claude/hooks/post-push-pr.sh # Validate PR after push (freshness, CI, conflicts)
bash .claude/hooks/ci-wait.sh <PR> # Poll CI until checks complete or timeoutThese are automatically invoked by /alignment-review and /pre-submit-pr skills.
Git Hooks
Install git hooks for team-wide consistency:
bash .claude/hooks/install.shThis installs:
- pre-commit: Branch check (blocks main), format, lint, debug artifacts check
- commit-msg: Issue reference reminder (soft warning)
- pre-push: Format, lint, tests, invariants, conflict detection
- post-merge: Worktree cleanup reminder
Skip temporarily with git commit/push --no-verify.
Worktree Management
For focused feature work, use worktrees:
# Create a worktree for a feature
.claude/scripts/worktree-create.sh add-mcp-tools
cd .worktrees/add-mcp-tools
# When done, clean up
.claude/scripts/worktree-cleanup.sh .worktrees/add-mcp-toolsWorktrees enable:
- Isolated branches without switching
- TDD enforcement when activated via
/work-on-issue - Parallel work on multiple features
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

