chat-pet-sprite-creation
Skill196k starsChanged 17 days agoMITView on GitHub
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
Trending
More talk lately.about the whole repository
Who's talking about microsoft/vscode
- A Hacker News story“VS Code inserting 'Co-Authored-by Copilot' into commits regardless of usage”Hacker News · May 2, 2026 · 1.5k points
- microsoft/TypeScript“Convert the codebase to modules”GitHub · Nov 2, 2022 · 1.3k reactions
- A Hacker News story“VS Code uses 13% CPU when idle due to blinking cursor rendering”Hacker News · Mar 23, 2017 · 899 points
- A Hacker News story“VS Code Roadmap 2018”Hacker News · Nov 1, 2017 · 360 points
- microsoft/vscode-python“Fix environment-dependent git pre-commit hooks”GitHub · Feb 18, 2020 · 338 reactions
The biggest 5 of 96 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 96
Talked about on Bluesky, Hacker News and GitHub (96 times).
On Bluesky · 48
- Jan 18, 2026Decided to quit being hard headed and just do what everyone else is doing/has done. — @advanced-eschatonics.com12 likes and reposts · 1 reply
- Jul 12, 2026📦 microsoft / vscode ⭐ 187,428 (+52) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social3 likes and reposts
- Jul 2, 2026📦 microsoft / vscode ⭐ 186,897 (+73) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social3 likes and reposts
- Nov 2, 2025📦 microsoft / vscode ⭐ 178,121 (+34) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social3 likes and reposts
- Jan 15, 2025📦 microsoft / vscode ⭐ 166,156 (+43) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social3 likes and reposts
43 more on Bluesky
- Jul 8, 2023📦 microsoft / vscode ⭐ 147,967 (+41) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social3 likes and reposts
- Apr 5, 2026📦 microsoft / vscode ⭐ 183,440 (+45) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social2 likes and reposts
- Jul 18, 2025Sorry to hear you are hitting this problem! We would love to help you out over at github.com/microsoft/vs... and if you assign your issue… — @eleanor-py.bsky.social2 likes and reposts
- May 21, 2025🚀 Skyrocketing! 🚀 (200+ new stars) 📦 microsoft / vscode ⭐ 171,731 (+283) 🗒 TypeScript Visual Studio Code — @github-trending.bsky.social2 likes and reposts
- May 20, 2025🚀 Skyrocketing! 🚀 (200+ new stars) 📦 microsoft / vscode ⭐ 171,513 (+253) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social2 likes and reposts · 1 reply
- Mar 30, 2025📦 microsoft / vscode ⭐ 169,312 (+41) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social2 likes and reposts
- Mar 7, 2025📦 microsoft / vscode ⭐ 168,219 (+82) 🗒 TypeScript Visual Studio Code — @github-trending.bsky.social2 likes and reposts
- Feb 12, 2025📦 microsoft / vscode ⭐ 167,217 (+56) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social2 likes and reposts
- Feb 8, 2025📦 microsoft / vscode ⭐ 167,047 (+49) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social2 likes and reposts
- Jan 24, 2025📦 microsoft / vscode ⭐ 166,533 (+32) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social2 likes and reposts
- Jan 15, 2025📦 microsoft / vscode ⭐ 166,156 (+43) 🗒 TypeScript Visual Studio Code — @github-trending.bsky.social2 likes and reposts
- Sep 1, 2024📦 microsoft / vscode ⭐ 162,015 (+32) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social2 likes and reposts
- Jun 10, 2024📦 microsoft / vscode ⭐ 159,629 (+49) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social2 likes and reposts
- Aug 26, 2023🔥 Hot Repo! 🔥 (100+ new stars) 📦 microsoft / vscode ⭐ 150,079 (+137) 🗒 TypeScript Visual Studio Code — @github-trending.bsky.social2 likes and reposts · 1 reply
- Nov 7, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 microsoft / vscode ⭐ 194,788 (+295) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social1 likes and repost · 1 reply
- Nov 6, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 microsoft / vscode ⭐ 194,788 (+295) 🗒 TypeScript Visual Studio Code — @github-trending.bsky.social1 likes and repost · 1 reply
- Sep 26, 2026📦 microsoft / vscode ⭐ 192,963 (+78) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social1 likes and repost
- Sep 26, 2026📦 microsoft / vscode ⭐ 192,963 (+78) 🗒 TypeScript Visual Studio Code — @github-trending.bsky.social1 likes and repost
- Jun 25, 2026🔥 Hot Repo! 🔥 (100+ new stars) 📦 microsoft / vscode ⭐ 186,883 (+192) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social1 likes and repost
- Jun 4, 2026🔥 Hot Repo! 🔥 (100+ new stars) 📦 microsoft / vscode ⭐ 185,791 (+129) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social1 likes and repost
- May 20, 2026📦 microsoft / vscode ⭐ 185,087 (+57) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social1 likes and repost
- Apr 16, 2026📦 microsoft / vscode ⭐ 183,924 (+72) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social1 likes and repost
- Mar 5, 2026📦 microsoft / vscode ⭐ 182,312 (+76) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social1 likes and repost
- Dec 28, 2025📦 microsoft / vscode ⭐ 180,078 (+53) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social1 likes and repost
- Jul 2, 2025📦 microsoft / vscode ⭐ 174,099 (+53) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social1 likes and repost
- May 24, 2025🚀 Skyrocketing! 🚀 (200+ new stars) 📦 microsoft / vscode ⭐ 172,520 (+306) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social1 likes and repost
- May 8, 2025📦 microsoft / vscode ⭐ 170,885 (+85) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social1 likes and repost
- Apr 11, 2025📦 microsoft / vscode ⭐ 169,887 (+76) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social1 likes and repost
- Apr 7, 2025📦 microsoft / vscode ⭐ 169,634 (+51) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social1 likes and repost
- Mar 6, 2025📦 microsoft / vscode ⭐ 168,138 (+89) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social1 likes and repost
- Feb 16, 2025📦 microsoft / vscode ⭐ 167,406 (+60) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social1 likes and repost
- Jan 2, 2025lol yeah vscode is kinda wild tbh github.com/microsoft/vscode is the open source project but the versions you get from… — @benharri.org1 likes and repost · 2 replies
- Nov 1, 2024📦 microsoft / vscode ⭐ 163,956 (+52) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social1 likes and repost
- Jun 18, 2024📦 microsoft / vscode ⭐ 159,805 (+32) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social1 likes and repost
- Jun 6, 2024📦 microsoft / vscode ⭐ 159,414 (+58) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social1 likes and repost
- Apr 11, 2024📦 microsoft / vscode ⭐ 157,765 (+42) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social1 likes and repost
- Jan 29, 2024📦 microsoft / vscode ⭐ 155,349 (+36) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social1 likes and repost
- Jan 19, 2024📦 microsoft / vscode ⭐ 155,009 (+57) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social1 likes and repost
- Dec 24, 2023📦 microsoft / vscode ⭐ 154,283 (+39) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social1 likes and repost
- Mar 17, 2025Something I just realized I want: wikilinks but for any website; kinda like DDG bangs, but for linking to things more easily. Generally… — @blakes.dev0 likes and reposts · 1 reply
- Feb 16, 2024🚀 Skyrocketing! 🚀 (200+ new stars) 📦 microsoft / vscode ⭐ 156,140 (+203) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social0 likes and reposts · 1 reply
- Sep 4, 2023🔥 Hot Repo! 🔥 (100+ new stars) 📦 microsoft / vscode ⭐ 150,693 (+178) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social0 likes and reposts · 1 reply
- Aug 26, 2023🔥 Hot Repo! 🔥 (100+ new stars) 📦 microsoft / vscode ⭐ 150,078 (+137) 🗒 TypeScript Visual Studio Code — @github-trending-js.bsky.social0 likes and reposts · 1 reply
On Hacker News · 39
- May 2, 2026VS Code inserting 'Co-Authored-by Copilot' into commits regardless of usage1.5k points · 850 comments
- Mar 23, 2017VS Code uses 13% CPU when idle due to blinking cursor renderingsays it tested it899 points · 760 comments
- Nov 1, 2017VS Code Roadmap 2018360 points · 230 comments
- Dec 19, 2019Santa hat removed from VS Code after complaint243 points · 157 comments
- Apr 18, 2017Show HN: Visual Studio Code for ARM, submitted to core236 points · 83 comments
34 more on Hacker News
- Feb 8, 2026Billing can be bypassed using a combo of subagents with an agent definition213 points · 122 comments
- Oct 27, 2023Microsoft: Require user consent before sending any telemetry128 points · 122 comments
- May 29, 2020Insider Build of VSCode for Windows/ARM64106 points · 79 comments
- May 6, 2026Update on "Co-authored-by: Copilot" in commit messages102 points · 66 comments
- Dec 20, 2019Visual Studio Code repository is open again87 points · 163 comments
- Jun 19, 2018Want free VS Code? Build it from source84 points · 65 comments
- Oct 21, 2020Issue Grooming81 points · 68 comments
- Sep 25, 2026Bug: Border radius has infected VSCode editor80 points · 53 comments
- Mar 19, 2022Visual Studio Code is randomly erasing included header files with latest update75 points · 44 comments
- Sep 3, 2023VSCode Removes Twitter Integration68 points · 31 comments
- Oct 15, 2017New VS Code icon is ugly66 points · 48 comments
- Feb 4, 2023Microsoft mangles VS Code protected properties to prevent UI customization65 points · 28 comments
- Apr 29, 2020VS Code was lost on shutdown with pending update (2018)64 points · 90 comments
- Oct 27, 2025Severe performance penalty found in VSCode rendering loop63 points · 45 comments
- Nov 24, 2020VSCode memory leak issue marked “out-of-scope”62 points · 71 comments
- Feb 16, 2021Visual Studio Code team considers Vim mode depending on upvotes56 points · 27 comments
- Nov 3, 2023VS Code Introduces Floating Windows Support - The Most Requested Feature Ever46 points · 10 comments
- Jan 29, 2019VS Code Roadmap 201933 points · 3 comments
- Apr 21, 2022VS Code Development Process27 points · 3 comments
- Feb 2, 2024VSCode stopped supporting an old glibc version and near EOL users are in trouble23 points · 8 comments
- Jul 11, 2024VSCode won't start on several Mac OS versions, broken over a week16 points · 3 comments
- Nov 15, 2025Markdown files are not openable because of GitHub Copilot11 points · 1 comment
- Mar 17, 2022VSCode creates many empty file with invalid code automatically8 points · 1 comment
- Dec 19, 2019VS Code Issue Tracker Meltdown8 points · 4 comments
- Aug 31, 2023VSCode, have you collaborated with China?7 points
- Mar 15, 2023VS Code Monitors Full Command Line, CPU, Memory Usage of All Processes7 points · 1 comment
- Nov 20, 2024Thing Deleted 3 Months of Work6 points · 4 comments
- Nov 3, 2024VSCode high CPU usage issue affecting macOS6 points
- Oct 9, 2026VSCode silently switches to Microsoft models, ignoring BYO agent configuration5 points · 1 comment
- May 28, 2026VSCode fires up screen recording5 points
- Oct 5, 2025Microsoft Accidentally removes extensions from VSCode Marketplace5 points · 1 comment
- Nov 2, 2023After 7 years, VS Code finally implements preview support for floating windows5 points · 2 comments
- Feb 27, 2020THIS THING DELETED 3 MONTHS OF WORK!!!!5 points · 5 comments
- Dec 20, 2019VS Code is getting flak for removing Santa hat emoji5 points · 7 comments
On GitHub · 9
- Nov 2, 2022Convert the codebase to modules — microsoft/TypeScript1.3k reactions · 56 comments
- Feb 18, 2020Fix environment-dependent git pre-commit hooks — microsoft/vscode-python338 reactions · 57 comments
- Dec 12, 2025Handle writes to non-blocking pty instead of wrapping via Node's tty api — microsoft/node-pty256 reactions · 5 comments
- Oct 31, 2016Add Windows support and first-class Linux support — vercel/hyper160 reactions · 98 comments
- Sep 11, 2024Proposed expandable hover API — microsoft/TypeScript99 reactions · 15 comments
4 more on GitHub
- Dec 22, 2020LSP 3.16.0 — neoclide/coc.nvim64 reactions · 52 comments
- Mar 8, 2021Import statement completions — microsoft/TypeScript47 reactions · 9 comments
- Aug 13, 2017Feature/simple fullscreen mode — electron/electron43 reactions · 8 comments
- May 30, 2018Add support for grid layout — VSCodeVim/Vim37 reactions · 18 comments
In this repository96 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .eslint-plugin-local/AGENTS.mdAGENTS.md
- extensions/copilot/assets/prompts/skills/agent-customization/references/agents.mdAGENTS.md
- extensions/copilot/src/extension/chatSessions/copilotcli/AGENTS.mdAGENTS.md
- extensions/copilot/src/platform/authentication/common/AGENTS.mdAGENTS.md
- src/vs/platform/agentHost/AGENTS.mdAGENTS.md
- src/vs/platform/agentHost/common/state/AGENTS.mdAGENTS.md
- src/vs/platform/agentHost/node/copilot/prompts/AGENTS.mdAGENTS.md
- src/vs/platform/agentHost/test/node/AGENTS.mdAGENTS.md
- src/vs/workbench/contrib/imageCarousel/AGENTS.mdAGENTS.md
- extensions/copilot/.github/copilot-instructions.mdCopilot instructions
- .github/copilot-instructions.mdCopilot instructions
- launchSkill
- github-copilot-upgraderSkill
- launchSkill
- agent-customizationSkill
- chronicleSkill
- create-agentSkill
- create-canvasSkill
- create-hookSkill
- create-instructionsSkill
- create-promptSkill
- create-skillSkill
- initSkill
- migrate-customizationsSkill
- record-videoSkill
- troubleshootSkill
- accessibilitySkill
- agent-host-chat-contributionsSkill
- agent-host-e2e-testsSkill
- agent-host-logsSkill
- author-contributionsSkill
- auto-perf-optimizeSkill
- azure-pipelinesSkill
- build-champ-triageSkill
- chat-customizations-editorSkill
- chat-perfSkill
- ci-artifact-testingSkill
- codenotifySkill
- code-oss-logsSkill
- code-reviewSkill
- component-fixturesSkill
- componentSkill
- context-menusSkill
- cpu-profile-analysisSkill
- customizations-in-the-agent-hostSkill
- design-philosophySkill
- doc-commentsSkill
- endgame-statusSkill
- experimentsSkill
- feature-tryoutsSkill
- feedback-learningSkill
- fix-ci-failuresSkill
- fixissuenoSkill
- flaky-smoke-testsSkill
- heap-snapshot-analysisSkill
- hoverSkill
- integrated-browserSkill
- integration-testsSkill
- issue-groupingSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
46 rules. About 0 are common, 36 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈36
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Create pet sprites that feel like one continuous character rather than separate drawings.
- Distinctive: line 17
Read the current implementation before drawing.
- Distinctive: line 62
Never come from antialiasing or resampling.
- Distinctive: line 64
Use nearest-neighbor rendering only.
- Distinctive: line 68
Never redraw the pet body from memory.
- Distinctive: line 70
Use the current idle sprite as the baseline for resting, pointer-driven, or playful states.
- Distinctive: line 71
Use the current rendering sprite as the baseline for request/processing states.
- Distinctive: line 89
Use a larger canvas only when content intentionally extends outside the canonical body box:
- Very specific: line 95
Do not center the body inside a wider frame.
- Distinctive: line 106
Use a different eye shape only when the state communicates a special expression, such as sleep, dizzy, love, worry, or impact.
- Distinctive: line 117
When adding or changing a DOM-eye state:
- Distinctive: line 119
Keep the sprite eye sockets empty.
- Very specific: line 120
Add cursor behavior to doesChatPetStateTrackCursor when appropriate.
- Very specific: line 121
Add blink behavior to doesChatPetStateBlink(state, frameIndex) when appropriate.
- Distinctive: line 122
Verify the tall-eye blink, state-specific eye height, and pointer offsets in both facing directions.
- Distinctive: line 123
Verify frames that intentionally stop blinking, such as a held terminal pose.
- Distinctive: line 125
Never combine baked pupils with the runtime eye overlay.
- Distinctive: line 144
Create one geometry master and apply the two established palettes.
- Distinctive: line 152
Test both directions because mirroring also changes where wide sprites overhang.
- Distinctive: line 172
Every frame uses the same rectangle.
- Distinctive: line 216
Keep the transient-state duration consistent with the intended loops or one-shot playback.
- Distinctive: line 224
If one sheet is reused in reverse, as with respawn → despawn:
- Distinctive: line 227
Check the effect in both directions.
- Distinctive: line 228
Avoid one-way visual cues that become nonsensical backward.
- Distinctive: line 229
Verify the reverse effect at its actual destination, not only on a neutral canvas.
- Distinctive: line 235
Use sprite frames for changes to the pet or prop silhouette.
- Distinctive: line 244
Do not redraw every translated/rotated pose into the sheet.
- Distinctive: line 253
Do not guess a completion time with an unrelated timeout.
- Distinctive: line 298
Keep the current rendering architecture:
- Very specific: line 303
Keep imageSmoothingEnabled = false and image-rendering: pixelated.
- Very specific: line 306
Use requestAnimationFrame for physics, but cap integration steps to prevent tunneling after a slow frame.
- Distinctive: line 311
When adding a state, update every applicable surface:
- Very specific: line 313
Add the state to ChatPetState.
- Very specific: line 315
Add frame durations in getChatPetFrameDurations.
- Distinctive: line 320
Add the transient-state duration and trigger.
- Distinctive: line 321
Add deterministic completion transitions for multi-phase states.
- Distinctive: line 322
Add facing, overhang, fixed-decoration, clipping, or CSS treatment.
- Distinctive: line 323
Add a localized ARIA status announcement for user-triggered interactions.
- Distinctive: line 324
Update accessible help when the gesture is discoverable/useful.
- Distinctive: line 325
Update focused unit tests.
- Distinctive: line 327
Do not add art without completing the runtime contract.
- Very specific: line 329
Keep the visuals silent: images, canvases, eyes, and effects use empty alt text and aria-hidden.
- Very specific: line 376
Use the chat/chatPetAccessoryRig/chatPetAccessoryRig/CriticalPoses component fixture to review critical animated and reduced-motion poses, …
- Very specific: line 378
Run the focused unit tests using the repository's unit-tests skill.
- Distinctive: line 380
Prefer exporting pure helpers for timing, geometry, random selection, and state precedence, then test them directly.
- Distinctive: line 386
When replacing an existing APNG, prefer a new versioned filename in the README so GitHub and browser caches cannot keep showing the …
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Chat Pet Sprite Creation
Create pet sprites that feel like one continuous character rather than separate drawings. Start from the current pet body, preserve its visual anchor, and make every difference intentional.
Source of truth
- Sprite art:
src/vs/workbench/contrib/chat/browser/widget/media/chatPet/ - Runtime states, dimensions, timing, and transitions:
src/vs/workbench/contrib/chat/browser/widget/chatPetWidget.ts - Eye geometry, facing, clipping, and motion CSS:
src/vs/workbench/contrib/chat/browser/widget/media/chatPet.css - Unit tests:
src/vs/workbench/contrib/chat/test/browser/widget/chatPetWidget.test.ts
Read the current implementation before drawing. Existing dimensions and timings may have changed since this skill was written.
PR precedence and lineage
This skill distills the complete pet PR history. When rules conflict, use this precedence:
- Current code and tests
- The newest relevant open PR
- Newer merged PRs
- Older historical behavior
In particular, animation cleanup PR #330399 supersedes the old revive-sign flow and several earlier sprite/timing assumptions.
| PR | Durable learning |
| #327063 | The pet is one semantic button; sprite canvases, images, eyes, and effects are visual-only and aria-hidden. Resolve asset URLs through FileAccess. |
| #327412 | Model reactions as explicit states. Do not immediately repeat ordinary random reactions; sample rare transformations separately. |
| #327588 | Double-buffer sprite images and swap only after the pending image loads. Never blank the active sprite while a new source is loading. |
| #327696 | Stable/Insiders is a typed, persisted appearance choice. Keep variant naming and geometry systematic. |
| #327714 | Animated art is a horizontal sprite sheet plus a deliberate static reduced-motion PNG. Timing is runtime data, not image metadata. |
| #328334 | Persistent behavior such as “on the run” belongs in service state. Multi-phase animations advance from completion signals, not guessed delays. |
| #328480 | A drag release must not also trigger a click reaction. Gestures that share pointer events need explicit suppression/ownership. |
| #328530 | Waking consumes the interaction that woke the pet; it must not also trigger a random reaction. Reduced motion may skip the wake transition. |
| #329121 | Coalesce gaze updates, pause sprite timers while the document is hidden, and resume from elapsed time rather than replaying missed frames. |
| #329347 | Keep pixel-art pose changes in sprite frames and spatial motion in layout/CSS/physics. Complete falls from transition signals. |
| #329729 | Face the interaction before starting a reaction. Give each transient state an explicit lifetime and use real completion events for chained phases. |
| #329852 | Pointer and keyboard gestures need equivalent outcomes. Reduced motion preserves the state change while removing the travel animation. |
| #329867 | Attention animations are bounded; clapping stops after the confirmation-attention window even if the confirmation remains pending. |
| #330160 | Eyes are a composited runtime layer with tracking/blinking modes. Rapid facing changes can trigger a separate dizzy state. Wide art must respect live bounds. |
| #330275 | Physics uses the body footprint, bounded frame steps, and explicit impact moments. Recompute geometry when layout changes during flight. |
| #330399 | Latest animation contract: wide sleep/wake art, frame-aware blink composition, fixed-orientation decorations, and reverse despawn → forward respawn using one effect sheet. |
The logical pixel
The canonical art unit is one logical pixel:
8×8source pixels4×4CSS pixels at the standard96×96source →48×48display scale
Core silhouettes, facial features, props, and repeated details must use the same logical-pixel scale. Do not make a new object from smaller or larger blocks simply to fit more detail.
Effects may deliberately subdivide the logical pixel—for example, small stars, bubbles, or curved motion—but the subdivision must:
- Serve a specific effect that cannot read on the core grid.
- Stay consistent throughout that effect.
- Never come from antialiasing or resampling.
Use nearest-neighbor rendering only. Keep transparent backgrounds and hard pixel edges. Do not introduce blur, feathered alpha, color interpolation, or accidental off-grid scaling.
Start from a baseline
Never redraw the pet body from memory.
- Use the current idle sprite as the baseline for resting, pointer-driven, or playful states.
- Use the current rendering sprite as the baseline for request/processing states.
- Copy the complete body first, then alter only the parts required by the new state.
This preserves:
- Body width and height
- Bottom baseline
- Antenna roots and spacing
- Highlight and shadow ramps
- Eye sockets
- Collision/interaction footprint
The first and last key poses must transition cleanly to idle or rendering without a body-position, silhouette, baseline, or scale pop.
Canvas and anchoring
The default source canvas is 96×96, or 12×12 logical pixels.
Use a larger canvas only when content intentionally extends outside the canonical body box:
- A terminal or button may need extra width.
- A note, star, or bubble may need extra height.
- The body must remain anchored exactly where it sits in the baseline sprite.
Do not center the body inside a wider frame. Keep the body in the canonical 96×96 region and let the prop/effect overhang. Declare every nonstandard source dimension in chatPetWidget.ts and update wide-sprite boundary handling.
The runtime collision and movement box belongs to the pet body, not to a decorative overhang.
Eyes
The standard open eye is 1×2 logical pixels:
8×16source pixels4×8CSS pixels
Use a different eye shape only when the state communicates a special expression, such as sleep, dizzy, love, worry, or impact.
DOM eye layer
The DOM eye layer has two independent modes:
- Tracking supplies gaze, facing, blink, and drag expressions.
- Blinking can temporarily show DOM eyes for a non-tracking state and can vary by sprite frame.
States that use runtime gaze must use eye-less *-tracking-96 assets. States that use DOM blinking, such as typing, button press, or love in PR #330399, must also leave the corresponding pupil area available for the overlay.
When adding or changing a DOM-eye state:
- Keep the sprite eye sockets empty.
- Add cursor behavior to
doesChatPetStateTrackCursorwhen appropriate. - Add blink behavior to
doesChatPetStateBlink(state, frameIndex)when appropriate. - Verify the tall-eye blink, state-specific eye height, and pointer offsets in both facing directions.
- Verify frames that intentionally stop blinking, such as a held terminal pose.
Never combine baked pupils with the runtime eye overlay.
Baked-eye states
States with a fixed expression should bake the eyes into the art and opt out of cursor tracking. Preserve the standard eye position unless the expression intentionally changes it.
Stable and Insiders parity
Stable and Insiders are palette variants of the same animation.
They must have identical:
- Canvas dimensions
- Frame count and ordering
- Alpha mask and geometry
- Body anchor and overhang
- Static fallback pose
- Timing and iteration behavior
Create one geometry master and apply the two established palettes. Do not redraw variants independently.
Review the two variants side by side. Any shape difference is a bug unless the product explicitly requires it.
Facing and mirroring
Author one canonical facing direction and let the runtime mirror it for the other direction.
Test both directions because mirroring also changes where wide sprites overhang. Keep enough room for boundary correction near the left and right edges.
Decorations that must retain their screen orientation—such as text, musical notation, or directional symbols—must not be baked into a layer that the runtime mirrors. Model them as fixed-orientation decorations or render them separately.
The rendering speech bubble is flipped as a whole when it moves to the left of the pet so that its tail keeps pointing at the pet. Its dots are mirrored back on the canvas so they still appear from left to right; keep CHAT_PET_SPEECH_BUBBLE_DOTS_BOUNDS in chatPetWidget.ts aligned with the dots in the speech sprite, and keep the dots horizontally centered in the bubble.
Static asset and sprite sheet
Each animated state needs both variants of:
- A static PNG for reduced motion:
buddy-<state>-<variant>-<height>.png - A horizontal sprite sheet:
buddy-<state>-<variant>-<height>.spritesheet.png
The sprite sheet contract is:
sheet width = frame width × frame count
sheet height = frame heightEvery frame uses the same rectangle. Never shift frame boundaries or add per-frame padding.
Choose a meaningful static pose that communicates the state without motion. Do not assume the first animation frame is automatically the best reduced-motion fallback.
Layered accessories
Wearable accessories use a body-owned attachment rig and one palette-independent atlas per appearance under media/chatPet/accessories/. Do not export copies for individual runtime states or frames. Body animation metadata owns attachment movement; an accessory atlas only contains the few canonical shapes needed when the body geometry changes.
The default atlas is 256×192, divided into 64×64 cells. A hat whose supplied silhouette genuinely needs the full 12-logical-pixel body width may declare atlasCellSize: 96 and use a 384×288 atlas with 96×96 cells. Do not choose the wider tier merely to add detail; both tiers still use the same whole 8×8 logical pixels.
columns: upright | sleeping | impact | splat
row 0: head back layers
row 1: head front layers
row 2: right-eye front layersAn appearance may leave any cell transparent. For example, a plain hat leaves the eye row empty, while a combined Top Hat & Monocle appearance uses both head rows and the eye row. The airborne rig pose reuses the upright column. Add another canonical column only when an existing pose plus body-owned translation cannot preserve the intended silhouette.
Attachment tracks live in chatPetAccessoryRig.ts. Each track uses compressed frame spans with a canonical pose and independent head/right-eye anchors. A slot is omitted while a body-authored expression, prop, or complete silhouette replacement owns the same geometry, such as dizzy eyes, sunglasses, or the rare icon transformation. When frames inside one sheet bake different facing directions, the track marks those frames so the head accessory mirrors with the body before the whole pet's outer facing transform is applied. Update the body-owned track only when body geometry changes. Adding an ordinary accessory must not require editing tracks or renderer code.
Head-slot anchors include a one-logical-pixel wear offset so hats overlap the top of the head rather than resting on its silhouette. The love animation suppresses head accessories because its transformed head/antenna silhouette is the reaction. Treat slot visibility and fit as body-owned behavior, not per-hat exceptions.
Appearances that tuck the antennae under a larger hat opt into coversAntennae. The compositor uses body-owned occlusion bounds before drawing the hat front, so the behavior follows animation tracks and mirroring without painting body-colored cover pixels into each atlas.
Directional head accessories are authored for the canonical right-facing body and mirror with the complete pet canvas. A hat with directional structure should stay visually balanced over the head while expressing facing through a restrained one-logical-pixel cue in its brim, visor, lean, nose guard, or other asymmetric detail; do not shift the whole silhouette far off-center. Make asymmetric parts read correctly after mirroring. Identity-bound eye accessories may opt out of mirroring and use a direction-specific eye anchor so they remain on the same eye; the Top Hat & Monocle is the reference. Fixed-eye anchors must include the body origin shift for wide frames (frameWidth - 96). Review every appearance in both directions with the facing fixture.
Static reduced-motion art may represent a later frame of its animated sheet. Keep getChatPetReducedMotionRigFrame() aligned with the representative body frame; do not assume rig frame zero merely because the static PNG has one image frame.
Author every wearable part on the same 8×8 logical-pixel grid as the body. Brims, crowns, bands, rims, chains, highlights, and shadows must all be composed from whole aligned logical pixels; do not use diagonal polygons or source-pixel stair steps to imply curves. The small-effect exception does not apply to wearable accessories. Use the current Stable body sheets as geometry guides and validate that every alpha value is fully transparent or fully opaque. The runtime mirrors layers with the body; fixed-orientation body decorations are restored without erasing accessory pixels.
When changing the accessory source at runtime, keep the current composite visible until the replacement image loads and passes exact dimension validation. Redraw the current frame without restarting the body animation. A failed or malformed accessory source falls back to the body alone and must not repeatedly retry.
Animation design
Animate key poses, not noise.
- The trigger should be readable.
- The action should have a clear apex or strongest pose.
- The result should be readable before returning to the baseline.
- Holds are useful; duplicate motion is not.
Frame duration is part of the art. Define it in the matching *_FRAME_DURATIONS array in chatPetWidget.ts; do not encode or infer timing from the PNG.
Keep the transient-state duration consistent with the intended loops or one-shot playback. Explicitly choose whether the sheet:
- Plays once and holds its final pose
- Loops until the transient state ends
- Plays in reverse as part of another transition
Reversible effects
If one sheet is reused in reverse, as with respawn → despawn:
- Design both endpoints to work as starts and finishes.
- Check the effect in both directions.
- Avoid one-way visual cues that become nonsensical backward.
- Verify the reverse effect at its actual destination, not only on a neutral canvas.
PR #330399 is the reference pattern: the respawn burst plays backward to despawn at the bottom, then forward to respawn at the top. The old revive-sign interstitial is superseded.
Separate pose animation from spatial motion
Use sprite frames for changes to the pet or prop silhouette. Use CSS transforms or the physics loop for:
- Translation
- Rotation
- Enter/exit motion
- Drag resistance
- Search reveal/hide
- Falls, throws, rebounds, and impacts
Do not redraw every translated/rotated pose into the sheet. Conversely, do not use a CSS transform to fake a body deformation that should be readable in the pixel art.
Advance multi-phase behavior from deterministic completion signals:
- Sprite completion for one-shot sheets
animationendfor CSS keyframestransitionend/transitioncancelfor falls- Physics settlement for throws
Do not guess a completion time with an unrelated timeout.
Frame scheduling and restart behavior
Sprite timing uses elapsed-time scheduling at frame boundaries, not a display-refresh polling loop. A late callback recalculates the correct frame and shortens the next delay.
- Pause frame timers while the document is hidden.
- On visibility return, recompute from elapsed time.
- Finite animations hold their terminal frame.
- Reverse playback must use the reversed frame durations, not only reversed frame indices.
- Restart a loaded state without forcing a redundant image fetch.
- Force a style flush before re-adding a CSS animation class when a blink or motion must restart.
Environment and layering
Review the sprite in the same environment where it runs:
- Platform/input edge
- Transparent background
- Left and right workbench boundaries
- Platform clipping and occlusion
- Drag, fall, throw, and respawn motion
- Any speech bubble or fixed decoration
Pixels intended to pass behind the platform must be clipped or layered behind it. Do not leave body/effect pixels visible below an occluding platform.
Movement should preserve the body anchor until physics intentionally moves the whole pet. Decorative frame size must not change the physics target.
State and gesture ownership
The rendered state has a deliberate priority. Busy/task states must not be accidentally hidden by decorative reactions. Preserve the current order in getChatPetBaseState and the transient-state guards in getChatPetRenderedState.
Interaction rules:
- Dragging owns the pointer until release and suppresses the following click.
- A wake interaction wakes only.
- Yapping or other idle-only reactions yield to non-idle base states.
- Keyboard interaction is disabled while the pet is dead, pointer-controlled, or airborne.
- Dizzy consumes the direction-change gesture that triggered it.
- Confirmation clapping is an attention cue, not a permanent pending-state animation.
Rare interactions should be sampled independently from the ordinary non-repeating pool so adding a common reaction does not silently change an easter egg's probability.
Rendering and performance
Keep the current rendering architecture:
- Two sprite elements provide load-time double buffering.
- Compare an image's original source with
getAttribute('src');.srcmay normalize VS Code resource URLs. - Size the canvas at source-native frame dimensions and the CSS box at display dimensions.
- Keep
imageSmoothingEnabled = falseandimage-rendering: pixelated. - Cache resolved sprite source descriptors per variant.
- Coalesce pointer gaze updates to one animation frame.
- Use
requestAnimationFramefor physics, but cap integration steps to prevent tunneling after a slow frame. - Re-read throw geometry when layout changes during flight.
Runtime wiring
When adding a state, update every applicable surface:
- Add the state to
ChatPetState. - Map the filename in
getChatPetSpriteName. - Add frame durations in
getChatPetFrameDurations. - Declare nonstandard source width/height constants.
- Register animated and reduced-motion sources in
getSpriteSources. - Choose cursor-tracking and frame-aware blinking behavior.
- Choose one-shot, loop, reverse, or static iteration behavior.
- Add the transient-state duration and trigger.
- Add deterministic completion transitions for multi-phase states.
- Add facing, overhang, fixed-decoration, clipping, or CSS treatment.
- Add a localized ARIA status announcement for user-triggered interactions.
- Update accessible help when the gesture is discoverable/useful.
- Update focused unit tests.
Do not add art without completing the runtime contract.
Keep the visuals silent: images, canvases, eyes, and effects use empty alt text and aria-hidden. The button owns the accessible label, focusability, and localized status() announcements. Hidden, dead, or non-interactive states must leave the tab order.
Validation checklist
Art
- Core art uses the same
8×8source-pixel logical unit. - Body derives from current idle or rendering art.
- Body baseline and canonical anchor stay fixed.
- Standard eyes are
1×2logical pixels. - DOM-eye sprites contain no baked pupils under the overlay.
- Stable and Insiders geometry/alpha masks match.
- Transparent regions stay fully transparent.
- No interpolation or antialiasing appears.
Animation
- First and last poses transition without popping.
- Static reduced-motion pose communicates the state.
- Frame dimensions and count match both variants.
- Timing arrays match the intended holds and loops.
- Reverse playback reads correctly when used.
- Both facing directions read correctly.
- Multi-phase transitions use completion signals, not guessed delays.
- The static fallback communicates the same outcome under reduced motion.
Integration
- Wide/tall source constants and boundary logic are updated.
- Platform clipping and layering are correct.
- Interaction/collision geometry remains body-based.
- Drag/click, wake/click, and pointer/keyboard gesture ownership is unambiguous.
- User-triggered behavior has localized screen-reader output.
- Visual children are
aria-hidden; the button owns semantics and tab order. ChatPetWidgettests cover state names, exact timings, geometry, state priority, and reduced motion.- Every runtime state maps to the intended body-owned attachment track.
- The atlas matches its declared compact (
256×192) or wide (384×288) cell tier and the documented column/row contract. - Every accessory color/alpha block is aligned to the
8×8logical-pixel grid. - Atlas artwork stays within the body canvas after applying the documented pivots and anchors.
- Head accessories overlap the head by the shared wear offset and are absent during love.
- Asymmetric artwork reads correctly in both canonical and mirrored facing directions.
- Adding the accessory requires no state-specific exports or renderer changes.
- Reduced-motion sources use the rig frame represented by their static body art.
- Body-authored eye expressions and props suppress incompatible eye-slot accessories.
- Switching accessories preserves the active body frame and animation timer.
- Accessory load failure leaves the body visible and does not retry continuously.
Use the chat/chatPetAccessoryRig/chatPetAccessoryRig/CriticalPoses component fixture to review critical animated and reduced-motion poses, and AllAccessoriesFacing to compare every appearance in both directions.
Run the focused unit tests using the repository's unit-tests skill. At minimum, run the ChatPetWidget test suite.
Prefer exporting pure helpers for timing, geometry, random selection, and state precedence, then test them directly. Use fake timers for scheduler behavior. Assert exact frame-duration arrays so art and runtime timing cannot drift independently.
Optional public-preview update
The public showcase lives in the sibling vscode-chat-pet repository. Use its update-pet-previews skill after production sprites are final.
When replacing an existing APNG, prefer a new versioned filename in the README so GitHub and browser caches cannot keep showing the previous animation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

