Kompletní obsah obou skills k okamžitému použití. Přesně to, co načte Claude Code.
1) Questions /questions
Instalace: /plugin marketplace add MrSucik/structured-questions → /plugin install questions@structured-questions · github.com/MrSucik/structured-questions (MIT)
Questions
Overview
Batch all pending questions, ambiguities, and decisions into
structured AskUserQuestion tool calls instead of asking
them inline as text. Forces use of the native multi-question UI for a
faster, cleaner Q&A experience.
When to Use
- User invokes
/questions
- You have 2+ unresolved questions about a task
- Before starting significant work where assumptions would be
risky
- End-of-conversation sweep to surface anything still unclear
When NOT to Use
- You have exactly 1 simple yes/no question (just ask inline)
- The answer is obvious from context or code
Core Pattern
Step 1: Identify ALL
Unanswered Questions
Scan your current context for:
- Ambiguous requirements — things the user said that
could mean multiple things
- Missing information — details you need but weren't
provided
- Decision points — choices where there are valid
alternatives
- Assumptions you're making — things you're guessing
at instead of knowing
Be thorough. Don't stop at the first 2 questions. Dig for everything
that's unclear.
Step 2: Structure
Into AskUserQuestion Calls
The tool supports 1-4 questions per call, each with
2-4 options (plus auto "Other").
Rules:
- Every question MUST go through AskUserQuestion —
never ask questions as plain text when this skill is active
- Group related questions into the same call (max 4
per call)
- If you have >4 questions, use multiple
sequential AskUserQuestion calls
- Each option needs a clear label (1-5 words) and a
description explaining implications
- Put your recommended option first with
"(Recommended)" suffix
- Use
multiSelect: true when choices
aren't mutually exclusive
- Use
header as a short category tag
(max 12 chars): "Scope", "Approach", "Priority", "Style", etc.
Step 3: Wait and Incorporate
After the user answers:
- Acknowledge their choices briefly (don't parrot them back)
- If answers reveal NEW questions, batch those into another
AskUserQuestion call
- Once all questions are resolved, proceed with the task
Example
User says: "Add a caching layer to the API"
BAD (inline text):
"What kind of cache do you want? Redis? In-memory? Also, should I
cache all endpoints or just the slow ones? And what about cache
invalidation?"
GOOD (structured):
AskUserQuestion(questions: [
{
question: "What caching backend should we use?",
header: "Backend",
options: [
{ label: "Redis (Recommended)", description: "Distributed, persistent, works across instances" },
{ label: "In-memory (Map)", description: "Fastest, but lost on restart and per-instance only" },
{ label: "SQLite", description: "Persistent, single-node, no extra infra" }
],
multiSelect: false
},
{
question: "Which endpoints should be cached?",
header: "Scope",
options: [
{ label: "Slow endpoints only (Recommended)", description: "Cache responses >200ms, minimal risk" },
{ label: "All GET endpoints", description: "Broad caching, higher invalidation complexity" },
{ label: "Specific endpoints", description: "You'll tell me which ones" }
],
multiSelect: false
},
{
question: "How should cache invalidation work?",
header: "Invalidation",
options: [
{ label: "TTL-based (Recommended)", description: "Entries expire after a set time, simple and predictable" },
{ label: "Event-driven", description: "Invalidate on mutations, more complex but always fresh" },
{ label: "Manual only", description: "Cache until explicitly cleared" }
],
multiSelect: false
}
])
Quick Reference
| AskUserQuestion field |
Usage |
question |
Full question ending with ? |
header |
Short tag, max 12 chars |
options (2-4) |
label (1-5 words) + description |
multiSelect |
true if choices aren't exclusive |
preview |
For code/UI mockup comparisons |
Common Mistakes
| Mistake |
Fix |
| Asking questions as plain text |
ALWAYS use AskUserQuestion tool |
| Only asking 1 question when there are clearly more |
Scan harder — assumptions are hidden questions |
| Vague option labels like "Option A" |
Use concrete labels: "Redis", "In-memory", "SQLite" |
| Missing descriptions on options |
Every option needs a description explaining tradeoffs |
| Asking obvious things that context already answers |
Don't waste question slots on things you can derive |
2) Improve Codebase Architecture
Zdroj: mattpocock/skills → engineering/improve-codebase-architecture · skill má 4 soubory (níže)
📄 SKILL.md
Improve Codebase
Architecture
Surface architectural friction and propose deepening
opportunities — refactors that turn shallow modules into deep
ones. The aim is testability and AI-navigability.
Glossary
Use these terms exactly in every suggestion. Consistent language is
the point — don't drift into "component," "service," "API," or
"boundary." Full definitions in LANGUAGE.md.
- Module — anything with an interface and an
implementation (function, class, package, slice).
- Interface — everything a caller must know to use
the module: types, invariants, error modes, ordering, config. Not just
the type signature.
- Implementation — the code inside.
- Depth — leverage at the interface: a lot of
behaviour behind a small interface. Deep = high
leverage. Shallow = interface nearly as complex as the
implementation.
- Seam — where an interface lives; a place behaviour
can be altered without editing in place. (Use this, not
"boundary.")
- Adapter — a concrete thing satisfying an interface
at a seam.
- Leverage — what callers get from depth.
- Locality — what maintainers get from depth: change,
bugs, knowledge concentrated in one place.
Key principles (see LANGUAGE.md for the
full list):
- Deletion test: imagine deleting the module. If
complexity vanishes, it was a pass-through. If complexity reappears
across N callers, it was earning its keep.
- The interface is the test surface.
- One adapter = hypothetical seam. Two adapters = real
seam.
This skill is informed by the project's domain model. The
domain language gives names to good seams; ADRs record decisions the
skill should not re-litigate.
Process
1. Explore
Read the project's domain glossary and any ADRs in the area you're
touching first.
Then use the Agent tool with subagent_type=Explore to
walk the codebase. Don't follow rigid heuristics — explore organically
and note where you experience friction:
- Where does understanding one concept require bouncing between many
small modules?
- Where are modules shallow — interface nearly as
complex as the implementation?
- Where have pure functions been extracted just for testability, but
the real bugs hide in how they're called (no
locality)?
- Where do tightly-coupled modules leak across their seams?
- Which parts of the codebase are untested, or hard to test through
their current interface?
Apply the deletion test to anything you suspect is
shallow: would deleting it concentrate complexity, or just move it? A
"yes, concentrates" is the signal you want.
2. Present candidates
Present a numbered list of deepening opportunities. For each
candidate:
- Files — which files/modules are involved
- Problem — why the current architecture is causing
friction
- Solution — plain English description of what would
change
- Benefits — explained in terms of locality and
leverage, and also in how tests would improve
Use CONTEXT.md vocabulary for the domain, and LANGUAGE.md vocabulary for the
architecture. If CONTEXT.md defines "Order," talk
about "the Order intake module" — not "the FooBarHandler," and not "the
Order service."
ADR conflicts: if a candidate contradicts an
existing ADR, only surface it when the friction is real enough to
warrant revisiting the ADR. Mark it clearly (e.g. "contradicts
ADR-0007 — but worth reopening because…"). Don't list every
theoretical refactor an ADR forbids.
Do NOT propose interfaces yet. Ask the user: "Which of these would
you like to explore?"
3. Grilling loop
Once the user picks a candidate, drop into a grilling conversation.
Walk the design tree with them — constraints, dependencies, the shape of
the deepened module, what sits behind the seam, what tests survive.
Side effects happen inline as decisions crystallize:
- Naming a deepened module after a concept not in
CONTEXT.md? Add the term to
CONTEXT.md — same discipline as /domain-model
(see CONTEXT-FORMAT.md).
Create the file lazily if it doesn't exist.
- Sharpening a fuzzy term during the conversation?
Update
CONTEXT.md right there.
- User rejects the candidate with a load-bearing
reason? Offer an ADR, framed as: "Want me to record this as
an ADR so future architecture reviews don't re-suggest it?" Only
offer when the reason would actually be needed by a future explorer to
avoid re-suggesting the same thing — skip ephemeral reasons ("not worth
it right now") and self-evident ones. See ADR-FORMAT.md.
- Want to explore alternative interfaces for the deepened
module? See INTERFACE-DESIGN.md.
📄 LANGUAGE.md — slovník & principy
Language
Shared vocabulary for every suggestion this skill makes. Use these
terms exactly — don't substitute "component," "service," "API," or
"boundary." Consistent language is the whole point.
Terms
Module Anything with an interface and an
implementation. Deliberately scale-agnostic — applies equally to a
function, class, package, or tier-spanning slice. Avoid: unit,
component, service.
Interface Everything a caller must know to use the
module correctly. Includes the type signature, but also invariants,
ordering constraints, error modes, required configuration, and
performance characteristics. Avoid: API, signature (too narrow
— those refer only to the type-level surface).
Implementation What's inside a module — its body of
code. Distinct from Adapter: a thing can be a small
adapter with a large implementation (a Postgres repo) or a large adapter
with a small implementation (an in-memory fake). Reach for "adapter"
when the seam is the topic; "implementation" otherwise.
Depth Leverage at the interface — the amount of
behaviour a caller (or test) can exercise per unit of interface they
have to learn. A module is deep when a large amount of
behaviour sits behind a small interface. A module is
shallow when the interface is nearly as complex as the
implementation.
Seam (from Michael Feathers) A place where
you can alter behaviour without editing in that place. The
location at which a module's interface lives. Choosing where to
put the seam is its own design decision, distinct from what goes behind
it. Avoid: boundary (overloaded with DDD's bounded
context).
Adapter A concrete thing that satisfies an interface
at a seam. Describes role (what slot it fills), not substance
(what's inside).
Leverage What callers get from depth. More
capability per unit of interface they have to learn. One implementation
pays back across N call sites and M tests.
Locality What maintainers get from depth. Change,
bugs, knowledge, and verification concentrate at one place rather than
spreading across callers. Fix once, fixed everywhere.
Principles
- Depth is a property of the interface, not the
implementation. A deep module can be internally composed of
small, mockable, swappable parts — they just aren't part of the
interface. A module can have internal seams (private to
its implementation, used by its own tests) as well as the
external seam at its interface.
- The deletion test. Imagine deleting the module. If
complexity vanishes, the module wasn't hiding anything (it was a
pass-through). If complexity reappears across N callers, the module was
earning its keep.
- The interface is the test surface. Callers and
tests cross the same seam. If you want to test past the
interface, the module is probably the wrong shape.
- One adapter means a hypothetical seam. Two adapters means a
real one. Don't introduce a seam unless something actually
varies across it.
Relationships
- A Module has exactly one Interface
(the surface it presents to callers and tests).
- Depth is a property of a Module,
measured against its Interface.
- A Seam is where a Module's
Interface lives.
- An Adapter sits at a Seam and
satisfies the Interface.
- Depth produces Leverage for
callers and Locality for maintainers.
Rejected framings
- Depth as ratio of implementation-lines to
interface-lines (Ousterhout): rewards padding the
implementation. We use depth-as-leverage instead.
- "Interface" as the TypeScript
interface keyword
or a class's public methods: too narrow — interface here
includes every fact a caller must know.
- "Boundary": overloaded with DDD's bounded context.
Say seam or interface.
📄 DEEPENING.md
Deepening
How to deepen a cluster of shallow modules safely, given its
dependencies. Assumes the vocabulary in LANGUAGE.md — module,
interface, seam,
adapter.
Dependency categories
When assessing a candidate for deepening, classify its dependencies.
The category determines how the deepened module is tested across its
seam.
1. In-process
Pure computation, in-memory state, no I/O. Always deepenable — merge
the modules and test through the new interface directly. No adapter
needed.
2. Local-substitutable
Dependencies that have local test stand-ins (PGLite for Postgres,
in-memory filesystem). Deepenable if the stand-in exists. The deepened
module is tested with the stand-in running in the test suite. The seam
is internal; no port at the module's external interface.
3. Remote but owned (Ports
& Adapters)
Your own services across a network boundary (microservices, internal
APIs). Define a port (interface) at the seam. The deep
module owns the logic; the transport is injected as an
adapter. Tests use an in-memory adapter. Production
uses an HTTP/gRPC/queue adapter.
Recommendation shape: "Define a port at the seam, implement an
HTTP adapter for production and an in-memory adapter for testing, so the
logic sits in one deep module even though it's deployed across a
network."
4. True external (Mock)
Third-party services (Stripe, Twilio, etc.) you don't control. The
deepened module takes the external dependency as an injected port; tests
provide a mock adapter.
Seam discipline
- One adapter means a hypothetical seam. Two adapters means a
real one. Don't introduce a port unless at least two adapters
are justified (typically production + test). A single-adapter seam is
just indirection.
- Internal seams vs external seams. A deep module can
have internal seams (private to its implementation, used by its own
tests) as well as the external seam at its interface. Don't expose
internal seams through the interface just because tests use them.
Testing strategy: replace,
don't layer
- Old unit tests on shallow modules become waste once tests at the
deepened module's interface exist — delete them.
- Write new tests at the deepened module's interface. The
interface is the test surface.
- Tests assert on observable outcomes through the interface, not
internal state.
- Tests should survive internal refactors — they describe behaviour,
not implementation. If a test has to change when the implementation
changes, it's testing past the interface.
📄 INTERFACE-DESIGN.md
Interface Design
When the user wants to explore alternative interfaces for a chosen
deepening candidate, use this parallel sub-agent pattern. Based on
"Design It Twice" (Ousterhout) — your first idea is unlikely to be the
best.
Uses the vocabulary in LANGUAGE.md —
module, interface,
seam, adapter,
leverage.
Process
1. Frame the problem space
Before spawning sub-agents, write a user-facing explanation of the
problem space for the chosen candidate:
- The constraints any new interface would need to satisfy
- The dependencies it would rely on, and which category they fall into
(see DEEPENING.md)
- A rough illustrative code sketch to ground the constraints — not a
proposal, just a way to make the constraints concrete
Show this to the user, then immediately proceed to Step 2. The user
reads and thinks while the sub-agents work in parallel.
2. Spawn sub-agents
Spawn 3+ sub-agents in parallel using the Agent tool. Each must
produce a radically different interface for the
deepened module.
Prompt each sub-agent with a separate technical brief (file paths,
coupling details, dependency category from DEEPENING.md, what sits behind the seam). The
brief is independent of the user-facing problem-space explanation in
Step 1. Give each agent a different design constraint:
- Agent 1: "Minimize the interface — aim for 1–3 entry points max.
Maximise leverage per entry point."
- Agent 2: "Maximise flexibility — support many use cases and
extension."
- Agent 3: "Optimise for the most common caller — make the default
case trivial."
- Agent 4 (if applicable): "Design around ports & adapters for
cross-seam dependencies."
Include both LANGUAGE.md vocabulary and
CONTEXT.md vocabulary in the brief so each sub-agent names things
consistently with the architecture language and the project's domain
language.
Each sub-agent outputs:
- Interface (types, methods, params — plus invariants, ordering, error
modes)
- Usage example showing how callers use it
- What the implementation hides behind the seam
- Dependency strategy and adapters (see DEEPENING.md)
- Trade-offs — where leverage is high, where it's thin
3. Present and compare
Present designs sequentially so the user can absorb each one, then
compare them in prose. Contrast by depth (leverage at
the interface), locality (where change concentrates),
and seam placement.
After comparing, give your own recommendation: which design you think
is strongest and why. If elements from different designs would combine
well, propose a hybrid. Be opinionated — the user wants a strong read,
not a menu.