Configures Claude Code hooks and Codex hooks.json/notify. Use when adding PreToolUse guards, Stop hooks, managed hooks, format-on-save, preflight, audits, or worktree/budget hooks.
日本語の概要は準備中です。原文の説明を表示しています。
Applies C# and .NET backend standards to ASP.NET Core APIs, EF Core, Dapper, and workers. Use when shaping API boundaries, data access, resilience, or observability.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
| Decision | Default | Notes |
|---|---|---|
| Runtime | Current .NET LTS and its C# version | Look up the current LTS and its end date on the dotnet support policy page before naming a version. Treat any target within a year of end of support as a tracked migration, not a steady state. Choose the current LTS by default; choose a newer STS only if the team upgrades every year |
| API style | Minimal API for new endpoints | Controllers for large CQRS surface with many filters/action results |
| Persistence (SQL, write-heavy) | EF Core | Use Dapper when query shapes are complex and hand-tuned SQL wins |
| Persistence (SQL, query-heavy) | Dapper | Pair with EF Core for write path if aggregates exist |
| Persistence (document) | MongoDB driver | Use when schema variability is genuine, not habitual |
| Background worker | IHostedService / BackgroundService | Add lease, graceful shutdown, and poison-message handling from day one |
| Resilience | Microsoft.Extensions.Resilience (Polly v8) | AddStandardResilienceHandler() runs five strategies, outermost first: rate limiter → total timeout → retry → circuit breaker → attempt timeout. It retries all HTTP methods by default. Override the defaults for unsafe methods and for tight deadlines. Retry at one layer only: a handler added to a client that ConfigureHttpClientDefaults (for example, service defaults) already wraps, or an app-level retry around a retrying client or EF execution strategy, multiplies attempts. See references/resilience-policy-defaults.md |
| OpenAPI | Built-in ASP.NET Core OpenAPI (Microsoft.AspNetCore.OpenApi) | Do not add Swashbuckle unless repo already uses it |
Route other tasks:
$qa-testing-nunitnuke/Build.cs, CI target sequencing, or artifact publication → $ops-nuke-cicdILogger or Serilog rewrite automation → $dev-structured-logssoftware-backend routes .NET work here)dev-structured-logsreferences/version-compatibility-notes.md.
Load references/scenario-guides.md and, for HTTP services, references/aspnet-core-api-patterns.md.references/csharp-language-practices.md and references/dotnet-coding-standards.md.references/backend-architecture-principles.md and references/modular-architecture-principles.md.references/data-access-patterns.md; if EF Core is selected, load references/efcore-persistence-patterns.md.references/reliability-and-resilience.md and references/resilience-policy-defaults.md.references/testing-practices.md; for a new NUnit component-test fixture, start from assets/test-fixture-template-nunit.cs.references/observability-standards.md, and for API/runtime deployment defaults load references/runtime-ops-checklist.md. If the service is distributed or cloud-native by design, also load references/scenario-guides.md for the Aspire-oriented profile.references/security-baseline.md.$ops-nuke-cicd for pipeline-target edits.references/code-review-checklist.md.Cancellation and deadline contract.
Accept CancellationToken at every cancellable request and worker boundary and propagate it through database, HTTP, queue, and delay calls. Derive child timeouts from the remaining parent deadline when one exists; for queue and scheduled work, define an operation deadline and combine it with host-shutdown cancellation. Document dependencies that cannot honor cancellation. Do not convert client disconnects or deadline expiry into generic 500s. In tests, cancel during an external call and verify work stops without committing a partial mutation or leaking a background task.
Rule: rules/dotnet/csharp.md loads this invariant when Claude edits a matching file.
| Do | Avoid |
|---|---|
| Keep application services small and explicit about dependencies | Coupling domain logic directly to HTTP, DB driver types, or framework-specific classes |
| Return deterministic domain/application results for expected failures | Swallowing exceptions or replacing root causes with vague error messages |
Pass CancellationToken through every async layer and external call | Letting cancellation stop at the controller while downstream calls continue |
Model options with IOptions<T> validation; fail fast on invalid startup config | Binding configuration directly into services without options validation |
| Choose API style intentionally; keep middleware ordering explicit | Mixing minimal APIs, controllers, and bespoke endpoint frameworks without a clear error-shape policy |
| Use built-in ASP.NET Core OpenAPI and ProblemDetails before adding third-party wrappers | Adding Swashbuckle or MediatR when built-in plumbing is sufficient |
| Keep persistence choices aligned to use-case shape, not team habit | Using retries without timeout and idempotency guarantees |
| Make telemetry and security checks part of definition of done | Shipping endpoints without structured logs, traces, metrics, and health signals |
| Write tests at unit and integration seams separately | Mixing unit and integration concerns in the same test fixture |
| — | Using async void outside event handlers |
| — | Sharing one DbContext instance across concurrent operations/threads |
| — | Captive dependencies (singleton depending on scoped service) |
Includes in one query multiply rows (cartesian explosion); see references/efcore-persistence-patterns.md.HttpClient/handler per request can exhaust ports. Default to short-lived factory clients; a long-lived client with SocketsHttpHandler.PooledConnectionLifetime configured for expected DNS changes is also valid. For cookie-dependent sessions, check handler pooling and cookie isolation before using the factory (Microsoft lifetime guidance).DOTNET_GCHeapHardLimit, or Workstation GC. On net9+, DATAS is already on by default. For dedicated, throughput-bound pods, measure first and disable DATAS only if the data supports it; check the DATAS docs page for the target framework's current behavior.clean architecture layers that are mostly pass-through wrappers with no boundary or policy value.dev-structured-logs → Structured logging migrationKnown bugs, regressions, framework/compiler/runtime footguns, and version-specific crash or workaround guidance must be verified against current primary web sources before being treated as current fact. Start from data/sources.json, and prefer official Microsoft docs over blogs for versions and support windows.
When prior decisions or pitfalls are relevant, consult learnings.consolidated.md if present; use learnings.md only for needed history or as the available fallback. Otherwise skip both.
After applying it, if you encountered a pattern worth remembering, a mistake worth preventing, or a domain fact that surprised you, append one dated bullet to learnings.md via agents-skills-feedback-loop/scripts/append_learning.py. Do not modify SKILL.md itself.
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Configures Claude Code hooks and Codex hooks.json/notify. Use when adding PreToolUse guards, Stop hooks, managed hooks, format-on-save, preflight, audits, or worktree/budget hooks.
日本語の概要は準備中です。原文の説明を表示しています。
Configures and hardens Claude Code and Codex MCP servers. Use when connecting databases, APIs, SaaS, building servers, or serving a clearance-filtered knowledge base.
日本語の概要は準備中です。原文の説明を表示しています。
Owns instruction files: AGENTS.md, CLAUDE.md, personal and repo rules. Use when writing, pruning, auditing them, sharing rules across Claude and Codex, or fixing ignored rules.
日本語の概要は準備中です。原文の説明を表示しています。
Creates and audits agent skills: SKILL.md, references, scripts, runtime metadata. Use when writing, validating, or security-reviewing a skill, or fixing truncated skill listings.
日本語の概要は準備中です。原文の説明を表示しています。
Adds per-skill learnings loops for dated patterns, mistakes, and domain facts. Use when wiring skill memory, consolidation, or drift audits.
日本語の概要は準備中です。原文の説明を表示しています。
Chooses subagent, team, workflow, or debate and launches it on Claude Code or Codex. Use when delegating, running agent review boards, or installing shared agents.
日本語の概要は準備中です。原文の説明を表示しています。