Agent Skills › DexForce/EmbodiChain › add-task-env

add-task-env

GitHub

根据用户提示路由并搭建EmbodiChain任务环境,支持手写专家轨迹、程序化专家、强化学习或纯环境基线。负责任务身份定义、上下文加载及文件结构生成。

.agents/skills/add-task-env/SKILL.md DexForce/EmbodiChain

Trigger Scenarios

创建新的机器人任务或环境 指定专家演示或RL训练配置

Install

npx skills add DexForce/EmbodiChain --skill add-task-env -g -y
More Options

Non-standard path

npx skills add https://github.com/DexForce/EmbodiChain/tree/main/.agents/skills/add-task-env -g -y

Use without installing

npx skills use DexForce/EmbodiChain@add-task-env

指定 Agent (Claude Code)

npx skills add DexForce/EmbodiChain --skill add-task-env -a claude-code -g -y

安装 repo 全部 skill

npx skills add DexForce/EmbodiChain --all -g -y

预览 repo 内 skill

npx skills add DexForce/EmbodiChain --list

SKILL.md

Frontmatter
{
    "name": "add-task-env",
    "description": "Route and scaffold a new EmbodiChain task by solution type: handwritten expert trajectory, Task Program expert trajectory, simulator RL, lightweight RL, or an environment-only baseline. Use when creating a task, environment, expert demo, or RL task."
}

Add Task Environment

Own the task identity, task-first layout, physical environment, registration boundary, and solution routing. Do not assume every new task needs a Python environment subclass.

Route from the user's prompt

Classify the requested solution before creating files. Read only the matching reference files.

Prompt signal Route Required reference
handwritten, scripted, demo segments, create_demo_segments, custom Python planning Handwritten expert trajectory references/handwritten-expert.md
Task Program, program.yaml, integration.yaml, declarative task, Semantic Call, MLLM-generated program Task Program expert trajectory references/task-program-expert.md
Generic expert trajectory or expert demo with no implementation signal Resolve handwritten versus Task Program from required behavior; ask only if still ambiguous One selected expert reference
RL, PPO, GRPO, APG, policy, reward learning, training config Reinforcement learning references/rl.md
Task/environment/scene only, with no requested solution Environment-only baseline This file only

Routing rules:

  • If the prompt names multiple solutions, read every matching reference and keep all artifacts under one task-first directory.
  • If the prompt merely says expert trajectory and provides no signal for handwritten versus Task Program, determine whether the requested behavior is declarative and supported by existing Semantic Calls. Ask only when that choice materially changes the requested deliverables.
  • Treat environment-only as the shared baseline, not as a fourth solution implementation.
  • Task Program authoring and integration composition are owned by $add-task-program. New reusable robot/skill-profile declarations are owned by $add-embodiment-component.

Load current project context

Read agent_context/MAP.yaml, then load env-framework. Also load:

  • task-programs for the Task Program route;
  • rl-learning for the RL route; and
  • any matched robot, sensor, manager, or randomization topic needed by the requested environment.

Verify paths and configuration fields against the current source of truth. Do not infer schemas from older task examples alone.

Establish task identity

Resolve from the prompt or nearby conventions:

  • <category_path>: a task family plus optional subdomain, such as manipulation/tableware;
  • <task_name>: snake case;
  • one unique runnable environment ID per deployment;
  • intended embodiment variants; and
  • selected solution routes.

Organize by task identity, never by solution method. Use:

extensions/embodichain_tasks/embodichain_tasks/<category_path>/<task_name>.py
extensions/embodichain_tasks/configs/tasks/<category_path>/<task_name>/

Keep a single task Python entry point flat at <task_name>.py. Do not create a same-named Python package, scenario package, mdp package, or a task-local task_program Python package when configuration and manager functors express the behavior.

Build the shared environment baseline

Choose the narrowest representation that supports the requested routes.

Reusable physical environment

For new task-first compositions, prefer:

<task config>/env.yaml

This is a component, not a runnable deployment. It owns:

  • environment_id;
  • exactly one explicit physics: default|newton backend and its optional, backend-matching physics_config;
  • ordinary environment values such as episode limits and environment count;
  • physical simulation entities under simulation; and
  • manager configuration under env.

It must not contain a runnable id, Task Program fields, semantic scene bindings, a robot, or sensors. Task Program semantic roots and affordances belong to integration.yaml.scene_binding.

Runnable deployment

Prefer one thin deployment per embodiment or execution variant:

<task config>/task.<variant>.yaml

It owns the runnable id and selects reusable components. A typical physical deployment selects:

id: MyTask-v1

environment:
  component: env.yaml

embodiment:
  component: ../../../components/embodiments/<embodiment>.yaml

The original inline Gym format remains supported. When extending an existing inline env.json or env.yaml, preserve that representation unless the user asked for component extraction. Every inline runnable config declares exactly one physics: default|newton backend. Never select a component and repeat its owned inline fields, including physics or physics_config, in the same deployment. Use separate environment files for backend-specific settings.

Optional Python entry point

Create extensions/embodichain_tasks/embodichain_tasks/<category_path>/<task_name>.py when the route requires import-owned behavior or registration:

  • an environment-only registered Gym task;
  • handwritten expert behavior;
  • simulator RL registration, even when managers/config own its behavior; or
  • a lightweight learning environment.

A supported configuration-defined Task Program is the exception: it normally omits the task module and dynamically registers the common EmbodiedEnv while loading its runnable deployment.

Keep @register_env or @register_learning_env in the task-named module. Task discovery recursively imports these modules, so category __init__.py files do not need per-task re-exports.

Implement the selected route

After the shared baseline exists, follow the selected specialized reference:

  • references/handwritten-expert.md
  • references/task-program-expert.md
  • references/rl.md

Reuse existing manager functors and registered components. Invoke $add-functor only when a missing observation, reward, event, action, dataset, or randomization term is required. Use $add-test for test structure.

Validate proportionally

At minimum:

  1. parse every new or changed runnable config;
  2. prove registration/discovery for Python-owned tasks;
  3. run the route-specific focused tests;
  4. run embodichain list-task when task-discovery metadata changed; and
  5. format changed Python files with the pinned project Black version.

Do not claim an expert trajectory is qualified from schema validation alone. Physical expert behavior requires an environment run with its validators and persisted completion result. Do not claim an RL task works from config parsing alone; at least construct/reset the selected environment and run a minimal trainer-routing smoke test when dependencies permit.

Completion checklist

  • Prompt was routed to the correct specialized reference(s)
  • Task family, optional subdomain, task name, and runnable IDs are stable
  • Python and config paths share the same task-first hierarchy
  • Environment component and runnable deployment ownership are not mixed
  • Each environment file declares one backend and only matching physics fields
  • A Python task module exists only when the selected route needs it
  • No solution-method directory or same-named task package was introduced
  • Existing components and manager functors were reused where possible
  • Route-specific tests and focused validation passed

Version History

  • 6611467 Current 2026-10-19 21:36

    将官方任务和机器人模块迁移至 extensions/ 目录下

  • 6f20b06 2026-09-23 01:29

    引入基于提示信号的路由机制,区分手写专家、Task Program和RL方案;优化上下文加载与任务身份确立逻辑。

  • 131e55b 2026-08-28 22:44

    重构任务分类体系,将单一类别改为‘任务家族+子域’结构,优化模板以适配EmbodiedEnv子类,并调整文件布局规范。

  • 12178b3 2026-08-20 11:23

Same Skill Collection

.agents/skills/add-atomic-action/SKILL.md
.agents/skills/add-embodiment-component/SKILL.md
.agents/skills/add-functor/SKILL.md
.agents/skills/add-robot/SKILL.md
.agents/skills/add-semantic-call/SKILL.md
.agents/skills/add-solver/SKILL.md
.agents/skills/add-task-program/SKILL.md
.agents/skills/add-test/SKILL.md
.agents/skills/benchmark/SKILL.md
.agents/skills/implement-performance/SKILL.md
.agents/skills/pr/SKILL.md
.agents/skills/pre-commit-check/SKILL.md
.agents/skills/project-dev-context/SKILL.md
.agents/skills/release/SKILL.md
.agents/skills/review-pr/SKILL.md
.agents/skills/update-api-docs/SKILL.md
.claude/skills/add-atomic-action/SKILL.md
.claude/skills/add-embodiment-component/SKILL.md
.claude/skills/add-functor/SKILL.md
.claude/skills/add-robot/SKILL.md
.claude/skills/add-semantic-call/SKILL.md
.claude/skills/add-solver/SKILL.md
.claude/skills/add-task-env/SKILL.md
.claude/skills/add-task-program/SKILL.md
.claude/skills/add-test/SKILL.md
.claude/skills/benchmark/SKILL.md
.claude/skills/pr/SKILL.md
.claude/skills/pre-commit-check/SKILL.md
.claude/skills/project-dev-context/SKILL.md
.claude/skills/release/SKILL.md
.claude/skills/review-pr/SKILL.md
.claude/skills/update-api-docs/SKILL.md
.claude/skills/implement-performance/SKILL.md

Metadata

Files
0
Version
6611467
Hash
f4f68d89
Indexed
2026-08-20 11:23

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-23 03:33
浙ICP备14020137号-1