logging-observability — Claude Code skill: logging setup
Adds structured Serilog logging, request correlation, and HTTP request logs for ASP.NET Core Razor Pages. Use it when wiring observability into an app.
npx skills add wshaddix/dotnet-skills --skill logging-observability -a claude-codeWhat logging-observability does
This skill provides logging patterns for ASP.NET Core Razor Pages with Serilog. The examples cover structured output, event levels, contextual properties, bootstrap logging, and console or Seq sinks. Request records can include the user, client IP, user agent, route, and HTTP method.
A middleware example handles X-Correlation-Id: it reuses the incoming value or falls back to TraceIdentifier, places the ID in the response, and attaches it to log context. UseSerilogRequestLogging records each request and assigns higher severity to server errors and slow responses.
The target stack is .NET 8+ with nullable reference types enabled. The setup uses Serilog.AspNetCore, Serilog.Expressions, and optionally Serilog.Sinks.Seq.
What it helps with
- set up structured logs in Razor Pages
- trace a request across application logs
- record HTTP requests with Serilog
- assign levels to errors and slow responses
- send log events to Seq
Example prompts for the agent
- Set up structured Serilog logging for this ASP.NET Core Razor Pages app.
- Add middleware for
X-Correlation-Idand log every HTTP request. - Show an
appsettings.jsonsetup that writes to the console and Seq.
How to install logging-observability
1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill logging-observability -a claude-code2Manually: put the files in place
~/.claude/skills/logging-observability/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/logging-observability/
1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill logging-observability -a codex2Manually: put the files in place
.agents/skills/logging-observability/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill logging-observability -a cursor2Manually: put the files in place
.cursor/skills/logging-observability/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install wshaddix/dotnet-skills logging-observability2Manually: put the files in place
.github/skills/logging-observability/SKILL.md1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill logging-observability -a gemini-cli2Platform CLI
gemini skills install https://github.com/wshaddix/dotnet-skills --path skills/logging-observabilityManually: put the files in place
.devin/skills/logging-observability/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill logging-observability -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about logging-observability
How do I install logging-observability in Claude Code?
Run npx skills add wshaddix/dotnet-skills --skill logging-observability -a claude-code, then open ~/.claude/skills/logging-observability/SKILL.md.
What does logging-observability do?
It gives Serilog patterns for structured logs, request context, correlation IDs, and HTTP request logging in ASP.NET Core Razor Pages.
Which .NET version does logging-observability target?
Its patterns target .NET 8+ with nullable reference types enabled.