imitation-learning
Practical imitation learning (learning from demonstration) for robot manipulation: deciding whether IL fits, designing demonstration collection, choosing observation and action spaces, picking and configuring a policy (behaviour cloning, ACT, Diffusion Policy, flow matching, VLAs such as OpenVLA-OFT…
Install / Use
npx skills add arpitg1304/robotics-agent-skills --skill imitation-learningInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
OperationsSupported Platforms
Our assessment of imitation-learning
imitation-learning scores 88/100 on our quality scale, 354th of 763 Operations skills we index (top 47%).
Its SKILL.md is 21 KB long, well organised into 25 sections with 1 code example: a thorough specification that gives an agent plenty to work with.
It has 405 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated 3 days ago, so imitation-learning is actively maintained.
- Our last check on 2026-11-22 found the source still online.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-11-22. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
imitation-learning compared with similar skills
All 4 of these similar skills score higher than imitation-learning; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| imitation-learning (this skill)by arpitg1304 | 88 | 405 | 3d ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 120.0k | today | CLAUDE.md |
| Claude-Code-Game-Studiosby Donchitos | 100 | 40.6k | 12d ago | CLAUDE.md |
| algorithmic-artby anthropics | 100 | 177.9k | 2mo ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 2mo ago | SKILL.md |
Frequently asked questions
- How do I install imitation-learning?
- Run
npx skills add arpitg1304/robotics-agent-skills --skill imitation-learning. The install tabs above show the steps for each supported agent. - Which AI agents does imitation-learning work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is imitation-learning safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is Apache-2.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is imitation-learning still maintained?
- The repository was last updated 3 days ago, so imitation-learning is actively maintained.
Skill content
View source on GitHubname: imitation-learning description: > Practical imitation learning (learning from demonstration) for robot manipulation: deciding whether IL fits, designing demonstration collection, choosing observation and action spaces, picking and configuring a policy (behaviour cloning, ACT, Diffusion Policy, flow matching, VLAs such as OpenVLA-OFT, Octo, pi0/pi0.5, SmolVLA, GR00T), training and checkpoint selection, honest rollout evaluation with confidence intervals, deployment timing, and diagnosing failures. Use this skill when the user mentions behaviour cloning, teleoperation demos, leader-follower arms, action chunking, temporal ensembling, fine-tuning a VLA, "how many demos", success rate, policy evaluation, DAgger or intervention data, covariate shift, a policy that freezes, jitters, misses grasps, or works in training but fails on the robot, or sim and real co-training.
Imitation Learning for Robot Manipulation
Model landscape checked 2026-11-18; verify versions before relying on them.
Imitation learning (IL) is supervised learning on a dataset you collect yourself and an
evaluation you have to run on hardware. Most failed IL projects fail on data and
evaluation, not architecture. This skill covers the decisions in the order you make
them. Library commands live in lerobot, dataset QA in robot-data-quality.
Reference files (load on demand):
references/policy-landscape.md: policy families, VLAs, licences, GPU needs, published hyperparameters. Load before naming a model version, licence or hyperparameter, or when choosing a policy family or VLA.references/data-collection.md: demo budget, teleop modalities, camera setup, per-session checklist. Load when planning collection or answering "how many demos".references/observation-action.md: action-space table, proprio pitfalls, image size and crop. Load when choosing the action representation or image preprocessing.references/evaluation-statistics.md: tested success-rate statistics code, reporting template, why val loss misleads. Load when computing intervals, comparing policies, sizing an evaluation or writing results up.references/deployment-runtime.md: execution modes, tested ensembling and async code, latency budget, safety clamp. Load when writing the on-robot inference loop.references/corrections-and-cotraining.md: interventions, targeted recollection, sim co-training. Load when improving a policy after evaluation or using sim data.references/failure-modes.md: extra failure rows, overfitting signs. Load when a symptom is not in the Failure Modes table or the policy only works near demo poses.
When to Use This Skill
- Planning a demonstration collection campaign or deciding how many demos to record
- Choosing between ACT, Diffusion Policy, a flow-matching policy, or fine-tuning a VLA
- Designing action spaces (joint vs end-effector, absolute vs delta) and chunk sizes
- Training runs where loss looks fine but the robot fails
- Designing an evaluation protocol or comparing two policies
- Writing the deployment loop for a chunked policy (latency, async execution, smoothing)
- Diagnosing failures: freezing, drift, gripper timing, oscillation, camera sensitivity
- Planning correction data (DAgger, interventions) or sim and real co-training
Is IL the Right Tool?
| Situation | Prefer | Why |
|---|---|---|
| Object poses known or cheaply perceived, rigid parts, repeatable fixture | Scripted control + perception | Deterministic, verifiable, no data campaign |
| Contact-rich or deformable task a human can demo in < 1 min (folding, insertion with wiggle, cable routing) | IL | Hard to script; demos capture the strategy |
| Reward easy to compute in sim, dynamics simulate well (locomotion, in-hand reorientation) | RL in sim (robot-reinforcement-learning) | Search beats human demos when the sim is trustworthy |
| Human cannot teleoperate it well (too fast, too precise for the interface) | RL, or scripted + learned residual | IL ceiling is the demonstrator |
| IL policy at 60-80% and the failures are specific | IL plus correction data, then possibly RL fine-tuning | Targeted data is cheapest; RL needs a reset and reward story |
Hybrid is normal: a scripted approach move plus a learned contact phase, or a behaviour
tree calling learned skills (robotics-design-patterns).
How many demos (10-20 up to 1000+): references/data-collection.md.
Diversity of environments and objects matters more than raw count once each condition has enough demos (Lin et al. 2024, Data Scaling Laws in Imitation Learning). Spend the budget on coverage of the conditions you will be evaluated in.
Mental Model
- The policy can only be as good as the state coverage of the data. Behaviour cloning trains on states the demonstrator visited. Small errors take the robot to states nobody demonstrated, where errors grow (covariate shift; Ross et al. 2011, DAgger). Everything else (chunking, recovery data, interventions) manages this.
- The loss is a surrogate; rollouts are the metric. Low validation loss does not mean high success (robomimic, Mandlekar et al. 2021). Budget robot time for evaluation from day one.
- Train and deploy must see identical inputs. Same cameras, mounts, resolution, crop, colour order, normalisation statistics, control rate and action convention. Most "the model does not work" reports are pipeline mismatches.
- Consistent demonstrators make learnable data. One strategy executed with small variation beats several strategies mixed, unless the policy class models multimodality and you have the data to cover every mode.
- Iterate on failures, not on architectures. Loop: collect, train, evaluate on a fixed set, classify failures, collect data that targets the top failure, repeat.
Decision 1: Data Collection
Pick the interface that makes demonstrations fast and smooth. Hesitation, pauses and corrections in demos become hesitation in the policy.
What to keep constant vs randomise
Keep constant (or the policy will need data covering every variation):
- Camera mounts and intrinsics. Mark positions; check a reference overlay before each session.
- Robot base pose relative to the table, gripper fingertips, control rate.
- Task definition and success criterion, written down before collection starts.
- Strategy: one grasp approach, one ordering of subtasks (unless multimodality is intended).
Randomise deliberately, within the range you will evaluate in:
- Object initial positions and orientations: sample from a defined region (draw it on the table or use a printed grid) instead of "wherever I put it".
- Robot start configuration within a small region, not one fixed pose.
- Distractors, lighting, table cloth, object instances, if generalisation to them matters.
Record start conditions per episode (object pose region cell, instance ID, lighting tag). You need them later to build eval sets and to find coverage gaps.
Failures, recoveries and idle frames
- Recoveries are the most valuable demos you are not collecting. Include episodes where the operator recovers from a slip, a missed grasp or a nudged object. Without them the policy has never seen how to get back to the demo distribution.
- Do not train on failed demos as if they were successes. Keep them in the dataset marked as failures (useful for analysis, reward models, advantage-conditioned methods), and filter them out of BC training.
- Trim idle frames. Seconds of stillness at the start or end of an episode teach the
policy that "stand still" is a valid action given an initial-looking frame, which shows
up as a policy that never starts. openpi added an idle filter for DROID training for
this reason. Detection and trimming tools are in
robot-data-quality.
Cameras
Default: wrist camera plus at least one external camera, exposure and white balance
locked. Teleop modality comparison, camera details and per-session checklist:
references/data-collection.md.
Decision 2: Observation and Action Design
Action-space table, proprio pitfall, image crop: references/observation-action.md.
Rules:
- Prefer position targets over velocities. Diffusion Policy found position control consistently beat velocity control and suffered less compounding error.
- Use the action convention your pretrained VLA was trained with, or expect to need more fine-tuning data.
- Represent rotations continuously (6D rotation or quaternion with sign fixed), not Euler.
- Treat the gripper as its own dimension. Decide between continuous position and a binary open/close with a threshold; record what the teleop interface actually sent.
Action chunking
Predict a sequence of future actions instead of one. It reduces the effective horizon over which errors compound and handles pauses and non-Markovian demos. Published defaults (starting points, not tuned values):
- ACT: chunk 100 at 50 Hz (2 s). Success rose sharply from chunk 1 to 100.
- Diffusion Policy: predict 16, execute 8, observe 2 frames, at 10 Hz.
- pi0, SmolVLA: chunks of 50.
Heuristics: the chunk should cover roughly 0.5-2 s of motion; execute only part of it before replanning if the task needs reactivity (moving objects, contact surprises). Longer chunks are smoother but less reactive. Execution modes (synchronous, temporal ensembling, asynchronous) are under Decision 6.
History
Start with no history or two frames. Long observation histories invite the copycat problem: the policy learns to repeat its previous action from proprioceptive history instead of reading the scene (Wen et al. 2020). Add history only to fix a failure that needs it (occluded state, velocity estimation) and verify the fix on rollouts.
Proprioception vs images
- Include proprioception (joint positions, gripper state); it is cheap and informative.
Normalisation
- Normalise each state and action dimension using dataset statistics (mean/std or min/max to [-1, 1]; diffusion and flow heads usually expect [-1, 1]).
- Save the statistics with the checkpoint and load them in the deployment code. A stale or recomputed stats file is a classic cause of a policy that moves wildly.
- Guard against near-constant dimensions (std near 0); clamp the denominator.
Decision 3: Policy Choice
Start with the simplest policy that can represent the demos, and keep it as a baseline.
Single task, one robot, no language, < ~300 demos?
├── Joint-space leader-follower data, precise motions ......... ACT
├── Demos genuinely multimodal (several valid strategies) ..... Diffusion Policy (CNN first)
└── State-based sim task / pipeline sanity check .............. BC MLP baseline, then the above
Multiple tasks, language instructions, or new objects/scenes?
├── Compute-limited (one consumer GPU) ........................ SmolVLA fine-tune
├── 24-80 GB GPU, single or bimanual arm ...................... pi0 / pi0.5 (openpi) or OpenVLA-OFT
└── Humanoid or NVIDIA stack (Isaac, Jetson Thor) ............. GR00T N1.7 fine-tune
Per-family notes (BC, ACT, Diffusion, flow, VLAs): references/policy-landscape.md.
Fine-tune vs from scratch: fine-tune a pretrained policy when your embodiment or action convention is close to its pretraining data, when you need language or generalisation, or when you have few demos per task across many tasks. Train from scratch when latency is tight, the task is narrow, or the licence does not fit. When in doubt, run both on the same evaluation set; the comparison costs less than an argument.
Licences differ and can disagree between a README and the checkpoint LICENSE; check
references/policy-landscape.md, then the checkpoint repo, before a product decision.
Decision 4: Training
Recipe (heuristic starting point)
- Hold out episodes, not frames, for validation (frames from one episode are near-duplicates). Hold out a few initi
Truncated for display — read the full file on GitHub.
Related Skills
taste-skill
120.0kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
Claude-Code-Game-Studios
40.6kTurn Claude Code into a full game dev studio — 49 AI agents, 75 workflow skills, and a complete coordination system mirroring real studio hierarchy.
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
