Expecho/Agent42 / .agentic/optional-skills/spike-dotnet
spike-dotnet
VerifiedValidate an assumption or run a quick spike with a .NET file-based app (dotnet run app.cs) - a single throwaway file outside the repo tree, pinned to the repo's package versions when validating repo behavior. Use when a plan step, bug-fix diagnosis, or review claim rests on unverified library/runtime behavior.
Spike with a .NET file-based app
When a plan step, bug-fix diagnosis, or review claim rests on an assumption about
library or runtime behavior that hasn't been verified, don't reason from memory —
run it. File-based apps make that a single file: dotnet run spike.cs, no project,
no solution pollution. Reference:
https://learn.microsoft.com/en-us/dotnet/core/sdk/file-based-apps
OPTIONAL: lives in .agentic/optional-skills/; onboarding copies it into
.claude/skills/ for .NET repos. Requires .NET SDK 10+ — check dotnet --version.
Mechanics
- One
.csfile, top-level statements. Directives at the top of the file:#:package <Name>@<Version>— NuGet reference#:sdk Microsoft.NET.Sdk.Web— when the default SDK isn't enough#:property <Name>=<Value>— e.g.LangVersion=preview
- Run with
dotnet run spike.cs. If a spike graduates into real code:dotnet project convert spike.cs, then the normal/planflow — never grow production code inside a spike file.
Rules
- Location: the session scratchpad or OS temp dir — NEVER the repo tree. Nothing to commit, nothing to clean out of the solution.
- Version fidelity — the step agents get wrong:
- Validating THIS repo's behavior → pin
#:packageto the exact versions inDirectory.Packages.propsand target the repo's TFM. A spike that passes on latest proves nothing about the pinned version the repo actually runs. - Evaluating a NEW library for adoption → resolve latest stable (hard rule 4).
- Validating THIS repo's behavior → pin
- One question per spike. Print expected vs. actual and make the file assert its own answer; keep it small enough to read at a glance (~50 lines).
- Report real output. Paste what the run actually printed. A spike that didn't run, or was inconclusive, is not evidence — say so plainly.
Outcome routing
- Settles a decision with alternatives →
/decide, with the spike's output quoted as the evidence for why the losing options lost. - Reveals a non-obvious trap →
/gotcha. Evidence must be a REPO path (the affected file) — the spike file is ephemeral, so put the key observed output in the claim text. - Merely confirms the assumption → proceed; write nothing (the code is the doc).
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |