A test skill from an extension
日本語の概要は準備中です。原文の説明を表示しています。
Fix a specific bug or problem in a {{engine_name}} project. Supports two modes — immediate fix or plan-first. Without arguments executes existing .unikit/code/FIX_PLAN.md. Checks {{engine_name}} compilation, suggests test coverage, and creates self-improvement patches. Use when user says "fix bug", "debug this", "something is broken", "fix the tests", "fix the errors in the tests", "read the errors in the {{engine_name}} console logs and fix the problems", or pastes an error message or {{engine_name}} console log. Also trigger when user shares a NullReferenceException, MissingReferenceException, compilation error, or any {{engine_name}}-specific error.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Fix a specific bug or problem in the codebase. Supports two modes: immediate fix or plan-first approach.
BEFORE producing ANY output, silently read .unikit/system/LANGUAGE_RULES.md
and apply its rules to ALL subsequent output.
If the file is missing or unreadable, fall back to English.
Do not produce any user-facing output until language rules are loaded.
Do not announce, confirm, or mention the language setting.
The language holds for the whole session, not just at load time: every message until the conversation ends is in language.ui — progress notes while agents run, relays of what a subagent returned, the final report, any follow-up discussion. English input (subagent results, tool output, these instructions) is data, never a cue to switch languages.
This skill uses named delegation aliases for Agent(...) calls. A skill-loading alias expands to an Agent(...) invocation whose prompt makes the subagent load the skill; a reconnaissance alias expands to a read-only dispatch. Each alias is the single place where its delegate's agent type and call arguments are declared — call sites name the alias and never carry a type or a model argument of their own.
Model argument. Before the first dispatch of an alias below, read .unikit/config.yaml
(a missing file, block or key is not an error) and settle the model argument once:
subagents.model.{{agent_id}} holds a model name — pass model: <name> with every call,
exactly as written (this runtime's own spelling of the model argument, if it differs).inherit, or is present and empty — pass no model argument; the agent runs on the
model of this session."{{agent_model_default}}"; an empty string
means pass no model argument.If the runtime rejects the model name, repeat that call once without the model argument and
report WARN [delegation] model "<name>" rejected — retried on the session model.
develop-agent carries no model argument.
develop-agent — used ONLY for complex fixes requiring extensive codebase exploration or independent multi-file changes. Default fixes are implemented inline by this skill using rules loaded in Bootstrap. Expands to:
Agent(
{{agent_call_worker_quoted}}
prompt: "{{agent_skill_call:unikit-devcontext}} <fix details>",
description: "Apply fix"
)
recon-agent — read-only parallel reconnaissance. Expands to:
Agent({{agent_call_reader}} prompt: "<focused question> You are read-only: edit and write nothing.")
Every question you send ends with the sentence You are read-only: edit and write nothing., verbatim.
Fallback: if the Agent tool is unavailable, investigate inline with Glob/Grep/Read.
Where this skill says to invoke <skill> — optionally "with the argument <text>" — it means one call, made in this session, now, on every runtime: not a command printed for the user and not a delegation (delegations are the aliases of ## Delegation agents). A call site that names no argument passes none.
Skill tool that accepts arguments, call it with that skill and the arguments of the call site, in full and unchanged, then follow the skill.Skill tool, or one that takes only a name — Read {{skills_dir}}/<skill>/SKILL.md in full, treat it as the instructions of this step and carry them out here, in this session, now, with the arguments of the call site as the skill's arguments.Run: /unikit-<skill> <arguments> for the user and stop.BEFORE anything else, check if .unikit/code/FIX_PLAN.md exists.
If the file EXISTS:
.unikit/code/FIX_PLAN.mdIf the file DOES NOT exist AND conversation history contains review findings (e.g., the user ran /unikit-review or similar earlier in this session):
$ARGUMENTS is provided — use it as a filter or clarification for the review findings. The user may specify which issues to fix and which to skip (e.g., "fix issues 1, 3, 5", "only fix the naming violations", "skip the formatting issues"). Apply only the selected subset.$ARGUMENTS is empty — treat ALL review findings as the bug descriptionIf the file DOES NOT exist AND $ARGUMENTS is empty AND no review context in conversation:
/unikit-fix <description>) or create a plan."If the file DOES NOT exist AND $ARGUMENTS is provided AND no review context in conversation:
$ARGUMENTS as the bug descriptiongit status
If uncommitted changes exist:
⚠️ Uncommitted changes detected.
Options:
1. Commit now (recommended)
2. Stash and continue (git stash — not offered while a merge is unfinished)
3. Continue as is
While a merge is unfinished — git rev-parse -q --verify MERGE_HEAD succeeds — the question has no "Stash and continue": with conflicts unresolved git stash fails, and once they are resolved it drops MERGE_HEAD for good, so the merge commit would have one parent.
Based on choice:
unikit-commit, then continuegit stash push -m "unikit-fix: stash before fix", then continueIf the user is resuming after a break or context was likely lost (e.g. after /clear), rebuild context:
git status
git branch --show-current
git log --oneline --decorate -10
git diff --stat
Bootstrap loads coding rules and principles ONCE upfront so the fix can be implemented inline without re-loading on each delegation.
Read in parallel (rules + principles):
.unikit/system/dev-principles.md — up to its lazy-read boundary: find the marker line (Grep -n '^<!-- === LAZY-READ BOUNDARY === -->') and Read the file with limit set to that line number. The part below the marker is read once, on the first step that touches the editor's serialized state — including the editor rungs of the Step 1 diagnosis ladder, which use its D2. An agent that cannot read with a limit reads the whole file..unikit/RULES.md — project overrides (highest priority). Rule topics: only the root here; its topic files load with the stack rules below..unikit/memory/code/RULES_INDEX.md — index of core/stack rulesall or contains unikit-fix — read that file from .unikit/memory/code/core/ using the Read tool.Stack rules are loaded on-demand later — when investigation reveals which framework is involved (e.g. R3, Zenject, UniTask). At the same point, load the topic files listed under ## Topics in .unikit/RULES.md whose Load when matches the area the investigation localized — the files, types or feature the bug lives in; when unsure, load (RULES_INDEX.md → Step 1).
Engine-MCP rules (conditional, engine-neutral) — once per session, zero calls:
.unikit/system/engine-mcp/INDEX.md, base section only — the delivery stamp (server:) plus every section except the ## Check table — access, the live failure classes, shape and cost, what is irreversible, the lane, and what to do when the file is silent. Those are the exceptions that hold for every task here. Do not read the ## Check table now — it is grepped per editor task, by area (Step 3).
.unikit/MCP-RECHECK-NOTES.md, header only (server: / audited:) — this project's own accumulated findings. Compare that header against the delivery stamp from item 5. On a mismatch print exactly one line and apply the entries anyway:
WARN [engine-mcp] notes header ≠ configured server (<notes> ≠ <configured>)
The entries are suspect, not void, and a suspect check still fails safe. Retiring them belongs to /unikit-mcp-audit, never to this skill.
Either file absent → skip it, print one line, and continue with every right you had:
MCP rules: no INDEX.md — no known exceptions for this server, rights unchanged
No rules means no known exceptions, never no capabilities. Absence never disables the engine MCP and never turns a target into ⏸️ MANUAL (.unikit/system/dev-principles.md → A9).
Lifted gates come from a verdict, not from a server profile.
GATE LIFTED is a runtime verdict of /unikit-verify — reached by trying, finding no affordance, and producing the evidence of that absence. This skill has no direct channel to the per-gate calibration and will not grow one: that calibration is verify's, and splitting it across two readers is how two skills come to disagree about what is lifted. Read the verdict instead — the last unikit-gate-result fenced block of the most recent /unikit-verify run, per .unikit/system/gate-result-contract.md.
Read .unikit/skill-context/unikit-fix/SKILL.md — MANDATORY if the file exists.
This file contains project-specific rules accumulated by /unikit-evolve from patches,
codebase conventions, and tech-stack analysis. These rules are tailored to the current project.
How to apply skill-context rules:
Load patches from .unikit/code/patches/ if the directory exists:
/unikit-evolve). Optionally: read a targeted subset — patches whose Tags or Files overlap with the current bug (match by keywords from $ARGUMENTS)YYYY-MM-DD-HH.mm.md) for baseline contextFrom $ARGUMENTS, identify:
If unclear, ask:
To fix this efficiently, I need more context:
1. What is the expected behavior?
2. What actually happens?
3. Is there a stack trace or {{engine_name}} Console log?
4. When did this start happening?
Investigation splits by where the symptom actually lives. The code-research delegates read the source — their tools are enough there. The editor rungs below are walked by the skill body itself: every one of them is a call to the engine MCP, and those grants are held by this skill, not by whatever it delegates to. Both modes pass through here, so the ladder is available on the planning path and on the immediate-fix path alike.
Take the rungs in order — cheapest deterministic signal first, most expensive probe last — and
stop at the first one that names a cause. Each rung is a class of signal, never a tool; the
vocabulary is the one .unikit/system/dev-principles.md → D2 uses. D2 answers is there such
a signal at all; this ladder answers in which order to take them.
Three rules hold across the whole ladder:
Report every rung you walk. One line per rung, in the order you took them:
rung <N> — <signal class> → <raw observation>
A rung skipped on purpose is named with its reason (rung 6 — frame → skipped, the symptom is not visual). Without these lines the ladder is indistinguishable from prose: nobody can check that the
expensive probe came after the cheap one rather than instead of it.
After understanding the problem, ask the user to choose a mode:
How would you like to proceed?
Options:
1. Fix now — investigate and fix immediately
2. Plan first — create a fix plan for review, fix later
Based on choice:
Investigate the codebase enough to understand the problem and create a plan.
Use the same parallel exploration approach as Step 2 — launch 2-3 recon-agent dispatches to investigate the problem. Design prompts based on the specific bug context.
Fallback: If Agent tool is unavailable, investigate directly using Glob/Grep/Read.
For a symptom that lives in the editor rather than in the source, walk the rungs from Step 1 yourself — the delegates cover the source half only.
After tasks return, synthesize findings to:
The synthesis is written in the diagnosis contract below — six fields, ## Analysis in the plan file.
.unikit/system/dev-principles.md → A1 covers a different moment: CLAIM / EVIDENCE / VERDICT reports
finished work and ends in a binary verdict. A diagnosis is unfinished work — it has no verdict to give,
so it carries a boundary and a named list of what is still a guess instead. The two do not compete and neither
replaces the other.
Then create .unikit/code/FIX_PLAN.md:
# Fix Plan: [Brief title]
**Problem:** [What's broken — from user's description]
**Created:** YYYY-MM-DD HH:mm
## Analysis
The diagnosis contract — six fields, and every one of them is filled:
- **Symptom:** what is observably wrong, in the terms it actually presents in.
- **Evidence:** the raw observations the diagnosis rests on — a console line, a diagnostic with coordinates, a value read back. A retelling is not evidence: write down what you saw, not what it meant to you.
- **Boundary:** how far the investigation actually reached, and therefore what it does not cover.
- **Probable cause:** the mechanism that explains the symptom, stated as the candidate it still is.
- **Next action:** the single step the fix starts with.
- **Unverified:** what remained a hypothesis. **This field is never empty.** When everything was verified it reads `nothing` — a deliberate statement, not an omission. A hypothesis that goes unnamed here is read as established by whoever implements the fix.
## Fix Steps
Step-by-step plan for implementing the fix:
1. [ ] Step one — what to change and why
2. [ ] Step two — ...
3. [ ] Step three — ...
## Files to Modify
- `path/to/File.cs` — what changes are needed
- `path/to/Another.cs` — what changes are needed
## Risks & Considerations
- Potential side effects
- Things to verify after the fix
- Edge cases to watch for
- Engine-specific concerns (companion files, serialization, module boundaries)
## Test Coverage
- Which regression test of the logic to add (input → expected outcome) — none for a defect of authored content or tunable data
- What edge cases to cover
After creating the plan, output:
## ✅ Fix Plan Created
Plan saved to `.unikit/code/FIX_PLAN.md`.
Review the plan, and when ready:
/unikit-fix
STOP here. Do NOT apply the fix.
Use Explore tasks to investigate the problem in parallel. This keeps the main context clean and allows simultaneous investigation of multiple angles.
Launch 2-3 Explore tasks simultaneously:
Task 1 — Locate the problem area:
recon-agent(prompt:
"Find code related to [error location / affected functionality].
Read the relevant classes, trace the data flow.
Thoroughness: medium.")
Task 2 — Related code & side effects:
recon-agent(prompt:
"Find all callers/consumers of [affected class/method].
Check Zenject bindings and installers that wire this up.
Identify what else might break or be affected.
Thoroughness: medium.")
Task 3 — Similar past patterns (if patches exist):
recon-agent(prompt:
"Search for similar error patterns or related fixes in the codebase.
Check git log for recent changes to [affected files].
Thoroughness: quick.")
After tasks return, synthesize findings to identify:
Fallback: If Agent tool is unavailable, investigate directly using Glob/Grep/Read — find relevant files, read the code around the issue, trace the data flow, check for similar patterns.
For a symptom that lives in the editor rather than in the source, walk the rungs from Step 1 yourself — the delegates cover the source half only.
Report the synthesis in the diagnosis contract — the same six fields Step 1.1 writes into ## Analysis
(symptom · evidence · boundary · probable cause · next action · unverified). On this path there is no plan file,
so the contract goes into the session output; Unverified is filled here too, and reads nothing only when
nothing was left to guess. Step 3 fixes what this contract established, not what it merely suspected.
This skill OWNS code-writing for fixes. Implement inline using Read/Edit/Write/Bash with the rules already loaded in Step 0.2 Bootstrap. Do NOT invoke /unikit-devcontext via Skill(...).
Choose execution mode:
develop-agent to isolate context.When implementing inline, apply:
dev-principles.md (no inline comments, update docs, etc.)Fallback: If Agent tool is unavailable, do NOT invoke /unikit-devcontext inline. Implement directly with the loaded rules — Bootstrap already covers everything needed.
When the fix touches the editor's serialized state — a scene, a prefab, a component, an asset, UI, VFX, animation, project settings — rather than source text, carry it out through the engine MCP by .unikit/system/dev-principles.md → D6 (its part below the lazy-read boundary is read now if this session has not read it yet). No rules file, or no check line for this area → nothing changes: it is never a reason to declare the fix impossible or to mark it ⏸️ MANUAL (A9).
A call that misled you is a finding (D7): a candidate line in the fix report and, when this fix runs against a plan, a row in that plan's ## MCP Findings table, written on finishing the step that produced it — observed is the date you observed it (Bash(date *)). Never write .unikit/MCP-RECHECK-NOTES.md from here. The library reference has two triggers (D8).
After the fix is implemented, you MUST continue through ALL remaining steps (4 → 5 → 6 → 7).
Use MCP server {{engine_mcp_tool}} to check that the project compiles after the fix:
{{engine_mcp_tool}}file:line references and fix them{{engine_mcp_tool}} is unavailable — skip and note: Compilation check: engine MCP unavailable, skippedInside a review loop (dev-principles.md item 5a — this fix answers a defect in a result handed over in this session, which the user is reviewing) skip this step: print INFO [testing] review loop: tests deferred until you accept — once per loop, not again when an earlier edit of this loop already printed it — and go to Step 4.3. Outside a loop, run it as follows.
Run the tests through MCP server {{engine_mcp_tool}} at the width the shared run settings give — {{skills_dir}}/unikit-implement/references/test-runs.md → ## Run width. Read that section alone, once per session, the first time this step runs: it resolves testing.run.use_affected_modules and testing.run.full_run_threshold_percent from .unikit/config.yaml, says how the affected test suites are found, requires one run, and says what counts as green. A fix has no coverage, so its run follows the section's phase row; its changed files are git status --porcelain plus the files this fix touched.
use_affected_modules: false (the default) → every test in the project, in one runtrue → the affected test suites in one run — or every test, when that section widens the runWARN [testing] test-run reference missing — every test is run; run unikit-ai updateTest run: no tests in the project and go on{{skills_dir}}/unikit-implement/references/test-runs.md → ## Run width → ### One scope, one launch){{engine_mcp_tool}} is unavailable — skip and note: Test run: engine MCP unavailable, skippedSome engines require companion/metadata files for every asset.
Read .unikit/DESCRIPTION.md to determine if the current engine has such a mechanism. If yes — verify consistency for any created or deleted source files:
Verify the fix doesn't violate module boundaries defined in .unikit/ARCHITECTURE.md.
For each modified source file in a module directory: check that imports don't reference forbidden dependency directions (as specified in the architecture doc).
For any new source files, verify naming/namespace follows the convention table from .unikit/ARCHITECTURE.md.
Inside a review loop (Step 4.2) skip this step with the same single line — the regression test is written after acceptance (dev-principles.md item 5a) — and go to Step 6.
Outside a loop, suggest a regression test only for a defect in logic or in a system value (dev-principles.md item 5). A defect of authored content or of tunable data gets no test: its evidence is a frame or a read-back, and a live number is never written into a test. Then go to Step 6.
## Fix Applied
**Problem:** [brief explanation]
**Root cause:** [root cause]
**Fix:** [what was changed]
### Recommendation: add a regression test
This bug should be covered with a regression test so that it does not return:
- **Input:** [the problematic input — supplied by the test]
- **Expected outcome:** [what the logic must now produce]
Create the test?
1. Yes — create the test
2. No — skip
Based on choice:
Read/Edit/Write with the rules and principles loaded in Step 0.2 Bootstrap. Use develop-agent only if the test requires extensive codebase exploration. Do NOT invoke /unikit-devcontext via Skill(...) — Bootstrap already covers everything.The patch in Step 6 is mandatory regardless of the test decision.
ALWAYS create a patch after every fix. This builds a knowledge base for future fixes.
Create directory if it doesn't exist:
mkdir -p .unikit/code/patches
Create a patch file: YYYY-MM-DD-HH.mm.md (e.g., 2026-03-09-14.30.md)
Use this template:
# [Brief title describing the fix]
**Date:** YYYY-MM-DD HH:mm
**Files:** list of modified files
**Severity:** low | medium | high | critical
## Problem
What was broken. How it manifested (error message, wrong behavior).
Include the actual error or symptom.
## Root Cause
WHY the problem occurred — not "what was wrong" but "why it was wrong":
- Logic error? Why was the logic incorrect?
- Missing null check? Why was it missing?
- Wrong assumption? What was assumed?
- Race condition? What sequence caused it?
- DI misconfiguration? What binding was wrong?
## Solution
How the fix was implemented. Key code changes and reasoning.
Include the approach, not just "changed line X".
## Prevention
How to prevent this class of problems in the future:
- What pattern/practice should be followed?
- What should be checked during code review?
- What test would catch this?
## Tags
Space-separated tags for categorization, e.g.:
`#null-check` `#async` `#zenject` `#r3` `#unitask` `#serialization` `#mono-behaviour`
This is NOT optional. Every fix generates a patch. The patch is your learning.
## Fix Applied
**Problem:** [what was broken]
**Root cause:** [root cause]
**Fix:** [what was changed]
**Modified files:**
- path/to/File.cs (line X)
**Compilation:** pass / skipped
**Tests:** pass / skipped
**Test suggested:** Yes
**Patch created:** .unikit/code/patches/YYYY-MM-DD-HH.mm.md
Count only unprocessed patches — those created after the cursor in .unikit/evolutions/patch-cursor.json:
.unikit/evolutions/patch-cursor.json (if exists) → extract last_processed_patch filename*.md in .unikit/code/patches/, sort lexicographicallylast_processed_patch (or all patches if cursor file doesn't exist)⚠️ You have N unprocessed patches (since last /unikit-evolve). Consider running /unikit-evolve
to feed lessons learned back into skills and prevent recurring issues.
Do NOT count already-processed patches — they have already been analyzed by /unikit-evolve.
After the fix, check if any open tasks in the project TODO list were resolved:
.unikit/TODO.md exists. If not — skip this step..unikit/TODO.md and collect all unchecked tasks (- [ ]).- [ ] to - [x] directly in .unikit/TODO.md using the Edit tool. No agents or skills needed.✅ Fix applied. What's next?
Options:
1. 🔍 Verify first — /unikit-verify → /unikit-commit (recommended)
2. 💾 Skip to commit — /unikit-commit directly
Based on choice:
unikit-verify, and when it returns invoke unikit-commitunikit-commit directlyStage ONLY files modified by the fix.
If the fix was executed from an existing .unikit/code/FIX_PLAN.md:
rm .unikit/code/FIX_PLAN.md
This happens only after all verification (Step 4), test suggestion (Step 5), and patch creation (Step 6) are complete.
Suggest the user to free up context space if needed: /clear (full reset) or /compact (compress history).
User: /unikit-fix NullReferenceException in CustomerFactory.Create() when spawning customer
Actions:
CustomerFactory classCreate()User: /unikit-fix MissingReferenceException when customer leaves shop — accessing destroyed GameObject
Actions:
.AddTo()#r3 #lifecycle tagsUser: /unikit-fix ZenjectException: Unable to resolve ICustomerSystem
Actions:
ICustomerSystem interface and its implementation#zenject #di tags.unikit/code/FIX_PLAN.md before anything elseRead/Edit/Write/Bash with the rules loaded in Step 0.2 Bootstrap. Delegate to develop-agent ONLY for complex fixes requiring extensive codebase exploration. Never invoke /unikit-devcontext via Skill(...) from this workflow..unikit/code/patches/ entrylanguage.ui from .unikit/config.yaml (default: English)/unikit-fix owns .unikit/code/FIX_PLAN.md and .unikit/code/patches/*.md; all other .unikit/ artifacts are read-onlyAssets/Third-Party Assets/ and Assets/Plugins/ are off-limitsまだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
A test skill from an extension
日本語の概要は準備中です。原文の説明を表示しています。
A test skill from an extension (v2)
日本語の概要は準備中です。原文の説明を表示しています。
Initialize the UniKit framework in a project. Scans the current project to detect the engine and real tech stack, then generates the base framework documents that give AI agents context about the project — the resolved project description, the architecture doc, AGENTS.md, and the user-editable .unikit/config.yaml. This is the one-time, whole-project setup run before any other unikit skill. Use whenever the user wants to initialize, set up, or onboard the framework, e.g. "initialize unikit", "init the framework", "set up unikit", "set up the project", "configure AI context", "scan my project and set it up", "bootstrap the project". It also actualizes the config of a project already set up — say "update the config", "add missing settings", "actualize configuration", "fix my config".
日本語の概要は準備中です。原文の説明を表示しています。
Generate the architecture guidelines for a game project. Scans the project structure and tech stack, then produces .unikit/ARCHITECTURE.md describing the folder layout, dependency rules, and how modules communicate. Name a specific pattern or let it auto-detect. Use when the user wants to define or document the project architecture, e.g. "generate architecture", "describe the architecture", "which architecture should I use", "set up project architecture", or mentions module structure, module boundaries, project organization, or dependency rules.
日本語の概要は準備中です。原文の説明を表示しています。
Archive completed plans. Moves finished folder plans from .unikit/code/plans/<folder>/ to .unikit/code/archive/plans/<folder>/, so plan lookup and the plan lists stop offering them; an unfinished plan moves only when the user picks it, and is marked as unfinished. Lists every plan with its created and last-change dates; plans can be picked by number or by date. Never deletes, renames or commits. Use when user says "archive plans", "archive completed", "archive old plans", "clean up plans", or "show archived plans". Not for .unikit/code/PLAN.md or FIX_PLAN.md; to check that a plan is really done use /unikit-verify, to commit the move use /unikit-commit.
日本語の概要は準備中です。原文の説明を表示しています。
Create conventional commit messages for {{engine_name}} projects by analyzing staged changes. Handles engine-specific concerns like companion file pairing, binary assets, and linking the related plan. ALWAYS use this skill when the user asks to commit, save changes, or create a commit. Trigger phrases include "commit", "create commit", "commit this", "save changes", "save my work". Even if the user simply says "commit" or asks you to commit after finishing a task — invoke this skill, do NOT commit manually via git.
日本語の概要は準備中です。原文の説明を表示しています。