Token导航 LogoToken导航TokenDH.com
开发只读github未标认证来源可访问许可证需确认审计通过

mikado-method天皇法

Agent Skill

mikado-method 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

582

周安装

24

GitHub Stars

1

下载量

190
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:mikado-method(天皇法)
来源仓库:https://github.com/bsene/skills
仓库路径:skills/mikado-method
安装命令:
npx skills add https://github.com/bsene/skills --skill mikado-method
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/bsene/skills --skill mikado-method

简介

mikado-method 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。
  • 通过 npx skills add 命令从指定仓库安装并使用该技能。
  • 安装前需确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Mikado Method Skill

A skill for guiding developers through the Mikado Method: a disciplined, graph-driven approach to safe, incremental refactoring that keeps the codebase in a working state at all times.


What is the Mikado Method?

Named after the Pickup Sticks game (Mikado), where you must remove the topmost sticks without disturbing the pile before reaching the high-value stick at the bottom. In software, your goal (the "Mikado") sits beneath a pile of dependencies. The method surfaces those dependencies visually so you can remove them one by one, safely.


Core Definitions

TermMeaning
GoalThe root node. What you ultimately want to achieve. Circle it twice.
PrerequisiteA dependency that must be resolved before its parent node can be done.
Leaf nodeA node with no further prerequisites. Safe to implement immediately.
Mikado MapThe full tree of goal + prerequisites. Your "save game" for the refactoring.
RevertUndoing all changes to return to a stable state. The map survives; the broken code does not.

The Core Loop

1. SET GOAL        → Write the goal as the root node. Circle it twice.
2. BE NAIVE        → Attempt to implement the goal directly in the code.
3. OBSERVE BREAKS  → Compiler errors, failing tests, or broken behavior = prerequisites.
4. MAP             → Add each prerequisite as a child bubble connected to the current node.
5. REVERT          → Undo ALL changes immediately. Return to green/stable state.
6. PICK A LEAF     → Choose any leaf node (no children) and repeat the loop from step 2.
7. COMMIT LEAF     → Once a leaf is implemented cleanly without breakage, commit it.
8. PRUNE THE GRAPH → Remove the committed leaf. Reveal new leaves. Continue upward.

⚠️ The revert step is non-negotiable. It feels counterintuitive to throw away "hard work," but the thought process IS the work — it produced the map.


Quick Reference Card

MIKADO LOOP
───────────
① Write goal (root) → circle it twice
② Attempt naively in code
③ Every error = a prerequisite bubble
④ REVERT (always, immediately)
⑤ Pick a leaf → repeat from ②
⑥ Leaf passes cleanly → commit → prune
⑦ Repeat until goal is reached

RULES
─────
• Never build on broken code
• One atomic change per commit
• No behavior changes in refactoring commits
• Leaves only touch one concern
• The map is the work — protect it

Common Mistakes to Correct

MistakeCorrection
Fixing errors in place instead of reverting"Revert now. Add these errors as prerequisite nodes instead."
Building on top of broken code"This violates the core rule. Revert to green before continuing."
One giant commit with multiple changes"Split into one commit per leaf node."
Skipping the graph for "small" refactors"Start with even a 3-node graph. It prevents scope creep."
Using mocks to avoid test data setup pain"Use Test Data Builders as Mikado leaf nodes instead."
Long-lived refactoring branches"Work on main. Only commit leaves that don't break anything."

Output Format

When helping a user apply the Mikado Method, always produce:

1. The Mikado Map (Mermaid diagram)

graph TD
    G(["🎯 GOAL: <goal name>"]) --> P1["Prerequisite A"]
    G --> P2["Prerequisite B"]
    P1 --> L1["🟢 Leaf: step 1"]
    P1 --> L2["🟢 Leaf: step 2"]
    P2 --> L3["🟢 Leaf: step 3"]

Use 🟢 for current leaves, ⬜ for unreachable prerequisites, ✅ for completed nodes.

2. Ordered implementation plan

A numbered list of leaf-first steps, each with the atomic refactoring gesture, a one-line verification test, and the suggested commit message.

3. Revert reminder

After any naive attempt: "Revert now — git checkout. — your map is saved, the broken code is not needed."


Read On Demand

Read WhenFile
Starting a graph, populating prerequisites, evaluating leavesGraph Building
Execution order, committing strategy, legacy code, large refactors, hygiene rulesExecution & Situations

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.69%
按下载量换算68

Claude

29.19%
按下载量换算55

Cursor

18.48%
按下载量换算35

Gemini CLI

9.65%
按下载量换算18

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills