Synthèse automatique
Ce skill décrit comment ajouter du contenu (ennemi, boss, tour, sort, prière, objet, table de butin, relique, carte de draft) à un jeu tower-defense inspiré d'OSRS, ainsi que le pipeline qui génère ses sprites et sons depuis le cache local du jeu.
Points forts
- Fournit des checklists ordonnées par type de contenu, avec les fichiers exacts à modifier (data/enemies.ts, data/towers.ts, types.ts, etc.)
- Explique la bonne stratégie : ajouter d'abord le membre d'union dans types.ts pour que les erreurs TypeScript énumèrent tous les endroits à compléter
- Donne une table de commandes npm précises pour extraire sprites, sons, icônes d'objets et cuire les feuilles d'animation d'ennemis
- Impose une règle stricte : tout asset doit venir du cache OSRS local, jamais d'un lien externe ni d'un placeholder, avec un test qui casse le build sinon
Limites
- Très couplé à un dépôt précis : chemins, GameRoot.tsx et scripts npm ne sont pas transposables ailleurs
- Suppose que la machine dispose déjà du cache OSRS et des dépendances, sans expliquer l'installation
- Certaines conventions sont citées sans être détaillées, comme l'obligation de mécanique de boss ou la disposition du dock à six colonnes
À utiliser dès qu'il faut ajouter ou modifier une entrée de contenu statique du jeu, ou corriger un sprite/son manquant ou pointant vers l'extérieur.
À éviter pour des changements de logique moteur sans rapport avec le contenu, ou dans un projet dépourvu du cache OSRS et de ces scripts.
Analyse de sécurité
SûrThe skill contains no destructive, exfiltrating, or obfuscated instructions. It directs the agent to run local repository scripts for extracting/baking game assets from a local OSRS cache and to edit project data/types, which is a legitimate development workflow with no network exfiltration or secret handling.
Aucun point d'attention détecté
Comment cette analyse est faiteExemples
Add a new boss called the Barrows Wraith: a stat block in lib/game/data/enemies.ts, a drop table, sprites from the local cache, a wave appearance, and its own signature boss mechanic in systems/boss-mechanics.ts.Add a seventh tower that beats the wizard at something specific — make it hard-counter magic-resistant enemies. Walk me through the TowerType union, its niche in tower-identity.ts, per-tier sprites in assets.ts, and how to re-lay out the dock grid without changing the bar's height.assets.ts resolves a spell icon that's currently hot-linked to the OSRS wiki. Replace it with a real local bake from the cache and make sure assets.test.ts passes.name: game-content description: Add or change content in the OSRS tower-defense game — an enemy, boss, tower, spell, prayer, item, drop table, relic or draft card — and the OSRS asset pipeline that bakes its sprites and sounds from the local game cache. Use when adding new game content, when a union type in lib/game/types.ts needs a new member, when a sprite or sound is missing, or when a wiki-hot-linked asset should be replaced with a real one.
Adding content
Static content is data, not code. It lives in lib/game/data/ (enemies.ts, towers.ts, waves.ts, gear.ts, prayers.ts, slayer.ts, ge.ts, combat-achievements.ts, biomes.ts, plus the baked enemy-anims*/spotanims* tables). Extend a table there rather than inlining anything in the engine.
Every new content id must also join its union type in lib/game/types.ts (EnemyType, TowerType, Element, AncientType, MageMode, PrayerType, …). TypeScript errors fail the build, so a missing union member surfaces immediately — but the union is what makes the exhaustive Record<> tables complain, so add it first and let the errors list every place that needs a value.
Checklists
New enemy or boss
data/enemies.ts— the stat block (hp,speed,reward,color,isBoss…).EnemyTypeintypes.ts.data/drops.ts— its loot table (keyed byEnemyType).- Sprites: an entry in
scripts/enemy-anims.config.json(npcid +animsids for walk/hurt/death), then bake (below). Death sound: the engine playsdeath_<type>; wire it incore/sound.ts. - Wave presence: the procedural allocator (
systems/wave-generation.ts) ordata/waves.ts(LANDMARK_WAVES) for a scripted appearance. - Boss only: a mechanic in
systems/boss-mechanics.ts— bosses are expected to have one.
New tower
data/towers.ts(the tier progression).TowerTypeintypes.ts.systems/tower-identity.ts— its niche. Every tower must beat the wizard at something specific; the wizard already owns single-target and AoE. A tower with no signature is not finished.lib/game/assets.ts— its per-tier sprite.GameRoot.tsx—TOWER_ORDER,TOWER_COMBAT, and the dock grid (currentlygrid-cols-6 w-[17.5em]; a seventh tower means re-laying it out without changing the bar's height — see thegame-uiskill).- A
*.test.tsnext to any pure logic you added insystems/.
New spell — systems/magic.ts (its hit/effect maths, with a test), plus the spell icon in assets.ts and its cast/impact sounds.
Assets come from OSRS itself
Hard rule: every asset is extracted or rendered from a local OSRS game cache. Never hot-link an external host, never invent a placeholder. If an asset can't be sourced, ask rather than substituting. assets.ts resolves every name to a local bake and assets.test.ts fails the build if a data table names an icon with none.
A cache is any folder holding main_file_cache.dat2 + main_file_cache.idx* — an installed RuneLite/Jagex client already has one. This machine has the cache and the deps: these scripts run here.
| What | Command |
|---|---|
| 2D interface sprites (prayer/skill icons, spellbooks, hitsplats) | npm run extract:sprites |
| Sound effects | npm run extract:sounds |
| Static NPC model portrait | npm run render:npcs |
| Item inventory icons | node scripts/render-osrs-items.mjs |
| Enemy animation clips (the real pipeline) | npm run export:enemy-gltf → npm run bake:enemies → npm run anims:data |
The enemy pipeline exports each NPC as an animated glTF, bakes walk/hurt/death sprite sheets from it with three.js (a real z-buffer, not the old hand-rolled rasteriser), then regenerates data/enemy-anims.data.ts from the manifests. Use --only <slug> to rebake one enemy.
Choosing which sequence id is a clip is its own job — hand it to the npc-anim-auditor subagent. Picking a hurt/death by reading the cache is a trap (an NPC's id block mixes its attacks, blocks and other rigs' anims; metrics can't tell an attack from a block), it takes dozens of probe images, and the agent already carries the method. Its anchor is npm run anims:observed — a cross-reference of the config against scripts/data/openosrs-observed-anims.json (the vendored OpenOSRS record of which sequences each NPC is actually seen playing in game), which flags configured ids the NPC never plays and lists the real candidates. Use the agent whenever an animation "looks wrong" or a new enemy needs clips.
Spot-anims (GFX) are baked by scripts/render-osrs-spotanims.mjs, but the flat rasteriser only handles geometry spotanims — textured ones come out as white boxes, so those stay procedural. Check the output PNG before persisting it. Same for tower/weapon renders: they must face side-on (ideally right); sweep the yaw and look at the PNG before committing.
Design direction
- Give systems personality. Prefer building new quests, achievements and pets over reviving the ones the old engine had.
- Make them challenging, and reward them with something other than money — do not inflate gold.
- The intended "main" mode is a roguelite with per-wave drafting (towers/upgrades/prayers/buffs/debuffs), alongside a pure tower-defense mode.
Verify it
New content is mostly data, so the typecheck catches structural mistakes and npx vitest run catches maths. Neither can tell you a sprite is facing the wrong way or an enemy never spawns — look at the baked PNG, and drive the game (see the game-verify skill). Balance is the user's job; don't propose a playtest plan.
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/add-content-assets-to-osrs-game-mtfbwk2j/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/add-content-assets-to-osrs-game-mtfbwk2j' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/add-content-assets-to-osrs-game-mtfbwk2j/download' --output '.skill-downloads/add-content-assets-to-osrs-game-mtfbwk2j/SKILL.md.part' && mv '.skill-downloads/add-content-assets-to-osrs-game-mtfbwk2j/SKILL.md.part' '.skill-downloads/add-content-assets-to-osrs-game-mtfbwk2j/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.
Claude Code
test -f '.skill-downloads/add-content-assets-to-osrs-game-mtfbwk2j/SKILL.md' && test -s '.skill-downloads/add-content-assets-to-osrs-game-mtfbwk2j/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/game-content' && cp -R '.skill-downloads/add-content-assets-to-osrs-game-mtfbwk2j' '.claude/skills/game-content'OpenSkills
OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.
Installation officielle d’OpenSkillsopenskills install './.skill-downloads/add-content-assets-to-osrs-game-mtfbwk2j'openskills read 'add-content-assets-to-osrs-game-mtfbwk2j'La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.
Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.
openskills syncMode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/add-content-assets-to-osrs-game-mtfbwk2j/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Bonnes pratiques React Hook Form
Developpement
Maîtrisez React Hook Form : évitez les anti-patterns, gérez les abonnements, et traitez correctement reset, dirty state et entrées contrôlées.
Migration Emotion vers Mantine
Developpement
Migrer les styled-components Emotion vers des composants Mantine avec style props et modules CSS. Pour convertir .styled.tsx ou supprimer les imports @emotion.
Détecteur de dérive de périmètre
Developpement
Analyse les diffs git par rapport à une intention pour détecter la dérive de périmètre, fichiers non liés et PR trop larges, puis suggère de garder, diviser ou justifier.