Game Dev Combat Animation
Meng ToCommunityCreated by Meng To
- Skill
- Workflow
- Design and creative
- MIT
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured process for developing and refining character combat animations, such as melee strikes and bow shots. It emphasizes a data-driven approach, requiring the definition of a written standard before animation keys are set. The workflow involves designing keys based on anatomical intent, measuring joint ranges and skin deformation on the real skinned mesh, and conducting blind reviews to ensure animations meet specific visual and technical criteria. It includes tools for capturing frames, performing blind A/B comparisons, and verifying critic claims against live-rig data.
What it does
- Defines a standard for combat animation phases, body mechanics, and camera readability.
- Uses scripts to design animation keys based on upper-arm, forearm, and blade directions.
- Enforces joint range and skin deformation limits on the real skinned mesh.
- Facilitates blind A/B testing and critic reviews to evaluate animation quality.
- Provides tools to capture and compose side-by-side video comparisons of animations.
- Verifies critic feedback against full-resolution frames and live-rig numbers.
When to use it
- When creating or reworking character combat animations, including attacks, skills, or move sets.
- When animations exhibit visual issues like stretched, locked, or broken limbs.
- When establishing a formal standard or set of rules for animation testing.
- When scoring animations or aiming to reach specific performance targets.
Advantages
- Reduces visual artifacts like skin wringing or limb locking through strict measurement.
- Ensures consistency across different camera angles and character models.
- Provides an objective, data-backed method for evaluating and improving animations.
- Prevents common animation traps through a documented, repeatable process.
Usage examples
- “I need to create a new heavy sword strike for the knight character.”
- The agent will guide you through defining the move's phases, setting keys based on anatomical intent, and running the required arm and skin checks.
- “The archer's bow draw looks broken; how do I fix it?”
- The agent will help you capture the current animation, compare it against the standard, and use the provided tools to identify and correct the specific joint or path issues.
- “How can I score my current combat animations?”
- The agent will assist in setting up a blind review process with two critics and a blind A/B comparison against the previous release.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/mengto/game-dev-combat-animation/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip game-dev-combat-animation.zip -d .agents/skills
Documentation by Meng To
Game dev: combat animation
Distilled from the Thornvigil knight-and-archer pass (2026-09-30 to 10-01, releases 1.0.71 and 1.0.72). Its outcome:
Arms and hands won 5 of 8 blind A/B comparisons against the previous release.
The archer's broken anchor and the knight's frozen, straight-armed follow-through were fixed.
Seven rounds of fixes came from traps that numbers would have caught earlier. Those traps are listed below.
Read references/thornvigil.md for the project's files, commands and current state, and references/traps.md before changing keys.
The loop
Write the standard before touching keys. Extend
docs/combat-animation-standard.md(or the project's equivalent) with the move's own numbered rules:Phases on the game's clock: anticipation, the contact or release on the rule's frame, recovery.
Body mechanics, weapon path, camera reads.
Mark each rule test (measured) or reviewed (scored from frames).
Ground every rule in a real reference: a Tripo Studio motion-capture preset for body mechanics, or coached technique such as the archery shot cycle. Use Tripo presets only; the user has no Mixamo account and declined Quaternius.
Baseline first. Capture both surfaces (the Characters page and in play), keep the frames, and get blind scores before changing anything.
Design keys from anatomy, not from hand positions. For each key pick the upper-arm direction
u, the forearm directionfand the bladeb, then runkeydesign.mjs. It returns the hand target and flags:raise over 100°;
flex outside 12–140°;
a blade outside 25–115° off the forearm. Hand keys ride the shoulder; blade and elbow keys are world directions. See
references/techniques.md.
Measure before looking. Bake, then:
armcheck.mjsfor joint ranges and the skin's stretch and crush per arm region on the real mesh;at.mjsfor the fist and blade at given times;the move's own probe:
knight-measure.mjs,anchor.mjsordrawfit.mjs. Fix numbers that break a rule before spending a capture.
Test. Run the arm-ranges test and the move's tests. When you add a test for a bug, temporarily restore the bug and prove the test fails; a test that reads the same wrong convention as the code passes forever.
Capture both cameras and look yourself at full resolution. A pose that reads well from the front can read broken from the game camera, and the reverse. Diff each capture against the previous round to be sure it is new.
Judge. Use two blind critics with a fixed rubric (5 criteria × 0–2; the lower score counts) and a blind A/B against the last release with identical sheet titles. Then verify every claim against full-resolution frames and live-rig numbers before acting on it. See
references/review.mdandtemplates/.Ship by the project's rules: tests, build, changelog with real screenshots, push, sizes, publish. Use the
workflow-ship-changeskill. If a pushed but unpublished release regresses, correct it in place with a follow-up commit; don't add a version for something players never saw.Show it. When asked for videos, capture at 30 fps on the move's own clock, place the Characters page and in-play views side by side, and play real speed then quarter speed (
vidcompose.py+encode.swift).
The arm and hand rules
The rig has no twist or corrective bones; past these ranges the skin visibly wrings, crushes or stretches. Every frame of every strike stays inside them, on both bodies, measured on the real skinned mesh.
| Rule | Limit |
|---|---|
| Elbow flexion | 10–152°; the striking or drawing arm keeps ≥20° through the middle 80% of the move |
| Contact reach | sword hand ≥60% of arm length from the shoulder at contact (reach into the blow, never lock) |
| Wrist | bend ≤50°, roll ≤45°; sword wrist capped at 40°; a drawing hand held straight |
| Twist | forearm roll ≤52°, upper-arm roll ≤52° |
| Raise | ≤105° from hanging (shoulder skin crushes beyond); no overhead raises |
| Skin | the worst 1% of each arm or hand region's edges: stretch ≤2×, crush ≤3× against the bind |
| Hands | always in a pose: fist on a grip, hook on a string (set → loose → follow-through), relaxed when empty; never splayed or clawed |
| Paths | hands ride their shoulders and arc about them between keys; blade keys stay reachable (25–115° off the forearm) |
Full rules, with the reasons and the tests that enforce them, are in references/rules.md.
Techniques that worked
Shoulder-relative hands with arc interpolation. A fixed hand target that the lunging trunk drives the shoulder into crushes the arm, and a straight-line lerp folds the elbow shut mid-way.
Aim the forearm, not the wrist. With the wrist capped, the blade lands on the cone the forearm roll allows. To change the blade, change
f.Read blade keys in world space. With the trunk wound back about 70°, "over the sword shoulder" points across behind the head. Tilt the chamber tip-up so it reads as a diagonal.
Keep the follow-through moving.
Quick cut: carry the hand down past the shield-side hip on a bent elbow, with the blade still on the line.
Heavy cut: sink across, then rebound with the elbow folding.
Never hold an arm out at the foe with the blade hanging.
Bow draw. Anchor under the jaw beside the chin, where the hand stays in sight from both cameras. The draw elbow rides 6–8 cm under the arrow. Turn the hips side-on, which fixed draw-shoulder crush better than shrug or elbow poles. Hold the hook through the loose, then send the hand out past the shoulder rather than round the head.
Kinetic chain. Hips lead the chest, and the chest leads the arm. A bow's recoil answers the loose and never leads it.
Traps that each cost a round
references/traps.md has symptom → cause → fix for each. The short list:
Bone axes. The HumGen
headbone is +Y forward and +Z down. Check any bone-local offset against mesh landmarks (face.mjs).Masked failures. The first failing assertion hides every later move in the same test loop, and the first failing gender hides the other.
Camera reads.
A hand by the neck reads as "behind the head" from the game camera.
A blade pointing at the camera reads as "hanging".
An elbow bent in the view plane reads as straight.
Critic misreads. Thumbnails mislead critics. Check full-resolution frames and the live rig before changing anything.
Capture traps.
Never edit
srcwhile a capture runs.After
location.reload(), wait before evaluating the next script.Hand-stepped frames are not FPS measurements.
Report
Lead with what changed in the moves and whether it is live. Then give:
a scores table: before → after, lower of the two critics, per surface;
the A/B result;
the faults still open, named by frame;
the tests added;
file and push sizes.
Say plainly when a score sits short of the target and why.
Files
- ATTRIBUTION.mdAdded by AutoGineer873 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md7.8 KiB
- references/review.md3.9 KiB
- references/rules.md7.5 KiB
- references/techniques.md5.6 KiB
- references/thornvigil.md7.1 KiB
- references/traps.md5.1 KiB
- scripts/install.shScript1.2 KiB
- scripts/tools/ab-pack.pyScript1.1 KiB
- scripts/tools/anchor.mjsScript2.3 KiB
- scripts/tools/armcheck.mjsScript7.4 KiB
- scripts/tools/at.mjsScript1.6 KiB
- scripts/tools/baketime.mjsScript1.0 KiB
- scripts/tools/drawfit.mjsScript2.5 KiB
- scripts/tools/encode.swiftScript2.3 KiB
- scripts/tools/face.mjsScript2.0 KiB
- scripts/tools/host.html103 B
- scripts/tools/jumps.mjsScript2.1 KiB
- scripts/tools/keydesign.mjsScript2.2 KiB
- scripts/tools/knight-measure.mjsScript5.2 KiB
- scripts/tools/msheet.pyScript1.1 KiB
- scripts/tools/play.jsScript1.8 KiB
- scripts/tools/psheet.pyScript722 B
- scripts/tools/setup.jsScript2.8 KiB
- scripts/tools/shot.jsScript1.2 KiB
- scripts/tools/vidcompose.pyScript2.3 KiB
- templates/ab-judge-prompt.md1.4 KiB
- templates/critic-prompt.md2.3 KiB
scripts/tools/keydesign.mjs
// Turn anatomical key intents into hand targets and check them against the arm rules before baking.
// Intents are in the body frame of the reference body (+X the body's left, +Y up, +Z forward):
// u = upper-arm direction (shoulder -> elbow), f = forearm direction (elbow -> wrist), b = blade.
// The hand target is shoulder + L1*u + L2*f; the elbow (pole) key is u itself.
// node keydesign.mjs R '[-.15,-.45,.88]' '[.12,.05,.99]' '[.5,-.45,.74]'
// import { key } from './keydesign.mjs'
// Flags: raise > 100 (keep a margin under the 105 test), flex > 140 or < 12, blade outside 25..115
// degrees off the forearm (a straight wrist holds a sword ~70 degrees off it; the capped wrist cannot
// reach beyond that band, and an unreachable blade lands wherever the forearm roll leaves it).
// L1, L2 and the shoulders are the Thornvigil HumGen reference body; measure another rig's with at.mjs.
const L1 = .254, L2 = .249, S = { R: [-.177, 1.36, -.045], L: [.176, 1.36, -.041] };
const n = v => { const l = Math.hypot(...v);return v.map(x => x / l); }, dot = (a, b) => a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
const deg = x => Math.acos(Math.max(-1, Math.min(1, x))) * 180 / Math.PI;
export function key(side, u, f, b) {
u = n(u);f = n(f);
const hand = S[side].map((s, i) => +(s + L1 * u[i] + L2 * f[i]).toFixed(3));
const raise = deg(-u[1]), flex = deg(dot(u, f)), blade = b ? deg(dot(n(b), f)) : null, reach = Math.hypot(...hand.map((h, i) => h - S[side][i])) / (L1 + L2);
const issues = [raise > 100 && 'raise ' + raise.toFixed(0), flex > 140 && 'flex ' + flex.toFixed(0), flex < 12 && 'locked ' + flex.toFixed(0), b && (blade < 25 || blade > 115) && 'blade/forearm ' + blade.toFixed(0)].filter(Boolean);
return { hand, elbow: u.map(x => +x.toFixed(2)), raise: +raise.toFixed(0), flex: +flex.toFixed(0), blade: blade && +blade.toFixed(0), reach: +reach.toFixed(2), issues };
}
if (process.argv[1]?.endsWith('keydesign.mjs') && process.argv.length > 3) {
// Vectors as '[-.2,-.55,.81]' (leading zeros optional).
const [side, u, f, b] = process.argv.slice(2), vec = s => s.match(/-?\d*\.?\d+/g).map(Number);
console.log(JSON.stringify(key(side, vec(u), vec(f), b ? vec(b) : null)));
}
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Python, Needs Node.js
Security
What our scanner noticed· Low risk
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Meng To
- Publisher
- Meng To (Community)
- Source
- MengTo/Skills · agent-skills/game-combat/game-dev-combat-animation · commit 5ea1661
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Meng To.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download game-dev-combat-animation.zip