/ark-csharp:ark-mediator-frameworkfrom ark-csharp
Guides design, review, and changes of Ark.Tools.MediatorFramework contracts (queries, commands, events) including fields, routes, validators, authorization, versioning, and privacy.
Ships in ark-csharp. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill for application code that consumes Mediator Framework from NuGet. It is not for developing the framework or its source generators.
A contract is a public or cross-process boundary. Its decisions (which fields a caller may send, which rule fails with which error, who may call it, how it evolves, what personal data it carries) are expensive to change after clients ship, so they are made with the human before any code is written.
derived (<source>). Tag everything else ASK. Check the
facts the request states (types, existing fields, classification, available
data) against the code and put any correction at the top of the brief: a
design built on a wrong premise is wrong however complete it is.ASK items one at a time. Each question lists the valid
alternatives with their consequences and a recommendation with its reason,
so the human chooses instead of designing from scratch. When the choice
depends on input you lack (a business rule, an owner, a retention period),
still list the alternatives and make the recommendation conditional ("if X,
A; otherwise B"); never ask a bare question. Purpose, lawful
basis, retention period and DPIA trigger are always ASK when the change
touches personal data (see the scope rule below): they are decisions
for the product owner and the DPO, and the brief records who decided them.
Do not infer them from code; list the alternatives and label any
recommendation as a suggestion the DPO must confirm.<summary>, <remarks>); do not repeat
what an attribute already states (route, verb, version, scope).A new contract answers every section. A change answers the sections it affects,
plus Versioning and Privacy every time. The legal items are ASK only when the
contract carries personal data and the change touches a personal field, its
exposure, transport or purpose; otherwise answer "N/A: no personal-data change".
A documentation-only change needs only Documentation. "N/A" needs a reason.
IQuery/IRequest/ICommand/event/message), owner; background work is a separate internal message.Field | Type | Updatability | Required | Null meaning | Default | Concurrency | Validation | Personal-data class) with every field of each touched model, changed or not; labels Updatable (Input), Create-only (Create : Input), Output-only (Output), Context-supplied (never in the body), Identity (envelope); PUT replaces everything and absent means default; partial update is its own operation.DateTime; explicit precision, unit, currency.InvalidArgument; every collection and page has a maximum; unknown EvolvableEnum input is rejected.BusinessRuleViolation subclass documented on the contract./api/v{version}/<plural-kebab-resource>/{id}/<sub-resource>; actions as sub-path verbs; status 200 read (404 on null), 201 create, 202 accepted background work, 204 command without value; contract names <Resource>_<Verb>Request/Query, events in the past tense; gRPC Service = plural resource, Method = VerbNoun; deviations need a reason.IAsyncEnumerable; upload size, count, content types; download disposition.Ark.Tools.Authorization policy on the contract; instance checks; 403 by default, 404 when 403 discloses an unguessable id (GUID); list scoping; separate output models for restricted fields.EvolvableEnum<T> with NOT_SET = 0 on public contracts except externally controlled or [Flags] enums; reserved wire ids.ASK when personal data changes; messages crossing a service boundary carry only [Pseudonymous] identifiers, no direct identifiers or other personal attributes; messages between processes of the same service may carry classified personal data; special-category (Art. 9) and criminal-offence (Art. 10) data never in any message; Ark.Tools.Compliance or manual checks.The NuGet package generators own endpoint bindings, transport wrappers,
participant dispatch, routing registries, generated clients, and schemas. Do
not copy or recreate generated binding classes, .g.cs files, endpoint methods,
gRPC/Rebus/Functions/MCP wrappers, routing switches, or generator source.
Generated output is inspection evidence only. Use a handwritten adapter only
after checking the documented escape hatches and documenting why metadata cannot
express the requirement.
A handler that changes state and sends or publishes enlists its application context in the outbox, completes the scope, then commits:
using var scope = _bus.Enlist(context.OutboxContext);
await _bus.Publish(new BookPrintCompleted { BookId = id }, cancellationToken: ctk);
await scope.CompleteAsync(ctk);
await context.CommitAsync(ctk);
_bus.Enlist opens an ambient OutboxScope; the outbox wraps the transport,
so every bus honors it and the handler never checks whether an outbox is
configured. Whether the messages are staged, drained by a processor, or sent
directly by the development pass-through is a host decision (UseOutbox), not
handler code. A send outside a scope goes straight to the transport.
Ark.Tools.Authorization policies and decorators; do not
substitute Microsoft ASP.NET authorization metadata for shared permissions.[Flags].[Pseudonymous] ids may cross).PUT leaves absent fields untouched._bus.Enlist
completed before the commit, or casts IBus to reach the outbox.| Excuse | Reality |
|---|---|
| "The endpoint is obvious; I'll decide the route later." | Route, version, status, and auth are part of the contract and are decided in the brief. |
| "I can infer the lawful basis from the code." | Lawful basis, purpose and retention are legal decisions; ask and record who decided. |
| "We control all the clients, so a plain enum is fine." | Clients you don't know about yet, and old deployments, break on a new value; use EvolvableEnum<T>. |
| "It's an internal queue, retention doesn't matter." | Queues, dead-letter queues and outboxes hold copies of the data; queues need a TTL, and dead-letter queues and outboxes need explicit cleanup with a retention period. |
| "The generated code is small, so I can copy it." | Generated code belongs to the package version and will drift; declare metadata and inspect output instead. |
| "A background message can reuse the HTTP response contract." | Separate immediate caller semantics from retryable, durable work. |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
4 skills in this plugin
/ark-complianceUse when a .NET build reports an ARKPII* MSBuild or analyzer diagnostic, or when reviewing Ark.Tools.Compliance data-classification, redaction, SQL-policy, or sensitive-value-object behavior./ark-reqnrollWriting Gherkin Feature files and the Reqnroll verb bindings steps. Use this skill when adding or reviewing Reqnroll features or Binding/Steps classes for any project./roslyn-incremental-generator-specialistUse when designing, reviewing, or refactoring Roslyn incremental source generators with strict pipeline discipline, parser/emitter separation, deterministic output, and cache-safe models.npx claudepluginhub arklab/ark.tools --plugin ark-csharpOther plugins' skills for the same job