Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

survival-crafting — Claude Code skill: what it does, how to install

A playbook for survival games: the gather, craft and build loop, hunger and thirst, tool tiers. Comes with pseudocode for the core systems and the knobs that keep the loop from turning into a grind.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill survival-crafting -a claude-code
Open on GitHub

What survival-crafting does

The skill maps the gather → craft → build loop and the pressure that keeps it interesting: hunger, thirst, temperature, scarce resources, threats that ramp up. You get pseudocode for three pieces — needs decay that drains HP over time instead of killing outright, a craft step that checks bag space before spending inputs, harvesting locked behind tool tiers. There is also a knob table covering decay rates and inventory limits, and a list of failure modes such as a world that depletes for good.

It is compositional. Items and recipes as data assets are left to godot-resources or unity-scriptableobjects, world generation to procedural-gen, persistence to save-systems. The loop gets described; the content pipeline does not.

One detail worth copying: the space check must count the slots the inputs free up, so turning three wood into one plank works in a full bag. Needs decay in per-frame code needs scaling by dt, or hunger drains at different speeds on different hardware. That is the bug you usually find late.

What it helps with

  • wire up a gather-and-craft loop where each tier unlocks the next
  • tune hunger and thirst to damage HP gradually, with warnings first
  • make crafting atomic so a full bag never eats the inputs
  • gate resource nodes by tool tier and bring them back on a respawn timer
  • escalate threats by night and events so the late game keeps pressure

Example prompts for the agent

  • Scaffold the gather → craft → build loop from the survival-crafting skill: resource nodes, a workbench, tool tiers.
  • Review my `craft()` — with a full bag the inputs get removed and the output never lands.
  • Add hunger and thirst decay to the tick, with graded damage and regen while the player is fed and warm.

How to install survival-crafting

1Skills CLI (Vercel)

npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill survival-crafting -a claude-code

2Manually: put the files in place

~/.claude/skills/survival-crafting/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/survival-crafting/

From the same set40

The whole set →
game-feel gamedev-skills Teaches the agent to add feedback to game actions: camera shake, hit-stop, eased tweens, squash and stretch, knockback. For mechanics that work but feel weightless. Claude Code CX Codex Cursor +1 9,400installs game-ui-ux gamedev-skills Engine-neutral game UI architecture skill for responsive layouts, screen stacks, gamepad focus, and event-driven HUD updates. Claude Code CX Codex Cursor +1 9,200installs level-design gamedev-skills Plans playable game levels from blockout through playtesting, covering routes, pacing, gates and encounters. Use it when working on whiteboxes, critical paths or room flow. Claude Code CX Codex Cursor +1 7,500installs camera-systems gamedev-skills Engine-neutral patterns for 2D and 3D game cameras: smooth follow, deadzones, look-ahead, bounds clamping, and third-person collision. Claude Code CX Codex Cursor +1 7,100installs audio-design gamedev-skills A skill that treats game audio as a mixer graph: buses, gain in decibels, sidechain ducking, adaptive music and beat-synced events. Samples use Godot 4.7, Unity gets notes. Claude Code CX Codex Cursor +1 7,100installs performance-optimization gamedev-skills A skill that turns “the game runs slow” into a measured bottleneck and a specific fix: profile first, then pool objects, batch draw calls, cut allocations. Claude Code CX Codex Cursor +1 7,100installs game-ai gamedev-skills Designs NPC decision-making, behavior trees, steering forces, and A* pathfinding. Useful when building game enemy logic across engines. Claude Code CX Codex Cursor +1 7,100installs input-systems gamedev-skills Engine-neutral input system: map keys to named actions, rebinding with conflict detection, keyboard, gamepad and touch support, analog deadzones, input buffering and coyote time. Claude Code CX Codex Cursor +1 6,800installs

Similar

fal-assets rehan-remade Generates sprites, tileable textures, 3D models, SFX, and music via fal. Built for modders and game developers who need ready-to-use visual and audio assets directly in their workspace. Claude Code CX Codex Cursor +1 1,400installs threejs-game-ui-designer majidmanzarpour Skill for designing game UIs in Three.js: HUDs, menus, pause and win screens, responsive layout for mobile and desktop. Prevents overlaps, ensures readability, and keeps UI cohesive with game style. Claude Code CX Codex Cursor +1 3,300installs orbit-card heygen-com Adds a 10-second 1920×1080 HyperFrames motion block where a single feature card orbits a dot sphere using exported Blender camera paths. Claude Code CX Codex Cursor +1 9,800installs sdf earthtojake This skill authors and validates SDFormat files for models and worlds, then helps prepare them for simulator handoff. Claude Code CX Codex Cursor +1 10,500installs urdf earthtojake This skill helps create, validate, and debug URDF robot descriptions. Use it when working with links, joints, geometry, meshes, or inertial data. Claude Code CX Codex Cursor +1 10,400installs hatch-pet official openai Creates and packages animated pets and spritesheets for Codex. Use it to turn a character concept, reference image, or brand cues into a pet. Claude Code CX Codex Cursor +1 3,300installs gcode earthtojake Slices STL, 3MF, and OBJ models into printer-ready G-code through OrcaSlicer. Use it when you need a print file without connecting to the printer. Claude Code CX Codex Cursor +1 9,500installs dxf earthtojake Generates and validates 2D DXF drawings from Python build123d scripts: outlines, gaskets, panels, flat patterns for cutting. Claude Code CX Codex Cursor +1 9,100installs

Questions about survival-crafting

How do I install survival-crafting in Claude Code?

Run npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill survival-crafting -a claude-code. The skill file lands at ~/.claude/skills/survival-crafting/SKILL.md.

What does survival-crafting do?

It lays out the gather, craft and build loop with the systems that add pressure: needs, resource scarcity, escalating threats. Pseudocode covers crafting, tier-gated harvesting and needs decay, plus a settings table and a list of common mistakes.

What else does it need to work?

It is compositional: items and recipes as data come from godot-resources or unity-scriptableobjects, world generation from procedural-gen, saving from save-systems. Without those the loop stays a diagram.

Source text

SKILL.md · Apache-2.0
---
name: survival-crafting
description: >
  Build a survival-crafting game: resource gathering, inventory, crafting and a tech tree,
  needs (hunger/thirst/temperature), and base building. Use for a survival or crafting/base-building game.
---

# Survival Crafting

A playbook for survival-crafting games — the gather → craft → build loop, survival needs, the
crafting/tech progression, and base building. This is a **compositional** skill: it orchestrates
inventory data, world content, persistence, and threats. It does not re-teach those primitives;
it defines the loop and the pressure systems (needs, scarcity, escalation) that make survival
tense rather than tedious.

## When to use

- Use when the player **gathers resources, crafts items/structures, manages survival needs, and
  builds a base** against escalating threats: survival sandbox, crafting/base-building game.
- Use when designing needs (hunger/thirst/temperature), a crafting tech tree, gathering loops,
  or base placement/building.

**When *not* to use:** crafting as a minor RPG feature → `rpg`. Permadeath grid dungeon →
`roguelike`. For inventory/items as data assets, use `godot-resources` /
`unity-scriptableobjects`; for world generation, `procedural-gen`.

## Core loop

**Gather raw resources → craft tools/items → build and upgrade a base → manage survival needs
→ explore farther for better resources → survive escalating threats → repeat at a higher tier.**
Each loop should unlock the *next* loop (better tools → reach new biomes → new resources →
better crafts). When that ladder breaks, the game becomes a grind.

## Must-have systems

1. **Resource nodes + gathering** — harvestable world objects; tool requirements/tiers; respawn.
2. **Inventory** — stacks, capacity (slots or weight), drop/transfer, hotbar.
3. **Crafting** — recipes (inputs → output), a crafting station/tech gate, a tech tree.
4. **Survival needs** — hunger, thirst, temperature, stamina, health, with decay + consequences.
5. **Base building** — placeable structures, a build grid/snapping, storage, crafting stations.
6. **World + day/night** — biomes/resources (often procedural); a time cycle driving threats.
7. **Threats** — hostile creatures/weather/events that escalate; combat or avoidance.
8. **Save/load** — world state, inventory, base, needs, progression; large-world persistence.

## Design knobs

| Knob | Effect | Notes |
|------|--------|-------|
| Needs decay rates | pressure cadence | Slow enough to explore, fast enough to matter. |
| Need-failure consequence | stakes | Damage over time, not instant death. |
| Resource scarcity / respawn | exploration push | Scarce near base → travel for more. |
| Tool tiers / gating | progression ladder | Better tool → new node types. |
| Recipe complexity / tech depth | long-term goals | Multi-step chains, not flat lists. |
| Inventory limit (slots/weight) | logistics tension | Forces base trips and storage. |
| Threat escalation curve | difficulty over time | Night/seasonal/event ramps. |
| Day length | rhythm | Day = gather, night = defend. |

## Patterns

### 1. Needs decay with graded consequences

```python
# Pseudocode in the per-frame/per-tick update. dt = seconds. Needs fall; failure bleeds HP.
def update_needs(p, dt):
    p.hunger = max(0, p.hunger - HUNGER_RATE * dt)
    p.thirst = max(0, p.thirst - THIRST_RATE * dt)
    p.temp   = approach(p.temp, ambient_temperature(p), TEMP_RATE * dt)

    # Consequences are graded, not binary: warnings, then attrition — never instant death.
    if p.hunger == 0 or p.thirst == 0:
        p.hp -= STARVE_DAMAGE * dt          # damage over time creates urgency with recovery room
    if p.temp < COLD_THRESHOLD or p.temp > HEAT_THRESHOLD:
        p.hp -= EXPOSURE_DAMAGE * dt
    if p.hunger > 0 and p.thirst > 0 and not exposed(p):
        p.hp = min(p.max_hp, p.hp + REGEN_RATE * dt)   # safe + fed => heal
```

### 2. Crafting: validate, then atomically consume inputs

```python
# Pseudocode. Recipes are data: inputs -> output, with an optional station/tech requirement.
recipe = {"id": "stone_axe",
          "inputs": {"wood": 3, "stone": 2}, "output": ("stone_axe", 1),
          "station": "workbench", "requires_tech": "basic_tools"}

def can_craft(recipe, inv, tech, station):
    if recipe.get("requires_tech") and recipe["requires_tech"] not in tech: return False
    if recipe.get("station") and recipe["station"] != station: return False
    return all(inv.count(item) >= n for item, n in recipe["inputs"].items())

def craft(recipe, inv, tech, station):
    if not can_craft(recipe, inv, tech, station): return False
    if not inv.can_add_after_removing(recipe["inputs"], *recipe["output"]):
        return notify("No room for the result")    # check space BEFORE consuming anything
    for item, n in recipe["inputs"].items(): inv.remove(item, n)   # consume all, then add
    inv.add(*recipe["output"])                                     # atomic: no partial craft
    return True
```

The space check must count the slots the inputs free up (crafting 3 wood into 1 plank can
succeed in a full bag). If space is short, refuse, or drop the result on the ground; never
consume the inputs and then fail the add.

### 3. Gathering gated by tool tier

```python
# Pseudocode. A node yields only if the held tool meets its required tier.
def harvest(node, tool):
    if tool.tier < node.required_tier:
        return notify("Need a better tool")        # e.g. stone node needs a pickaxe, not fists
    node.hp -= tool.power
    if node.hp <= 0:
        spawn_drops(node.drop_table)               # weighted drops (see roguelike loot pattern)
        node.start_respawn(node.respawn_time)      # node returns later; world isn't depleted forever
```

## Pitfalls / failure modes

- **Needs that kill instantly** → frustration and save-scumming. Make failure damage over time,
  with clear warnings and a recovery path (Pattern 1).
- **Grind without a ladder** → gathering that never unlocks new gathering. Each tier must open
  the next (better tool → new node → new resource → better craft).
- **Non-atomic crafting** → inputs consumed but output not granted on an edge case, most often
  a full inventory. Validate inputs and space first, then consume-and-add as one step
  (Pattern 2).
- **Inventory with no limits** → no logistics tension and no reason for a base/storage. Cap by
  slots or weight.
- **Permanently depleting the world** → players strip the map and quit. Respawn nodes or
  regenerate resources over time.
- **Per-frame decay unscaled by `dt`** → needs drain at different speeds on different hardware.
  Scale by `dt`.
- **No save / fragile save of a large world** → a crash wipes hours. Persist world+base+needs
  incrementally; version it (see `save-systems`).
- **Flat threat curve** → no late-game pressure. Escalate via night/season/event tiers.

## Composition (build it from these skills)

- **Items/recipes as data:** `godot-resources` / `unity-scriptableobjects` — items, recipes, tech tree, drop tables.
- **World:** `procedural-gen` for biomes/resource placement; `level-design` for authored areas.
- **Persistence:** `save-systems` for large-world state, base, inventory, needs, and versioning.
- **Threats:** `game-ai` for creatures; the engine physics skill for melee/collision.
- **Building/placement:** `godot-tilemap` / `unity-tilemap-2d` (2D) or `godot-3d-essentials` (3D) plus UI snapping.
- **UI:** `game-ui-ux` for inventory/crafting/HUD layout and scaling; `godot-ui-control` for the concrete inventory, crafting menu, needs HUD, and build mode.

## References

- For the full needs model and thresholds, the crafting tech-tree graph, gather/respawn tuning,
  base-building grids, and threat escalation, read `references/needs-and-crafting.md`.

© gamedev-skills · Apache-2.0 · gamedev-skills/awesome-gamedev-agent-skills

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor