Probably Playable
Back to Codons

Codon Extractor

Stable

Audit any game project and find extractable components for the store

by Probably Playable — v1.0.0

Description

What is this?

An AI skill that turns any game project into a source of codons. Point your AI assistant at your codebase, and it will scan, classify, and score every extractable component — editors, systems, gameplay mechanics, UI, economy, audio, devtools — then tell you exactly how to package each one.

Why vibe-coders need this

You've vibe-coded a game. It works. But buried in your codebase are components that other developers would kill for — a map editor you built in a weekend, an inventory system, a particle configurator. You just don't know which ones are extractable and how much work it would take.

This skill does the analysis for you. It scores each candidate on coupling, reusability, and completeness, then generates a step-by-step extraction plan.

What it covers

50+ component types across 10 categories:

  • Editors — Map, Animation, Cinematic, Particle, Sound, Balance, Behavior
  • Systems — Event Bus, State Machine, Save/Load, Asset Loader, i18n
  • Gameplay — Combat, Pathfinding, Wave Spawner, Crafting, Quests, Inventory
  • Character — Skill Tree, XP/Levels, Equipment, Evolution, Achievements
  • Economy — Currency, Shop, Rewards, Gacha, Trading
  • Input — Input Manager, Gestures, Virtual Joystick, Camera Controller
  • UI — HUD, Menus, Modals, Tooltips, Notifications, Leaderboard
  • Visual — Particles, Juice/Feedback, Fog of War, Lighting, Shaders
  • Audio — Music Manager, SFX Manager, Visualizer
  • DevTools — Debug Console, God Mode, Performance Monitor, Replay

How to use

  1. Copy the skill into your project’s .claude/skills/ directory
  2. Ask your AI: “Audit this project for extractable codons”
  3. Get a structured report with scores, effort estimates, and extraction steps
  4. Package the best candidates using the included templates
Dependencies

None — zero external dependencies.

Phaser Three.js Vanilla JS Any Framework
Technical Details
Version
1.0.0
Status
Stable
License
MIT
Size
12 KB
Author
Probably Playable
Updated
2025-04-04
auditextractiontoolingcontributionmetaproject-analysis
AI Integration Skill

Drop into .claude/skills/ — your AI handles the rest.

AI Skill codon.skill.md

Codon Extractor — Project Audit Skill

Use this skill when the user asks to "find extractable components", "audit my project for codons",

"what can I contribute to the codon store", "extract codons from my game", or "list reusable components".

WHAT IT DOES

Analyzes a game project to identify components that can be extracted as standalone codons

for The Codon Store (probably-playable.com/codons). Produces a ranked list of candidates

with extraction feasibility, required artifacts, and effort estimates.

AUDIT PROCESS

Step 1 — Scan the project

Read the project structure, identify frameworks used (Phaser, Three.js, vanilla, etc.),

and map out the major systems. Look for:

  • Scene files / main game loops
  • Manager/system classes (singletons, services)
  • UI components (menus, HUD, dialogs)
  • Editor/tool scenes
  • Utility modules
  • Config/data files

Step 2 — Classify each candidate

For each potential codon, determine its category from the taxonomy below,

then assess its coupling level (how tangled it is with the rest of the project).

Step 3 — Score extraction feasibility

Rate each candidate on 3 axes (1-5):

Axis1 (Hard)5 (Easy)
CouplingImports 10+ project-specific modulesSelf-contained, 0-2 external deps
ReusabilityOnly works for this exact gameUseful in any game of this genre
CompletenessNeeds the whole project to functionWorks standalone with minimal setup

Extraction score = average of the 3 axes. Prioritize candidates scoring 3.5+.

Step 4 — Generate the codon list

Output a table with: name, category, score, effort estimate, and key dependencies to decouple.

---|-------------|---------|

Map EditorTile-based or grid-based level designerTilemap painter, terrain editor, room builder
Cinematic EditorCutscene/dialog sequence builderTimeline, camera moves, dialog bubbles, triggers
Particle EditorVisual particle system tunerEmitter config, preview, presets, export
Sound EditorAudio mixer, SFX sequencerVolume curves, spatial audio config, playlist
Balance TunerLive-tweaking panel for game valuesSliders for damage, speed, spawn rates
Level Flow EditorCampaign/progression tree designerNode graph, unlock conditions, branching paths
Behavior EditorAI rule builder (condition → action)Drag-drop rules, priority system, test mode
Sprite PackerAtlas/spritesheet generatorFrame arrangement, padding, JSON export

Core Systems

Architectural patterns that structure the game. Essential for clean vibe-coded projects.

TypeDescriptionExamples
Event BusPub/sub decoupled messagingemit/on/off, typed events, wildcard, cleanup
State MachineFinite state managementStates, transitions, guards, history
Scene ManagerScene lifecycle orchestratorTransitions, overlays, preloading, stacking
Save/Load SystemGame state persistencelocalStorage, cloud sync, migration, versioning
Config ManagerCentralized game settingsDefaults, overrides, hot-reload, validation
Asset LoaderSmart resource loading pipelineManifest, progress, retry, cache, lazy load
Localization (i18n)Multi-language text systemKey-based strings, plurals, RTL, fallbacks

Gameplay Mechanics

Game-specific systems that implement core loops. Extractable when parameterized.

TypeDescriptionExamples
Wave SpawnerEnemy wave composition & timingWave curves, spawn points, difficulty scaling
Combat SystemDamage, health, hit detectionDPS calc, armor, crits, status effects, hitboxes
PathfindingNavigation mesh or grid-based A*Waypoints, obstacles, dynamic recalc, flow fields
Physics EngineCustom physics (not framework built-in)Mass, forces, collision response, ragdoll
Crafting SystemRecipe-based item creationIngredients, recipes, discovery, upgrade tiers
Quest/Mission SystemObjective trackingObjectives, prerequisites, rewards, branching
Dialogue SystemBranching conversation engineNodes, choices, conditions, variables, portraits
Inventory SystemItem managementSlots, stacking, drag-drop, sorting, filters
Loot TableProbabilistic item dropsRarity tiers, weighted random, pity system

Character & Progression

Systems that manage player/entity growth over time.

TypeDescriptionExamples
Skill TreeBranching ability unlocksNodes, prerequisites, points, reset, visual tree
Experience/Level SystemXP curves and levelingXP formula, level caps, prestige, milestones
Equipment SystemGear slots and stat bonusesSlot types, set bonuses, compare, enchant
Evolution/Upgrade SystemEntity tier progressionTiers, materials, visual changes, stat growth
Achievement SystemTrackable goals and rewardsConditions, progress bars, unlock rewards, badges
Talent/Perk SystemPassive modifiersPerk slots, stacking rules, synergies

Economy

In-game resource and transaction management.

TypeDescriptionExamples
Currency ManagerMulti-currency walletEarn, spend, convert, display, overflow protection
Shop SystemBuy/sell interface + pricingCatalog, pricing, discounts, purchase validation
Reward SystemStructured reward distributionDaily rewards, streaks, first-time bonuses
Gacha/Pull SystemRandomized reward drawsPity counters, banners, guaranteed thresholds
Auction/TradingPlayer-to-player exchangeListings, bids, escrow, history

Input & Controls

Player input handling and control schemes.

TypeDescriptionExamples
Input ManagerUnified input abstractionKeyboard, gamepad, touch, rebinding, dead zones
Gesture RecognizerTouch gesture detectionSwipe, pinch, long-press, multi-touch
Virtual JoystickOn-screen touch controlsJoystick, d-pad, action buttons, auto-hide
Drag & Drop SystemPointer-based object manipulationDrag start/move/end, snap-to-grid, drop zones
Camera ControllerCamera movement and effectsPan, zoom, follow, shake, boundaries, smoothing

UI Components

Reusable interface elements.

TypeDescriptionExamples
HUD SystemHeads-up display frameworkHealth bars, minimap, resource counters, cooldowns
Menu SystemNavigable menu screensMain menu, pause, settings, transitions
Dialog/ModalPopup windowsConfirm, alert, custom content, backdrop
Tooltip SystemContext-sensitive info popupsHover triggers, positioning, rich content
Notification SystemToast/alert messagesQueue, duration, priority, dismiss, animation
Leaderboard UIScore ranking displayLocal/global, pagination, player highlight

Visual & Effects

Graphics systems beyond basic rendering.

TypeDescriptionExamples
Particle SystemConfigurable particle emittersExplosion, trail, rain, fire, custom shapes
Juice/Feedback SystemGame feel effectsScreen shake, flash, slow-mo, hit-stop, squash
Fog of WarVisibility managementTile-based, ray-cast, explored/visible states
Lighting SystemDynamic 2D/3D lightingPoint lights, shadows, day/night cycle
Shader CollectionReusable shader effectsCRT, outline, dissolve, water, glow
Tween/Animation LibraryProgrammatic animationsEasing functions, chains, parallel, stagger

Audio

Sound management beyond basic playback.

TypeDescriptionExamples
Music ManagerBackground music systemCrossfade, layers, adaptive, loop points
SFX ManagerSound effect systemPooling, spatial, priority, pitch variation
Audio VisualizerReactive visuals from audioFFT, beat detection, waveform display

DevTools

Development-time utilities.

TypeDescriptionExamples
Debug ConsoleIn-game command lineCommands, autocomplete, history, output log
God Mode PanelLive value tweakerSliders, toggles, presets, persist to JSON
Performance MonitorFPS and memory trackerGraphs, entity counts, draw calls, warnings
Replay SystemInput recording and playbackRecord, replay, seek, export, regression test

---

EXTRACTION REQUIREMENTS

For a component to become a codon, it must meet these criteria:

Must have

  1. Self-contained — works without importing game-specific modules (or those deps are parameterized)
    1. Documented entry point — clear constructor/init with typed config options
      1. Clean teardown — destroy/cleanup method that frees all resources
        1. No hardcoded assets — assets are passed in or configurable, not baked into the code
        2. Nice to have

          • TypeScript with strict types
          • Event-based communication (not direct method calls to parent systems)
          • localStorage or pluggable persistence
          • Keyboard shortcuts documented
          • Works at different resolutions

          ---

          REQUIRED ARTIFACTS

          Each codon must be packaged with these files:

          
          my-codon/
            src/                    ← Source code (TypeScript)
              MainClass.ts          ← Primary entry point
              Types.ts              ← Interfaces and type definitions
              ...                   ← Supporting modules
            skill.md                ← AI integration skill (REQUIRED)
            README.md               ← Human-readable documentation
          

          skill.md format

          The skill file MUST follow this structure:

          
          # [Codon Name] — Integration Skill
          
          Use this skill when the user asks to "[trigger phrases]".
          
          ## WHAT IT DOES
          [One paragraph description]
          
          ## REQUIREMENTS
          - Framework: [Phaser 3.60+ / Three.js / vanilla / etc.]
          - Dependencies: [list or "none"]
          
          ## INSTALL
          [Numbered steps to add the codon to a project]
          
          ## INTEGRATION
          [TypeScript code examples showing how to use it]
          
          ## CONFIGURATION
          [Table of options with types and defaults]
          
          ## API REFERENCE
          [Public methods with signatures]
          
          ## EVENTS
          [Events emitted, if any]
          
          ## GOTCHAS
          [Common mistakes the AI should avoid]
          

          README.md format

          
          # [Codon Name]
          
          [One-line description]
          
          ## Quick Start
          [3-step setup]
          
          ## AI Integration
          Copy `skill.md` into `.claude/skills/` — your AI handles the rest.
          
          ## Features
          [Bullet list]
          
          ## Requirements
          [Framework + version]
          
          ## License
          MIT - [Author]
          

          ---

          OUTPUT FORMAT

          After auditing, produce this report:

          
          # Codon Audit Report — [Project Name]
          
          ## Summary
          - Framework: [detected]
          - Total candidates found: [N]
          - High priority (score 4+): [N]
          - Medium priority (score 3-4): [N]
          
          ## Candidates
          
          | # | Name | Category | Score | Effort | Key Decoupling Needed |
          |---|------|----------|-------|--------|----------------------|
          | 1 | ... | Editor | 4.7 | Small | Remove hardcoded tileset |
          | 2 | ... | System | 4.0 | Medium | Abstract save backend |
          
          ## Detailed Analysis
          
          ### 1. [Component Name]
          - **Category:** [from taxonomy]
          - **Score:** [N/5] (Coupling: N, Reusability: N, Completeness: N)
          - **Files:** [list of source files]
          - **Current dependencies:** [what it imports from the game]
          - **Extraction steps:**
            1. [specific step]
            2. [specific step]
          - **Effort:** [Small / Medium / Large]
          

          ---

          SUBMISSION

          Once a codon is extracted and packaged:

          1. Verify it builds standalone (no imports to the original project)
            1. Test the skill.md by asking an AI to integrate it into a fresh project
              1. Submit to The Codon Store at https://probably-playable.com/codons
              2. Manifest endpoint: https://probably-playable.com/codons/manifest.json

This codon is provided "as is" without warranty of any kind, express or implied. Probably Playable assumes no responsibility for any damages, data loss, security vulnerabilities, or defects arising from its use. You are solely responsible for reviewing, testing, and validating this code before integrating it into your project. Use at your own risk.