In short:
ak-scenarioexamines a code file or a feature description across 12 dimensions and lists the scenarios where it can break, each with a severity. The result table goes on toak-testto write tests,ak-planto put the risks into a plan, orak-predictto debate the big risks. It does not write tests or change code.
Disclosure: I maintain AgentKit and have an affiliate relationship with it: the AgentKit link in this post is an affiliate link; buying through it gets you 30% off.
Summary
Use it when you are about to build a feature with state or many branches, or when the code exists and you are about to write tests. You do not need it for very small changes: a one-line fix, a UI tweak, a config change with no logic branches.
flowchart LR
A["Code file or feature description"] --> B["ak-scenario"]
B --> C["Scenario table + severity"]
C --> D["ak-test: write tests"]
C --> E["ak-plan: put risks into the plan"]
C --> F["ak-predict: debate big risks"]The four core ideas of the skill:
| Idea | Question | Example |
|---|---|---|
| 12 analysis dimensions | From which angles does the feature show where it breaks? | Payment API: empty amount, clicking pay twice in a row, expired token |
| Skipping a dimension needs a reason | Which dimension does not apply, and on what assumption? | Skip Compliance because no personal data is stored; if that assumption can fail, it becomes a scenario |
| Severity | Which scenario must be handled first? | Critical is data loss or a security leak; Low is a small display bug |
| One pass or a loop | Is one pass enough, or dig until nothing new turns up? | No flag: one pass; --iterations 25: exactly 25 rounds; --saturation: stops after 2 rounds in a row with no New |
Each scenario is tied to an invariant or a state transition and to a test target, with no padding to hit a count. In loop mode, "nothing new" is only a stop signal, not proof that every case is covered; the final report states the limit used and the gaps that remain.
Sample prompt for a feature you are about to build:
/ak-scenario "Sign up with Google and GitHub for the <app name> app.
Users who already have an email account can link OAuth to it."| Flag | What it is for | Since ak |
|---|---|---|
--iterations N | Loops exactly N rounds, then stops | 1.0.0 |
--saturation | Loops until no new scenarios turn up | 1.0.0 |
--domain <type> | Hints the domain to order the dimensions | 1.0.0 |
--focus <dim> | Puts one kind of risk first | 1.0.0 |
--format <type> | Changes the output format | 1.0.0 |
Below is the detailed version: the run flow, 5 situations with prompts, each flag explained (when to use it, when you do not need it, what you get), the change history by ak release, and common pitfalls. The detailed version and the interactive page are for subscribers. Your agent can also search them through the portal's MCP.
Opens when your account has subscriber access
This guide is for subscribers
Once your account has access, the full piece, the interactive visual and the agent call all open.
- Sign in or create a modernEngineer accountReading access belongs to your account email.
- Choose a plan on the pricing page1, 3 or 12 months, paid by VietQR bank transfer. Access opens about a minute after the money arrives.
- Or redeem a Facebook subscriber codePeople supporting the page on Facebook get an activation code by message each month.
Already a subscriber? Sign in to read.
Use this piece in your agent
Get an API keyCopy the text below and paste it into Claude Code, Codex or whichever agent you use. The agent reads the piece and checks it against the repo you have open.
Read "ak-scenario: find edge cases and test scenarios before you code" on modernEngineer and apply it to this repo.
1. Call the content_get tool of the modernengineer MCP server with locale "en", slug "ak-scenario". If the modernengineer MCP server is not connected, stop and walk me through connecting it from https://modernengineer.dev/en/mcp.
2. Summarize the main steps of the piece and point out which apply to this repo.
3. Propose concrete changes and ask me before editing any file.Connect MCP in Claude Code (once)
claude mcp add --transport http modernengineer \
https://api.modernengineer.dev/mcp \
--header "Authorization: Bearer <API key>"Reading the full piece over MCP needs an API key from a subscriber account or one that bought this guide. Without access, the agent only gets the opening.
- Version
- v1.0.0
- Updated
- 22/10/2026
- Licence
- All rights reserved
- Slug
- ak-scenario


