---
title: "samurai-dojo"
url: "https://claudemods.dev/zh-cn/builds/samurai-dojo-81e00d"
source: "https://github.com/theonly1me/claude-code-mods/tree/main/plugins/samurai-dojo"
source_type: "github"
repo: "https://github.com/theonly1me/claude-code-mods/tree/main/plugins/samurai-dojo"
author: "theonly1me"
author_handle: "theonly1me"
stars: 4
category: "游戏与娱乐"
categories: ["games"]
tags: ["animated", "claude-code", "game", "hooks", "marketplace", "plugin", "samurai", "tdd"]
permission_level: 2
scan_complete: true
install: "claude plugin marketplace add theonly1me/claude-code-mods\nclaude plugin install samurai-dojo@claude-code-mods"
added: "2026-10-05T01:58:36.392Z"
updated: "2026-10-05T12:06:26Z"
locale: "zh-cn"
content_locale: "zh-cn"
---

# samurai-dojo

在面板中显示动画武士的 Claude Code 插件；每次工具调用都会让武士砍倒 Codex、Gemini 或 ChatGPT 敌人，并提供冥想、剑术、决斗、波次和季节画面。

## Description

Samurai Dojo 是 Claude Code 插件，会打开一个自运行的动画面板，让武士守护会话。Claude 每次工具调用都会生成一个敌人（Codex pods、Gemini stars、ChatGPT orbs），调用结束时武士将其砍倒。子代理调用会生成戴冠精英，失败或拒绝的调用触发格挡攻击，连续快速击杀三次会画出金色乱舞新月。调用之间武士会冥想、练习 kata、与游荡 ronin 决斗并迎战环境波次。季节每 5 分钟变化一次（冬季、樱花、夏季、秋季）。终身击杀数决定头带和腰带颜色显示的等级：Ronin（红）、Hatamoto at 100（蓝）、Daimyo at 500（紫）、Shogun at 2,000（金）。通过 claude plugin marketplace add theonly1me/claude-code-mods 和 claude plugin install samurai-dojo@claude-code-mods 安装；需要 Claude Code 2.1.289+，不需要构建步骤或运行时依赖。命令包括 /dojo、/dojo on、/dojo off 和 /dojo stats。

## Install

```
claude plugin marketplace add theonly1me/claude-code-mods
claude plugin install samurai-dojo@claude-code-mods
```

## Original README

# Samurai Dojo

A Claude samurai guards your session. Every tool call Claude makes sends a Codex, Gemini, or ChatGPT foe into the dojo, and the samurai cuts it down when the call finishes. Between calls the samurai never stands still: it meditates, practices kata, duels wandering ronin, and fights off ambient waves, through winter, cherry blossom, summer, and autumn.

![Samurai Dojo](assets/preview.gif)

```sh
claude plugin marketplace add theonly1me/claude-code-mods
claude plugin install samurai-dojo@claude-code-mods
```

Register the marketplace once. Run `/reload-plugins` in an open session after installing. Requires Claude Code 2.1.289 or later; no build step or runtime dependencies.

## How to use

1. Type `/dojo`. The dojo opens in a pane.
2. Keep working. Each tool call Claude makes becomes a foe, and each finished call is a cut.
3. Type `/dojo` again to close it.

- The dojo is hidden until you open it. Once open, it opens again in each new session until you close it.
- Only one game shows at a time. Opening another game (for example `/farm`) closes the dojo.
- In the fullscreen layout (`CLAUDE_CODE_NO_FLICKER=1`), the pane docks beside the transcript and shows a log of what the samurai did. Otherwise it sits above the prompt.
- A pane that opens by itself at session start needs a terminal 144 columns wide (110 once you have opened it before). If yours is narrower, a toast tells you, and `/dojo` shows it at any width.
- Close the pane with its close mark or ctrl+x x. That also turns it off for the next session.

| Command | What it does |
| --- | --- |
| `/dojo` | Open or close the dojo |
| `/dojo on`, `/dojo off` | Open or close it explicitly |
| `/dojo stats` | Print your rank, kills, and flurries without opening the pane |

The game plays itself. It has no keys to press.

## How it plays

Real work:

- Each tool call spawns a foe. Codex pods, Gemini stars, and ChatGPT orbs take turns.
- When the call finishes, the samurai dashes in and cuts it down.
- A subagent call spawns a crowned elite that takes two strikes.
- A failed or denied call costs a parried strike first: a clang, a flinch, then the kill.
- Three kills in quick succession draw a gold flurry crescent.
- When Claude finishes a turn, the samurai salutes.

Between calls, the samurai picks the next activity:

- **Meditation:** it sits with the sword laid down, and ki rises around it.
- **Kata:** rising and falling cuts in place.
- **Duels:** a grey ronin walks in. They trade cuts until one clean cut ends it, or both bow.
- **Waves:** a few ChatGPT, Gemini, and Codex foes attack, sometimes led by a crowned captain.

This ambient action is decoration. Only real work counts toward kills and ranks. When a tool call starts, the samurai drops what it is doing, and a dueling ronin runs off.

## Seasons

The season changes every 5 minutes: winter (snow on the floor and a bare tree), cherry blossom (pink petals), summer (fireflies), and autumn (falling red leaves). The farm in Little Harvest uses the same clock, so both show the same season.

## Ranks

Lifetime kills earn ranks, shown by the color of the samurai's headband and sash: Ronin (red), Hatamoto at 100 (blue), Daimyo at 500 (violet), and Shogun at 2,000 (gold).

See the [marketplace README](../../README.md) for configuration, privacy, updates, and removal.
