error-tracking
Skill10k starsChanged 5 months agoMITView on GitHub
Add Sentry v8 error tracking and performance monitoring to your services. Use this skill when adding error handling, creating new controllers, instrumenting cron jobs, or tracking database performance. ALL ERRORS MUST BE CAPTURED TO SENTRY - no exceptions.
- Reads credentials
2 other projects use a version of this, 2 of them edited.
Trending
Quiet since September.about the whole repository
Most recently taken up by
- serithemage/claude-code-demoedited, first seen Dec 10, 2025
- weirdgme/Claude-code-infrastructure-showcaseedited, first seen Nov 3, 2025
Who's talking about diet103/claude-code-infrastructure-showcase
- opendatahub-io/ai-helpers“[Idea] Having issues with Claude Code... Maybe it's a skill issue!”GitHub · Jan 9, 2026 · 2 reactions
- obra/superpowers“Finding new things to add to Superpowers based on other repos”GitHub · Dec 10, 2025 · 1 reactions
- vishalsachdev/claude-skills“Add Claude Code Infrastructure Showcase skill”GitHub · Nov 6, 2025 · 1 reactions
- sudosubin/agents.nix“agent-skills.github.diet103.claude-code-infrastructure-showcase: init at 0-unstable-2026-07-12”GitHub · Sep 26, 2026
- xiaolai/nlpm“Audit candidate: diet103/claude-code-infrastructure-showcase”GitHub · Apr 6, 2026
The biggest 5 of 21 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 21
Talked about on GitHub and Bluesky (21 times).
On GitHub · 20
- Jan 9, 2026[Idea] Having issues with Claude Code... Maybe it's a skill issue! — opendatahub-io/ai-helpers2 reactions · 3 comments
- Dec 10, 2025Finding new things to add to Superpowers based on other repos — obra/superpowers1 reaction · 1 comment
- Nov 6, 2025Add Claude Code Infrastructure Showcase skill — vishalsachdev/claude-skills1 reaction
- Sep 26, 2026agent-skills.github.diet103.claude-code-infrastructure-showcase: init at 0-unstable-2026-07-12 — sudosubin/agents.nix0 reactions
- Apr 6, 2026Audit candidate: diet103/claude-code-infrastructure-showcase — xiaolai/nlpm0 reactions · 2 comments
15 more on GitHub
- Feb 22, 2026Interesting agent infra/framework — thaitype/chief0 reactions
- Jan 7, 2026在 Claude Code 之上? — Pines-Cheng/blog0 reactions
- Jan 6, 2026New plugins: 5 skills from skills (safe risk) — aiskillstore/marketplace0 reactions
- Nov 9, 2025Add Claude Code infrastructure components for enhanced development wo… — kcns008/cluster-code0 reactions
- Nov 9, 2025perf: enhance skill auto-activation with hooks — mrgoonie/claudekit-cli0 reactions · 1 comment
- Nov 6, 2025Add resource: Claude Code Infrastructure Showcase — hesreallyhim/awesome-claude-code0 reactions
- Nov 6, 2025[Resource]: Claude Code Infrastructure Showcase — hesreallyhim/awesome-claude-code0 reactions · 3 comments
- Nov 6, 2025Game Changer:Skills + Hooks 实验性添加? — UfoMiao/zcf0 reactions · 2 comments
- Nov 3, 2025Add Claude agent configurations to .claude/agents folder — limbo111111/mdk-predator0 reactions · 2 comments
- Nov 3, 2025Revert "[WIP] create folder .claude and download the files in the fo… — limbo111111/mdk-predator0 reactions · 2 comments
- Nov 3, 2025[WIP] create folder .claude and download the files in the folder. from https://github.com/diet103/claude-code-infrastructure-showcase/tree/main/.claude/agents — limbo111111/mdk-predator0 reactions
- Nov 3, 2025Enhance hook-triggered orchestration with pattern-based detection — akaszubski/autonomous-dev0 reactions · 1 comment
- Nov 1, 2025Add prominent acknowledgement to original creator diet103 — weirdgme/Claude-code-infrastructure-showcase0 reactions
- Oct 31, 2025Can you make a guide for setup of opencode like this reddit post did for claude code? — anomalyco/opencode0 reactions · 4 comments
- Oct 31, 2025Check out diet103's Claude Code infra — PaulRBerg/dot-claude0 reactions
On Bluesky · 1
- Nov 12, 20251. Claude Code Infrastructure Showcase A reference library showcasing production-tested infrastructure for Claude Code, complete with skill… — @devshorts.insays it tested it0 likes and reposts · 1 reply
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 2
- serithemage/claude-code-demo★ 469% same
- weirdgme/Claude-code-infrastructure-showcase★ 468% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
ALL ERRORS MUST BE CAPTURED TO SENTRY: - No exceptions. Never use console.error alone.
- Distinctive: line 27
All workflow errors tracked
- Distinctive: line 186
Use appropriate severity levels:
- Distinctive: line 297
Create test endpoints in your services to verify Sentry integration works end-to-end.
- Distinctive: line 303
All API endpoints: must have transaction tracking
- Distinctive: line 306
Cron jobs: must track execution time
- Distinctive: line 341
When adding Sentry to new code:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Sentry Integration Skill
Purpose
This skill enforces comprehensive Sentry error tracking and performance monitoring across all services following Sentry v8 patterns.
When to Use This Skill
- Adding error handling to any code
- Creating new controllers or routes
- Instrumenting cron jobs
- Tracking database performance
- Adding performance spans
- Handling workflow errors
🚨 CRITICAL RULE
ALL ERRORS MUST BE CAPTURED TO SENTRY - No exceptions. Never use console.error alone.
Current Status
Example: API Service ✅ Complete
- Sentry v8 fully integrated
- All workflow errors tracked
- Background job processors instrumented
- Test endpoints available
Sentry Integration Patterns
1. Controller Error Handling
// ✅ CORRECT - Use BaseController
import { BaseController } from '../controllers/BaseController';
export class MyController extends BaseController {
async myMethod() {
try {
// ... your code
} catch (error) {
this.handleError(error, 'myMethod'); // Automatically sends to Sentry
}
}
}2. Route Error Handling (Without BaseController)
import * as Sentry from '@sentry/node';
router.get('/route', async (req, res) => {
try {
// ... your code
} catch (error) {
Sentry.captureException(error, {
tags: { route: '/route', method: 'GET' },
extra: { userId: req.user?.id }
});
res.status(500).json({ error: 'Internal server error' });
}
});3. Workflow Error Handling
Example of a domain-specific Sentry helper from the original production project. If you build a helper like this for your domain, the call site looks like:
import { WorkflowSentryHelper } from '../workflow/utils/sentryHelper';
WorkflowSentryHelper.captureWorkflowError(error, {
workflowCode: 'INVOICE_APPROVAL',
instanceId: 123,
stepId: 456,
userId: 'user-123',
operation: 'stepCompletion',
metadata: { additionalInfo: 'value' }
});Without a helper, plain Sentry works everywhere:
Sentry.captureException(error, {
tags: { operation: 'stepCompletion' },
extra: { workflowCode: 'INVOICE_APPROVAL', instanceId: 123, userId: 'user-123' }
});4. Cron Jobs (MANDATORY Pattern)
#!/usr/bin/env node
// FIRST LINE after shebang - CRITICAL!
import '../instrument';
import * as Sentry from '@sentry/node';
async function main() {
return await Sentry.startSpan({
name: 'cron.job-name',
op: 'cron',
attributes: {
'cron.job': 'job-name',
'cron.startTime': new Date().toISOString(),
}
}, async () => {
try {
// Your cron job logic
} catch (error) {
Sentry.captureException(error, {
tags: {
'cron.job': 'job-name',
'error.type': 'execution_error'
}
});
console.error('[Job] Error:', error);
process.exit(1);
}
});
}
main()
.then(() => {
console.log('[Job] Completed successfully');
process.exit(0);
})
.catch((error) => {
console.error('[Job] Fatal error:', error);
process.exit(1);
});5. Database Performance Monitoring
Example from the original production project - a small helper that wraps DB calls in Sentry spans. Adapt to your codebase:
import { DatabasePerformanceMonitor } from '../utils/databasePerformance';
const result = await DatabasePerformanceMonitor.withPerformanceTracking(
'findMany',
'UserProfile',
async () => {
return await PrismaService.main.userProfile.findMany({
take: 5,
});
}
);The universally-available equivalent is a direct Sentry span:
const result = await Sentry.startSpan({
name: 'db.userProfile.findMany',
op: 'db.query',
attributes: { 'db.model': 'UserProfile', 'db.operation': 'findMany' }
}, async () => {
return await prisma.userProfile.findMany({ take: 5 });
});6. Async Operations with Spans
import * as Sentry from '@sentry/node';
const result = await Sentry.startSpan({
name: 'operation.name',
op: 'operation.type',
attributes: {
'custom.attribute': 'value'
}
}, async () => {
// Your async operation
return await someAsyncOperation();
});Error Levels
Use appropriate severity levels:
- fatal: System is unusable (database down, critical service failure)
- error: Operation failed, needs immediate attention
- warning: Recoverable issues, degraded performance
- info: Informational messages, successful operations
- debug: Detailed debugging information (dev only)
Required Context
import * as Sentry from '@sentry/node';
Sentry.withScope((scope) => {
// ALWAYS include these if available
scope.setUser({ id: userId });
scope.setTag('service', 'api'); // your service name
scope.setTag('environment', process.env.NODE_ENV);
// Add operation-specific context
scope.setContext('operation', {
type: 'workflow.start',
workflowCode: 'INVOICE_APPROVAL',
entityId: 123
});
Sentry.captureException(error);
});Service Integration Examples
API Service (Example)
Location: ./api/src/instrument.ts
import * as Sentry from '@sentry/node';
import { nodeProfilingIntegration } from '@sentry/profiling-node';
Sentry.init({
dsn: process.env.SENTRY_DSN,
environment: process.env.NODE_ENV || 'development',
integrations: [
nodeProfilingIntegration(),
],
tracesSampleRate: 0.1,
profilesSampleRate: 0.1,
});Key Helpers:
- Custom Sentry helpers for domain-specific errors
DatabasePerformanceMonitor- DB query trackingBaseController- Controller error handling
Notifications Service (Example)
Location: ./notifications/src/instrument.ts
import * as Sentry from '@sentry/node';
import { nodeProfilingIntegration } from '@sentry/profiling-node';
Sentry.init({
dsn: process.env.SENTRY_DSN,
environment: process.env.NODE_ENV || 'development',
integrations: [
nodeProfilingIntegration(),
],
tracesSampleRate: 0.1,
profilesSampleRate: 0.1,
});Key Helpers:
- Service-specific Sentry helpers for domain errors
BaseController- Controller error handling
Configuration (config.ini)
[sentry]
dsn = your-sentry-dsn
environment = development
tracesSampleRate = 0.1
profilesSampleRate = 0.1
[databaseMonitoring]
enableDbTracing = true
slowQueryThreshold = 100
logDbQueries = false
dbErrorCapture = true
enableN1Detection = trueTesting Sentry Integration
Example Test Endpoints
# Test basic error capture
curl http://localhost:3000/api/sentry/test-error
# Test performance tracking
curl http://localhost:3000/api/sentry/test-performance
# Test database performance
curl http://localhost:3000/api/sentry/test-database-performanceCreate test endpoints in your services to verify Sentry integration works end-to-end.
Performance Monitoring
Requirements
- All API endpoints must have transaction tracking
- Database queries > 100ms are automatically flagged
- N+1 queries are detected and reported
- Cron jobs must track execution time
Transaction Tracking
import * as Sentry from '@sentry/node';
// Automatic transaction tracking for Express routes
app.use(Sentry.Handlers.requestHandler());
app.use(Sentry.Handlers.tracingHandler());
// Manual transaction for custom operations
const transaction = Sentry.startTransaction({
op: 'operation.type',
name: 'Operation Name',
});
try {
// Your operation
} finally {
transaction.finish();
}Common Mistakes to Avoid
❌ NEVER use console.error without Sentry ❌ NEVER swallow errors silently ❌ NEVER expose sensitive data in error context ❌ NEVER use generic error messages without context ❌ NEVER skip error handling in async operations ❌ NEVER forget to import instrument.ts as first line in cron jobs
Implementation Checklist
When adding Sentry to new code:
- Imported Sentry or appropriate helper
- All try/catch blocks capture to Sentry
- Added meaningful context to errors
- Used appropriate error level
- No sensitive data in error messages
- Added performance tracking for slow operations
- Tested error handling paths
- For cron jobs: instrument.ts imported first
Key Files (Typical Structure)
Per Service
src/instrument.ts- Sentry initialization (imported first)src/utils/sentryHelper.ts- Domain-specific error helperssrc/utils/databasePerformance.ts- DB monitoringsrc/controllers/BaseController.ts- Controller base with Sentry
Configuration
config.inior.env- Sentry DSN and settingssentry.ini- Shared Sentry config (optional)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

