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
references/techniques.md
Techniques
Designing keys from anatomy (keydesign.mjs)
Author a key as intents in the reference body's frame (+X the body's left, +Y up, +Z forward):
u: the upper-arm direction (shoulder to elbow); it doubles as the elbow pole key;f: the forearm direction (elbow to wrist);b: the blade direction.
keydesign returns hand = shoulder + L1·u + L2·f (L1 0.254, L2 0.249, shoulders at x ±0.177, y 1.36). It also returns raise, flex, the blade's angle off the forearm and reach, and flags anything over the limits. Paste hand, elbow and blade into the key. Examples that shipped in Thornvigil 1.0.72:
| Key | u | f | b | flex |
|---|---|---|---|---|
| quick contact | [-.2,-.55,.81] | [0,-.15,.99] | [.4,-.6,.7] | 28° |
| quick follow-through end | [.35,-.88,.3] | [.95,-.15,.2] | [.4,-.5,.75] | 57° |
| heavy sink | [.2,-.85,.5] | [.65,-.1,.75] | [.2,-.5,.84] | 54° |
| heavy rebound | [.05,-.8,.6] | [.3,.1,.95] | [.7,.35,.62] | 60° |
Then sample what the baker actually produced with at.mjs <gender> <clip> <times...>. The wrist cap and the forearm roll decide where the blade really lands. When it misses, change f (the forearm), not b.
Baker architecture (sword strikes, sword-attacks.mjs)
Keys. k(time, { hand, blade, elbow, shield, hips, chest, pitch, stance, shift, dip, lateral }, ease).
Eases:
smoothis smoothstep,inis u² (it arrives at twice the average speed),outis ease-out cubic.An
inkey followed by a key that starts from rest is a velocity hitch. Space such keys so the arrival speed stays under the hand-speed cap.
Hands ride their shoulders.
reachFor(side, key)adds the key's offset from the stance shoulder to the current shoulder.arcAbout(from, to, t, pivot)slerps the direction about the stance shoulder and lerps the length.Effect: the hand travels with the body, and the elbow never folds shut halfway between keys.
Wrist.
arms.wrist('R', desiredHand, { bend: WRIST_BEND (.7), limit: FOREARM_ROLL (.85) }).The blade may roll about its own line to whichever grip the wrist reaches most naturally.
Kinetic chain. The body samples the pose 35 ms ahead (lead) and the chest 17 ms ahead. The pelvis LEAD never crosses a bow's loose (LOOSES); the lead shrinks to |S − t| near it.
Limiter. limitJointSpeed pins the contact frame and drags frames before it. A bow's loose is not pinned. A snap hold key at S·0.97 leaks 79% of the release into the frame before, so hold at S − 1/60 instead.
Performances (bow, staff, spells: skill-performances.mjs)
Channels.
drawOnblends the draw in.drawsets how far the fingers are along the line from the nock to the anchor.bowArmholds the bow arm out on the line through the follow-through.loosefollows the fly-back path.homeblends from the fly-back point down to the keyed recovery hand.shruglifts the shoulders;shakeis the tremble.
drawBow() does the following, in order:
Extends the bow arm to 98.5% reach.
Rolls the bow about its stave so the string faces the anchor.
Straightens the draw wrist.
Solves the draw hand so
f_middle.01.Rlands on the target. It iterates three times, using the finger's offset from the hand.
The loose.
It follows a continuous IK path from the anchor to the fly-back point, then home.
The fly-back point is the anchor, plus 8 cm back along the arrow, plus 12 cm to the draw side, minus 4 cm down.
It is solved outright until the hand is nearly home. Never blend two unrelated arm solutions: that once flung the hand 46 cm.
The pole lerps from back-and-level to down-and-forward as
homerises, so the arm comes down beside the body, not behind the back.
Grips (player-equipment-grips.js)
Finger poses:
fingerAngles(fist);relaxedAngles;hookAngles(index, middle and ring curled to about 1.3–1.35 rad at the middle joint, thumb tucked).
Calls:
apply({ carry, open: [...sides], hook: [...sides] }); a hooked side wins.The drawing hand's hook window is in
player-actor.jsdrawHook(). It runs from contact·0.2 to contact + 0.45·(T − contact). Before this pass the post-release hand opened into a claw.
The draw arm and the shoulder skin
With the hand under the jaw, the draw elbow and the upper-arm skin fight:
| Change | Effect on the upper-arm skin crush (limit 3×) |
|---|---|
| elbow level with the arrow (pole y −0.2) | 3.0–3.3×, raise 104–110° |
| elbow 6–8 cm under the arrow | 2.8–3.0× |
| more shrug (0.13 → 0.21) | helped once, hurt the next time: not monotonic |
| elbow swung out to the side (pole x −0.5 → −0.68) | about −0.1× |
| hips side-on (−0.5 → −0.62) | about −0.25×, the biggest single win, and it matches archery form |
| anchor moved 2.5 cm back (jaw corner) | +0.2× (and it hid the hand from the game camera) |
Single-frame spikes (3.06× between 2.6× neighbours) come from one mid-draw configuration. Nudge that key's elbow pole and re-run armcheck <gender> <class>:<move> trace.
Live-rig check in the game
Bake numbers and the running game can disagree: layering, timing, a different rig or an old bundle. To read the real player rig:
Open the in-play review URL in the in-app browser.
Start the action with
game.startActionand step with__stepFrames.Find the player's skeleton among all rigs in the scene by the
forearm.Rwhose hand moves after one stepped frame. The camp has about 10 other rigs, and the firstforearm.Rfound is often a pilgrim.Print the flex angle and the hand-to-shoulder distance per frame.
references/thornvigil.md has the snippet.
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