# Interactions

> Add 3D interactable protocol, detection, and item interactions

- Skill: `majiayu000/interactions` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add majiayu000/interactions`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/interactions/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/interactions

---

# Skill: Interactables (3D)

## Objective
Provide a consistent interaction system for:
- NPC conversations
- signs/plaques
- containers that give items once

## Recommended pattern
- Player owns an `InteractionDetector` (`Area3D`) that tracks nearby interactables.
- Interactables join group: `interactable`
- Interactables implement an API (interface-by-convention):
  - `get_prompt() -> String`
  - `interact(actor: Node) -> void`

## Steps
1) Create a reusable base script
- `game/scripts/exploration/interactable.gd` (`class_name Interactable`)

2) Create interactable scenes
- `game/scenes/actors/NPC.tscn`
- `game/scenes/props/Sign.tscn`
- `game/scenes/props/Container.tscn`

3) Player selection
- On `interact` action:
  - select nearest interactable in range
  - call `interact(self)`

## Verification
- NPC: shows dialogue and closes cleanly.
- Sign: shows text and closes cleanly.
- Container: adds item and becomes empty after first open.

