skills/tier2-automation/error-monitoring-setup/SKILL.md
Automated Sentry and error tracking setup for production applications
npx skillsauth add abcnuts/manus-skills error-monitoring-setupInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
4 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Automated Sentry and error tracking setup for production applications
Automate the setup of Sentry error monitoring for Next.js, React, Node.js, and Python applications. Detects project type, installs dependencies, and configures error tracking in minutes.
Time Saved: ~45 minutes per setup
Complexity: Low
Prerequisites: Node.js/Python, Sentry account
https://[email protected]/...)python3 /home/ubuntu/skills/error-monitoring-setup/scripts/setup_sentry.py /path/to/project <your-dsn>
// Throw a test error
throw new Error("Test error - Sentry is working!");
Visit your Sentry dashboard to see the error.
package.json, requirements.txt, etc.@sentry/nextjs, @sentry/react, @sentry/node, or sentry-sdkpython3 /home/ubuntu/skills/error-monitoring-setup/scripts/setup_sentry.py ~/my-nextjs-app https://[email protected]/456
# Output:
# 📁 Project: /home/ubuntu/my-nextjs-app
# 🔑 DSN: https://abc123...
# ✅ Detected project type: nextjs
# 📦 Installing Sentry package for nextjs...
# ✅ Sentry package installed
# 📝 Creating Sentry configuration...
# ✅ Created Sentry config files
# ✅ Sentry setup complete!
python3 /home/ubuntu/skills/error-monitoring-setup/scripts/setup_sentry.py ~/my-react-app https://[email protected]/456
# Output:
# 📁 Project: /home/ubuntu/my-react-app
# 🔑 DSN: https://abc123...
# ✅ Detected project type: react
# 📦 Installing Sentry package for react...
# ✅ Sentry package installed
# 📝 Creating Sentry configuration...
# ✅ Created Sentry config file
# ✅ Sentry setup complete!
python3 /home/ubuntu/skills/error-monitoring-setup/scripts/setup_sentry.py ~/my-python-app https://[email protected]/456
# Output:
# 📁 Project: /home/ubuntu/my-python-app
# 🔑 DSN: https://abc123...
# ✅ Detected project type: python
# 📦 Installing Sentry package for python...
# ✅ Sentry package installed
# 📝 Creating Sentry configuration...
# ✅ Created Sentry config file
# ✅ Sentry setup complete!
sentry.client.config.js - Client-side error trackingsentry.server.config.js - Server-side error trackingsentry.edge.config.js - Edge runtime error trackingsrc/sentry.js - Browser error trackingsentry.js - Server error trackingsentry_config.py - Application error trackingAutomatic - Sentry config files are automatically loaded.
Test:
// pages/index.js
export default function Home() {
return (
<button onClick={() => {
throw new Error("Test error");
}}>
Test Sentry
</button>
);
}
Import in src/index.js:
import './sentry';
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(<App />);
Import at the top of your main file:
const Sentry = require('./sentry');
const express = require('express');
const app = express();
// Your routes...
// Error handler (must be last)
app.use(Sentry.Handlers.errorHandler());
app.listen(3000);
Import in your main file:
from sentry_config import *
from flask import Flask
app = Flask(__name__)
# Your routes...
if __name__ == '__main__':
app.run()
Edit config files to adjust:
Sentry.init({
dsn: "your-dsn",
tracesSampleRate: 0.1, // 10% of transactions (production)
replaysSessionSampleRate: 0.1, // 10% of sessions
replaysOnErrorSampleRate: 1.0, // 100% of error sessions
});
Sentry.setUser({
id: user.id,
email: user.email,
username: user.username
});
Sentry.setTag("page", "checkout");
Sentry.setTag("feature", "payment");
Sentry.setContext("order", {
id: "123",
total: 99.99,
items: 3
});
// Throw error
throw new Error("Test error - Sentry is working!");
// Or capture manually
Sentry.captureMessage("Test message");
Sentry.captureException(new Error("Test exception"));
Check DSN:
console.log(process.env.NEXT_PUBLIC_SENTRY_DSN);
Verify Initialization:
console.log("Sentry initialized");
Sentry.captureMessage("Test");
Check Network:
Manually specify project type by editing config files.
# Next.js/React/Node.js
npm install --save @sentry/nextjs
# Python
pip install sentry-sdk
environment: process.env.NODE_ENV
release: "[email protected]"
Sentry.setUser({ id: user.id });
beforeSend(event) {
// Remove sensitive data
delete event.request?.cookies;
return event;
}
scripts/setup_sentry.py - Automated Sentry setuptemplates/sentry.client.config.js - Next.js client configreferences/monitoring_guide.md - Complete monitoring guide1. User creates Sentry account
2. User gets DSN from Sentry dashboard
3. User runs setup script with project path and DSN
4. Script detects project type
5. Script installs Sentry package
6. Script creates config files
7. User tests error tracking
8. Errors appear in Sentry dashboard
✅ Sentry package installed
✅ Config files created
✅ Error tracking working
✅ Errors appear in dashboard
✅ Stack traces visible
Manual Setup: ~45 minutes
With This Skill: ~5 minutes
Savings: ~40 minutes per setup
Created: February 10, 2026
Status: Production Ready
Tested: Next.js, React, Node.js, Python
tools
Generate comprehensive demonstrations showing how to access projects and work across different environments (Manus terminals, personal computers, team collaboration). Use when users ask "how do I access this from another terminal/computer", "how do I share this with my team", "how do I get this on my Mac", or need clarification on Manus persistence vs GitHub usage.
development
Use when you have a spec or requirements for a multi-step task, before touching code
data-ai
Use 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
development
Use when implementing any feature or bugfix, before writing implementation code