basic-room-navigation

star 0

Use this skill when the objective involves implementing or improving room definitions, navigation between rooms, exits, or win/lose conditions.

megazear7 By megazear7 schedule Updated 2/11/2026

name: basic-room-navigation description: Use this skill when the objective involves implementing or improving room definitions, navigation between rooms, exits, or win/lose conditions. version: 1.0

Skill: Basic Room Navigation

When to apply

  • Adding or changing rooms, directions, or movement logic.
  • Implementing win condition or game end states.

Instructions

  1. Define all rooms in src/game/rooms.ts as a Record<string, Room>.
  2. Each room must have: id, name, description, exits (Record<direction, roomId>).
  3. GameState must include currentRoom: string.
  4. Navigation: Present Inquirer list of available directions from current room's exits.
  5. On move: update state.currentRoom, describe new room with chalk.
  6. Check win condition after every move (e.g. currentRoom === "treasure").
  7. Add Vitest tests for movement and win detection.

Example

See current src/game/rooms.ts and src/game/engine.ts for reference.

Install via CLI
npx skills add https://github.com/megazear7/terminal-adventures --skill basic-room-navigation
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator