A Claude Code skill that lets Claude play Zork I via dfrotz with persistent save state and optional Obsidian integration for capturing learnings.
This skill demonstrates a use case where a full skill (not just a slash command) is appropriate:
- Bundled dependencies: Game file, scripts, state management
- Persistent state: Save file survives across sessions
- External tool integration: Wraps dfrotz CLI
- Configurable output: Optional sync to Obsidian vault
# Install frotz (Z-machine interpreter)
brew install frotzThe game file (zork1.z3) is included in the data/ directory.
If you cloned this from a dotfiles repo, run the install script:
./install.shThis creates a symlink at ~/.claude/skills/zork/.
For manual installation, copy or symlink the zork/ directory to ~/.claude/skills/.
~/.claude/skills/zork/scripts/play.sh "go north"
~/.claude/skills/zork/scripts/play.sh "take lamp"
~/.claude/skills/zork/scripts/play.sh "inventory"~/.claude/skills/zork/scripts/status.sh~/.claude/skills/zork/scripts/new.shPrevious save is archived with a timestamp.
# Set vault path
~/.claude/skills/zork/scripts/setup.sh /path/to/your/vault
# Check current config
~/.claude/skills/zork/scripts/setup.sh
# Clear config (use local state/ only)
~/.claude/skills/zork/scripts/setup.sh clearWhen configured, transcript and learnings sync to your Obsidian vault as:
Claude Plays Zork Transcript.mdClaude Plays Zork Learnings.md
zork/
├── SKILL.md # Claude Code skill definition
├── README.md # This file
├── scripts/
│ ├── play.sh # Execute one command
│ ├── status.sh # Show current room + inventory
│ ├── new.sh # Start fresh game
│ └── setup.sh # Configure Obsidian sync
├── data/
│ └── zork1.z3 # Zork I game file (Release 119)
└── state/ # Local state (gitignored)
├── claude.sav.qzl # Current save file
└── config.json # User configuration
The skill wraps dfrotz (dumb frotz) to play Zork non-interactively:
echo -e "command\nsave\npath.qzl\ny\nquit\ny" | dfrotz -m -p -q -L save.qzl game.z3Key flags:
-m- No MORE prompts-p- Plain ASCII output-q- Quiet (no startup banner)-L- Load save file directly
Each turn: load save → execute command → save → quit. State persists via native Zork save files.
| Command | Description |
|---|---|
look / l |
Describe current location |
inventory / i |
List carried items |
go <dir> |
Move (n, s, e, w, up, down, ne, nw, se, sw) |
take <item> |
Pick up item |
drop <item> |
Drop item |
open <thing> |
Open container/door |
examine <thing> |
Look at something closely |
read <thing> |
Read text |
- Skill code: MIT
- Zork I game file: MIT (as of November 2025, via Microsoft/Activision)
- Zork I by Infocom (1980)
- dfrotz by Stefan Jokisch, maintained by David Griffith
- Game file from eblong.com