mit einem Klick
plan
// ALWAYS USE THIS SKILL before writing implementation code for any non-trivial change. Produces a written architectural plan grounded in the existing codebase, then critiques it — both stages, one agent, one atomic unit.
// ALWAYS USE THIS SKILL before writing implementation code for any non-trivial change. Produces a written architectural plan grounded in the existing codebase, then critiques it — both stages, one agent, one atomic unit.
iOS environment bring-up for driving the em Capacitor app on BrowserStack App Automate via the wdio MCP — native (XCUITest) AND web (WKWebView) in one session. Invoked by browser-control when the target is `ios`; not normally called directly.
Fallback for iOS native touch dispatch when the wdio MCP's standard touch tools (`tap_element`, `swipe`, `drag_and_drop`, `mobile:` commands) produce the wrong behaviour for what a real finger would do. Posts the legacy JSONWP `/touch/perform` endpoint via curl. Use sparingly — only when a standard tool has visibly misfired, or for a recipe in the catalogue below.
Select a word inside an em editable on iOS App Automate so the native `Cut | Copy | Paste` edit menu appears and `window.getSelection()` reflects the word. Use when an iOS issue's repro depends on having text selected within a thought (formatting commands, edit-menu-driven flows, drag-blocking, etc.). Composes on top of `browser-control-ios-touch-fallback` for the underlying touch dispatch.
Use this skill after pushing commits or when asked about CI status or to fix failing tests. It monitors GitHub Actions workflow runs for the current branch, waits for completion, returns which checks passed or failed with error details, and provides a methodology for iterating until all checks pass.
Regenerate Puppeteer image snapshots using Docker. Use this skill when Puppeteer tests fail due to missing or outdated snapshots. Only use if the UI change was intentional, matches the user’s request or if you otherwise deem it to be necessary. NEVER use this skill to mask legitimate failures. ALWAYS explain to the user why you felt you needed to update snapshots.
Use this skill when CI checks have failed. It analyzes the failure logs, identifies the specific failing test or build step, categorizes the failure type, and provides guidance on how to fix it. Use in combination with the CI Monitor skill.
| name | plan |
| description | ALWAYS USE THIS SKILL before writing implementation code for any non-trivial change. Produces a written architectural plan grounded in the existing codebase, then critiques it — both stages, one agent, one atomic unit. |
| allowed-tools | ["bash"] |
This is the Plan skill. Before you create a branch, edit a file, or write a fix, you produce a written architectural plan grounded in the code that already exists — then you critique that plan yourself. Plan and Critique are two stages of one atomic skill, performed by one agent. You do not hand off to a separate reviewer; you produce the plan and you tear it down, in the same pass, before any implementation begins.
The reason this skill exists: agents solve problems locally. They default to writing new code instead of extending what is there, duplicate logic that already exists, and rationalise whatever they slapped together after the fact. Every one of those failures is the same root cause — not looking at and understanding what already exists before writing new code. This skill forces the reconnaissance first, and makes you defend it before you are allowed to build.
Follow these instructions directly, while observing the methodology described to you (the issue-repro gate, and the use of ci-monitor, test-diagnosis, and puppeteer skills where appropriate). DO NOT deviate from this process, skip stages, or begin implementation before the Critique stage passes.
issue-repro has reproduced the failure, and before you write the fix. You cannot honestly judge adjacent-behaviour impact until you have seen the real failure mode. Reproduction first, plan second, implementation third.Reading source code to build the plan is expected and required. Writing implementation code is not — that does not begin until the Critique stage passes.
Produce a written plan with the five sections below. Sections 1–3 are mandatory and require quoted evidence — they are the load-bearing sections and the ones agents most often fake. Sections 4–5 are lighter but required.
Evidence rule. "I looked at X" is not evidence. Evidence is a
path/to/file.ts:linereference and the relevant lines quoted in a code fence. A section that asserts something about existing code without a quoted fence is incomplete — the Critique stage will reject it.
What functions, modules, helpers, types, or tests already touch this concept? Find them before you decide anything.
Start with the repo's documentation — it is required reading, not optional. The docs/ folder in the repository root is the module/boundary map and the fastest way to orient before you touch source. Read the relevant files and grep docs/**/*.md for your concept:
docs/readme.md — the index of every subsystem doc. Skim it first to find which docs apply to your task.docs/folder-structure.md — what lives where under src/, and what belongs in each module. This tells you where a change should go before you decide where to put it (e.g. reducers live in src/actions/, pure derived slices in src/selectors/, and src/device/selection.ts is the single lint-enforced access point to window.getSelection()). A build-vs-extend decision that ignores this is wrong by construction.docs/glossary.md — project vocabulary (lexeme, cliff, autofocus, tsid, tangential context, …). If the task uses a term you cannot define, resolve it here before proceeding.data-model.md, cursor-and-caret.md, persistence.md, layout-rendering.md, drag-and-drop.md, metaprogramming.md, commands.md, testing.md — encode design intent and invariants for each area. Read the one(s) your change touches and quote the relevant constraint in your plan.Then grep the source for the concrete functions, types, and tests. For each relevant piece:
path/to/file.ts:120-134^ that means "leading only"), type signatures, narrow scope, ordering assumptions, early returns.The point is to surface constraints that are already in the code so you do not reinvent or violate them. (Case in point: a helper whose regex is anchored ^… only handles the leading case — building a whole-string scanner beside it is wasted code and a bug.)
If you genuinely find nothing pre-existing, say so explicitly and show the searches you ran (the grep commands and that they returned nothing). "Nothing exists" is a finding that must itself be evidenced.
Given the surface area above, does this change extend existing code or introduce a new path? State the decision and justify it against section 1.
Default to extending. A new path needs a defended reason.
What other behaviours in this subsystem might this change affect? Enumerate them explicitly — even when you believe the answer is "none," list what you considered and why each is safe.
For editor / interaction changes in em, that means actively asking about: deletion / backspace, text selection, caret placement, undo / redo, IME composition, copy / paste, gesture handling, and multi-cursor / collapse behaviour. Changing one path in an editor routinely breaks an adjacent one (e.g. an insert-on-type change that makes backspace re-insert what it just deleted). For non-editor changes, enumerate the analogous neighbours: callers of the function, subscribers to the state, other entry points to the same reducer.
For each behaviour you touch or border: is there existing test coverage? If not, note that you will verify it manually (and how).
Sketch at least two approaches and compare them on: reuse of existing code, complexity, and edge cases. This exists to break first-instinct lock-in — even a short comparison is enough. State which you chose and why.
Where the change will live: which files, which functions, the shape of the modification. Enough that a reviewer can confirm the right surface is being touched — but not the actual code. List any new files and justify each against section 2.
Now turn on your own plan. Same agent, same pass — this is not optional and not a rubber stamp. Review the plan against the actual codebase, not against itself. Check each:
docs/ file? If it puts code where docs/folder-structure.md says it does not belong, or violates a constraint in the subsystem doc for the area you are touching, fix the plan — the docs describe the intended architecture, and "the code happened to allow it" is not a defence.file:line + quoted fence behind it? Any bare assertion fails the gate.critique the plan against the codebase
if a check fails → revise the plan (back to Stage 1 for that section) and re-critique
if all checks pass → record the plan, then proceed to implementation
Record the final plan where the work will be reviewed:
When — and only when — the Critique stage has passed, output exactly this line, verbatim, on its own line:
plan: complete — architectural plan produced and critique passed per .github/skills/plan/SKILL.md.
Only after that line may you create a branch (if not already on one) and begin implementation.