Skip to content

Adds skills for Isaac Lab#5769

Draft
kellyguo11 wants to merge 4 commits into
isaac-sim:developfrom
kellyguo11:consolidate-skills
Draft

Adds skills for Isaac Lab#5769
kellyguo11 wants to merge 4 commits into
isaac-sim:developfrom
kellyguo11:consolidate-skills

Conversation

@kellyguo11
Copy link
Copy Markdown
Contributor

Description

Summary

  • Added a repo-owned agent skills framework with developer and user skill categories, authoring guidance, validation rules, and path-scoped CI.
  • Seeded developer skills for PR workflow, changelog fragments, and coding style.
  • Seeded user skills for Isaac Gym migration, Isaac Lab 2.x to 3.x migration, domain randomization events, environment building, RL training, sensors/actuators, backend selection, and setup troubleshooting.

Details

  • Added skills/ as the canonical home for Isaac Lab agent skills.
  • Added tools/skills/cli.py to validate skill frontmatter, required sections, links, portable paths, user evaluations, and scenario quality.
  • Added docs/source/overview/developer-guide/agent_skills.rst and linked it from the developer guide.
  • Added .github/workflows/skills-check.yml so skill validation runs only when skills, validator code, or the skills workflow change.
  • Updated AGENTS.md with high-level skill ownership, structure, and validation guidance.

Validation

  • Ran python tools/skills/cli.py check
    • Result: Validated 11 skills.
  • Ran python -m py_compile tools/skills/cli.py tools/skills/test/test_validate.py
  • Checked edited files for linter issues.

Type of change

  • Documentation update

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@kellyguo11 kellyguo11 marked this pull request as draft May 25, 2026 03:52
@github-actions github-actions Bot added documentation Improvements or additions to documentation infrastructure labels May 25, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 25, 2026

Greptile Summary

This PR adds a repo-owned agent skills framework to Isaac Lab, including a skills/ directory with 11 developer and user-facing skills, a tools/skills/cli.py validator, a path-scoped CI workflow, and a developer guide page. The skills cover PR workflow, changelog fragments, coding style, migration paths, domain randomization, RL training, and setup troubleshooting.

  • The validator (cli.py) checks frontmatter, required sections, unique names, audience/path consistency, link depth, backtick path existence, and per-scenario evaluation quality — solid baseline rules that enforce the authoring contract.
  • The CI gate is correctly path-scoped but compiles the test file rather than executing it, so the nine validator test cases never run; and the README catalog lists user/build-environments/ as a shipped skill when no such directory is created in this PR.

Confidence Score: 3/5

The skills content and validator logic are well-constructed, but the CI workflow never runs the test suite and the README references a skill directory that does not exist — both of which should be resolved before merging.

The two functional gaps (tests only compiled, not run; missing build-environments skill directory) mean the CI gate provides less protection than intended and the README misleads contributors about available skills from day one.

skills/README.md (catalog entry for a non-existent skill) and .github/workflows/skills-check.yml (missing pytest step).

Important Files Changed

Filename Overview
tools/skills/cli.py New skill validator covering frontmatter, required sections, link depth, backtick paths, and user evaluations. One weak string check for the evaluations.md link; all other logic looks sound.
tools/skills/test/test_validate.py Good coverage of validator edge cases, but the tests are never executed in CI — only syntax-checked via py_compile.
.github/workflows/skills-check.yml Path-scoped CI gate is well-structured, but the test suite is compiled rather than run, leaving validator regressions undetected.
skills/README.md Catalog lists user/build-environments/ as a shipped skill, but no such directory is created in this PR.
tools/skills/pyproject.toml Correctly scopes pytest rootdir to tools/skills/ so import cli works without path shims.
docs/source/overview/developer-guide/agent_skills.rst Comprehensive authoring guide covering skill contract, file roles, progressive disclosure, and validation workflow. Consistent with the implemented validator rules.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[PR touches skills/ or tools/skills/] --> B[skills-check.yml triggered]
    B --> C[actions/checkout]
    C --> D[setup-python 3.12]
    D --> E["python3 tools/skills/cli.py check"]
    E --> F{errors?}
    F -- Yes --> G[CI fails]
    F -- No --> H["py_compile cli.py + test_validate.py"]
    H --> I[CI passes]

    subgraph "cli.py validate_all()"
        E --> J[iter_skills: glob */*/SKILL.md]
        J --> K[Check duplicate names]
        K --> L[Skill.validate per skill]
        L --> M[_validate_metadata]
        L --> N[_validate_body: sections, line count]
        L --> O[_validate_links: broken links, depth]
        L --> P[_validate_backtick_paths]
        L --> Q[_validate_reference_files: rglob *.md]
        L --> R{audience == user?}
        R -- Yes --> S[_validate_user_evaluations]
        S --> T[Check evaluations.md exists]
        T --> U[Check 3+ scenarios with Query/Expected/Failures]
        L --> V[_validate_scripts]
    end

    style H fill:#f9a,stroke:#c00
    style I fill:#f9a,stroke:#c00
Loading

Reviews (1): Last reviewed commit: "Adds skills for Isaac Lab" | Re-trigger Greptile

Comment on lines +32 to +40
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.12"

- name: Verify skills
run: python3 tools/skills/cli.py check

- name: Compile skills validator
run: python3 -m py_compile tools/skills/cli.py tools/skills/test/test_validate.py
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Test suite compiled but never executed

The workflow compiles test_validate.py with py_compile but never actually runs the tests. Any regression in validator logic — incorrect scenario counting, broken link detection, frontmatter parsing edge cases — will be silently missed in CI. The docs and pyproject.toml both describe how to run pytest tools/skills/, but no pytest step exists here. Adding python3 -m pytest tools/skills/ after the check step would run all nine test cases, including test_validate_current_repo_skills which validates every skill in the repo on each PR.

Comment thread skills/README.md
- `user/domain-randomization-events/`: implement domain randomization through Isaac Lab event terms.
- `user/build-environments/`: create direct and manager-based Isaac Lab environments from task requirements.
- `user/train-rl-agents/`: configure and run Isaac Lab reinforcement learning workflows.
- `user/use-sensors-actuators/`: add sensors, sensor observations, and actuator models to tasks.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Catalog lists user/build-environments/ but the skill directory is never created

The catalog section presents user/build-environments/ as a current user skill alongside the other eight shipped skills, but no skills/user/build-environments/ directory appears in this PR. Only user/import-robot-urdf-mjcf/ is explicitly called out as planned. Anyone following the README to locate this skill will find nothing. Either move this entry to "Planned user skills" or include the directory (with at least a stub SKILL.md) in this PR.

Comment thread tools/skills/cli.py Outdated
Comment on lines +252 to +253
if "evaluations.md" not in body:
errors.append(f"{_display_path(self.path)}: user-facing skills must link to evaluations.md from SKILL.md")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Weak "link to evaluations.md" check passes on prose mentions

The current guard matches any occurrence of the literal string "evaluations.md" in the body, including text like "Do not edit evaluations.md" or a code fence. A SKILL.md that references the file only in prose would silently pass. Checking that a proper markdown link exists is more reliable.

Suggested change
if "evaluations.md" not in body:
errors.append(f"{_display_path(self.path)}: user-facing skills must link to evaluations.md from SKILL.md")
if not re.search(r"(?<!!)\[[^\]]+\]\(evaluations\.md\)", body):
errors.append(f"{_display_path(self.path)}: user-facing skills must link to evaluations.md from SKILL.md")

Copy link
Copy Markdown

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Well-structured introduction of a repo-owned agent skills framework with thorough validation tooling. The design philosophy—keeping skills as routing/sequencing guides rather than duplicating docs—is sound. The validator enforces good hygiene (frontmatter, sections, link validity, portable paths, evaluation quality).

A few items to address:

1. 🔴 CI Failure: Missing skills/user/build-environments/ directory

The Skills Check CI is failing because skills/user/train-rl-agents/SKILL.md references `skills/user/build-environments/` in a backtick path, but that directory doesn't exist in this PR:

skills/user/train-rl-agents/SKILL.md: backtick path does not exist: skills/user/build-environments/

Additionally, skills/README.md lists user/build-environments/ in the active catalog section (not the "Planned" section). Either:

  • Include the build-environments skill in this PR, or
  • Move it to the "Planned user skills" section in the README and remove the backtick-path reference from train-rl-agents/SKILL.md (e.g., mention it as a planned skill name without the path assertion).

2. 🟡 Broken Links CI failure is pre-existing

The "Check for Broken Links" failure is in docs/source/setup/ecosystem.rst (not modified by this PR). This is a pre-existing issue on the base branch and not blocking for this PR specifically.

3. 🟡 Frontmatter parser doesn't handle quoted multi-line or special YAML

The custom YAML frontmatter parser in cli.py uses simple split(":", 1) parsing. This works for the current skills but would silently break on:

  • Values containing colons (e.g., description: Use when: something happens)
  • Multi-line YAML strings or block scalars

Currently all existing descriptions avoid colons after "Use when" by natural language, but this is fragile. Consider either:

  • Adding a note in the authoring guidelines that descriptions must not contain bare colons beyond the first, or
  • Using yaml.safe_load() (stdlib-free alternative: document the constraint clearly)

Since the current skills all pass validation, this is non-blocking but worth documenting as a known limitation.

4. 🟡 validate_all runs _parse_frontmatter twice per skill

In validate_all(), frontmatter is parsed once to collect names for duplicate detection, then skill.validate() parses it again internally. For 11 skills this is negligible, but a minor refactor (e.g., caching the parse result or extracting it once) would be cleaner as the skill count grows.

5. 💡 Consider pinning the actions/checkout and actions/setup-python by tag + hash comment

The workflow pins actions by full SHA (good security practice), but the comment # v6 / # v5 could drift from the actual pinned SHA over time. Consider using the format:

uses: actions/checkout@de0fac2e...  # v6.x.y

with the specific minor version to make future audits easier. Minor nit.


Verdict: The skills check CI failure (#1 above) needs to be resolved before merge. The architecture, validation tooling, skill content quality, and documentation integration are all solid.


Update (1f78c4d): All critical issues from the initial review have been addressed:

  • #1 Fixedskills/user/create-environments/ now exists with full SKILL.md and evaluations.md; README and cross-references updated.
  • #3 Partially addressed — Validator now explicitly rejects block scalars (| and >) with a clear error, and the docs note the YAML subset constraint.
  • Inline: tests not run — CI now installs pytest and runs python3 -m pytest tools/skills/.
  • Inline: weak evaluations.md check — Now uses proper markdown link detection via LINK_RE.
  • Inline: README catalog — Correctly lists user/create-environments/.
  • 🧹 Bonus — Removed dead ThreeDWorld link from ecosystem.rst (addresses pre-existing broken link issue #2).

No new issues found in the incremental changes. LGTM.


Update (6ff9f18): Validated each skill by spawning agents to follow them on representative user queries. The new revision adds examples.md to all skills that were missing them, and adds reference.md to setup-troubleshooting. Results:

Agent Validation Results

Skill Query Tested Result
train-rl-agents "Train Cartpole with RSL-RL on GPU" ✅ Correct command, config path, pre-flight check produced
domain-randomization-events "Randomize friction for PhysX and Newton" ✅ Correctly identified backend differences, chose reset mode, recommended PresetCfg
create-environments "Quadruped with custom commands: direct or manager-based?" ✅ Correctly recommended direct workflow with reasoning
setup-troubleshooting "ModuleNotFoundError: isaaclab_tasks" 🟡 Correct diagnostic workflow but referenced docs don't cover this specific module
pr-workflow "Preparing a PR after fixing schemas.py" ✅ Complete checklist produced with correct commands

Gaps Found During Validation

  1. domain-randomization-events: No concrete PresetCfg code example showing how to wire backend-specific event configs. The skill describes what to do ("use PresetCfg") but not the import path or syntax pattern. An agent inferred the pattern correctly but had to guess at imports.

  2. setup-troubleshooting: The skill correctly routes to docs/source/refs/troubleshooting.rst, but that doc doesn't cover isaaclab_tasks import failures (only isaacsim, isaaclab_physx, etc.). The skill's own philosophy says "update docs first" — this is a docs gap, not a skill gap.

  3. train-rl-agents: Missing --resume/checkpoint flag syntax for RSL-RL. The workflow says "resume or load a checkpoint only after initial run writes expected artifacts" but doesn't show the command.

  4. All user skills: None show import paths for the config classes they reference. An agent with access to the codebase can resolve these, but a standalone user following the skill would need to search.

Verdict

The skills framework is well-designed and the updated revision addresses the examples gap from the initial review. All skills produce correct guidance when followed by an agent. The remaining gaps are minor (missing import examples, one docs gap) and don't block merge. The domain-randomization and migration skills are production-quality; the rest meet the bar for an initial seed.

No blocking concerns.


Update (70215f9): All 4 previously flagged gaps have been addressed in this commit:

Previous Gap Fix
No PresetCfg code example in domain-randomization ✅ Added complete PresetCfg pattern with imports to examples.md
isaaclab_tasks missing from troubleshooting docs ✅ Added to docs/source/refs/troubleshooting.rst AND setup-troubleshooting/reference.md
No checkpoint resume in train-rl examples ✅ Added --resume --load_run RUN_NAME --checkpoint model_100.pt example
Import paths missing ✅ New use-presets skill provides complete import paths in reference.md

New use-presets Skill Validation

Spawned an agent to follow the new skill on: "Add Newton MJWarp support to a PhysX-only locomotion task."

Result: ✅ PASS — Agent produced complete, correct code:

  • Correct PresetCfg wrapper with default, physx, and newton_mjwarp variants
  • Correct import paths (from isaaclab_tasks.utils import PresetCfg, etc.)
  • Proper placement in env config (sim: SimulationCfg = SimulationCfg(physics=PhysicsCfg()))
  • Correct smoke-test commands with physics=physx and physics=newton_mjwarp

The skill's reference.md provides the definition pattern with imports, examples.md shows concrete physics/domain/combined examples, and evaluations.md covers 4 scenarios including "no preset needed."

Final Summary (all 12 skills validated)

All 12 skills (3 developer, 9 user) have been validated by spawning agents. Every skill produces correct, actionable guidance. The pr-workflow skill has minor gaps (test discovery conventions, changelog filename convention) but these are non-blocking for the initial seed. No remaining concerns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant