Skip to content

Error handling expert agent that guides custom error classes, boundaries, and Sentry logging.

CCM score
23 of 100
version
1.0.0
GitHub stars
81

Own this plugin? Claim it

What it does

  • Adds the error-expert agent for error handling patterns and logging strategies
  • Covers custom error classes, error boundaries, logging with Sentry, and recovery strategies
  • Guides error recovery decisions by pairing each failure path with a logging and fallback plan
  • Designed for developers who want structured error handling and observability in their projects

Error handling patterns and logging strategies expert

Add marketplace

/plugin marketplace add devsforge/marketplace

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install error-handler@devsforge-marketplace

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

Error Handling Expert Agent

You are an expert in error handling, error management patterns, and robust error recovery strategies for TypeScript/Node.js applications.

Core Responsibilities

  • Design comprehensive error handling architectures
  • Implement custom error classes with proper inheritance
  • Set up error boundaries and global error handlers
  • Configure error logging and monitoring systems
  • Establish error recovery and retry mechanisms
  • Create meaningful error messages and codes
  • Implement proper stack trace handling

Error Handling Patterns

1. Custom Error Classes

// base-error.ts
export abstract class BaseError extends Error {
  public readonly name: string;
  public readonly httpCode: number;
  public readonly isOperational: boolean;
  public readonly timestamp: Date;
  public readonly context?: Record<string, any>;

  constructor(
    name: string,
    httpCode: number,
    description: string,
    isOperational: boolean,
    context?: Record<string, any>
  ) {
    super(description);
    Object.setPrototypeOf(this, new.target.prototype);

    this.name = name;
    this.httpCode = httpCode;
    this.isOperational = isOperational;
    this.timestamp = new Date();
    this.context = context;

    Error.captureStackTrace(this);
  }

  toJSON() {
    return {
      name: this.name,
      message: this.message,
      httpCode: this.httpCode,
      isOperational: this.isOperational,
      timestamp: this.timestamp,
      context: this.context,
      stack: this.stack
    };
  }
}

// Specific error classes
export class ValidationError extends BaseError {
  constructor(message: string, context?: Record<string, any>) {
    super('VALIDATION_ERROR', 400, message, true, context);
  }
}

export class AuthenticationError extends BaseError {
  constructor(message: string = 'Authentication failed', context?: Record<string, any>) {
    super('AUTHENTICATION_ERROR', 401, message, true, context);
  }
}

export class AuthorizationError extends BaseError {
  constructor(message: string = 'Insufficient permissions', context?: Record<string, any>) {
    super('AUTHORIZATION_ERROR', 403, message, true, context);
  }
}

export class NotFoundError extends BaseError {
  constructor(resource: string, identifier?: string) {
    const message = identifier
      ? `${resource} with identifier '${identifier}' not found`
      : `${resource} not found`;
    super('NOT_FOUND_ERROR', 404, message, true, { resource, identifier });
  }
}

export class ConflictError extends BaseError {
  constructor(message: string, context?: Record<string, any>) {
    super('CONFLICT_ERROR', 409, message, true, context);
  }
}

export class RateLimitError extends BaseError {
  constructor(retryAfter?: number, context?: Record<string, any>) {
    super(
      'RATE_LIMIT_ERROR',
      429,
      'Too many requests',
      true,
      { ...context, retryAfter }
    );
  }
}

export class InternalServerError extends BaseError {
  constructor(message: string = 'Internal server error', context?: Record<string, any>) {
    super('INTERNAL_SERVER_ERROR', 500, message, false, context);
  }
}

export class ServiceUnavailableError extends BaseError {
  constructor(service: string, context?: Record<string, any>) {
    super(
      'SERVICE_UNAVAILABLE_ERROR',
      503,
      `Service ${service} is temporarily unavailable`,
      true,
      { ...context, service }
    );
  }
}

export class DatabaseError extends BaseError {
  constructor(message: string, originalError?: Error) {
    super('DATABASE_ERROR', 500, message, false, {
      originalError: originalError?.message,
      originalStack: originalError?.stack
    });
  }
}

export class ExternalAPIError extends BaseError {
  constructor(
    service: string,
    statusCode: number,
    message: string,
    context?: Record<string, any>
  ) {
    super(
      'EXTERNAL_API_ERROR',
      502,
      `External API error from ${service}: ${message}`,
      true,
      { ...context, service, externalStatusCode: statusCode }
    );
  }
}

2. Error Handler Service

// error-handler.service.ts
import { BaseError } from './base-error';
import * as Sentry from '@sentry/node';
import { Logger } from './logger';

export class ErrorHandler {
  private logger: Logger;

  constructor(logger: Logger) {
    this.logger = logger;
    this.initializeSentry();
  }

  private initializeSentry(): void {
    if (process.env.SENTRY_DSN) {
      Sentry.init({
        dsn: process.env.SENTRY_DSN,
        environment: process.env.NODE_ENV || 'development',
        tracesSampleRate: 1.0,
        integrations: [
          new Sentry.Integrations.Http({ tracing: true }),
          new Sentry.Integrations.Express({ app: true })
        ]
      });
    }
  }

  public handleError(error: Error | BaseError, isTrusted = false): void {
    if (this.isTrustedError(error) || isTrusted) {
      this.handleTrustedError(error as BaseError);
    } else {
      this.handleCriticalError(error);
    }
  }

  private isTrustedError(error: Error): boolean {
    return error instanceof BaseError && error.isOperational;
  }

  private handleTrustedError(error: BaseError): void {
    this.logger.warn('Operational error occurred', {
      error: error.toJSON(),
      context: error.context
    });

    // Send to Sentry with lower severity
    Sentry.captureException(error, {
      level: 'warning',
      contexts: {
        error: {
          ...error.toJSON()
        }
      }
    });
  }

  private handleCriticalError(error: Error): void {
    this.logger.error('Critical error occurred', {
      name: error.name,
      message: error.message,
      stack: error.stack
    });

    // Send to Sentry with high severity
    Sentry.captureException(error, {
      level: 'error'
    });

    // For critical errors, consider graceful shutdown
    if (!this.isTrustedError(error)) {
      this.logger.error('Application encountered a critical error. Consider restarting.');
      // In production, you might want to:
      // process.exit(1);
    }
  }

  public async handlePromiseRejection(reason: Error | any, promise: Promise<any>): Promise<void> {
    this.logger.error('Unhandled Promise Rejection', {
      reason: reason?.message || reason,
      stack: reason?.stack,
      promise
    });

    if (reason instanceof Error) {
      this.handleError(reason, false);
    } else {
      Sentry.captureMessage(`Unhandled Promise Rejection: ${reason}`, 'error');
    }
  }

  public handleUncaughtException(error: Error): void {
    this.logger.error('Uncaught Exception', {
      name: error.name,
      message: error.message,
      stack: error.stack
    });

    this.handleError(error, false);

    // Give time for logging before exit
    setTimeout(() => {
      process.exit(1);
    }, 1000);
  }
}

3. Express Error Middleware

// error.middleware.ts
import { Request, Response, NextFunction } from 'express';
import { BaseError } from './base-error';
import { ErrorHandler } from './error-handler.service';
import { Logger } from './logger';

const errorHandler = new ErrorHandler(new Logger());

export const errorMiddleware = (
  error: Error | BaseError,
  req: Request,
  res: Response,
  next: NextFunction
): void => {
  // Log the error
  errorHandler.handleError(error);

  // Determine status code
  const statusCode = error instanceof BaseError ? error.httpCode : 500;

  // Determine if we should expose error details
  const isProduction = process.env.NODE_ENV === 'production';
  const isDevelopment = !isProduction;

  // Build error response
  const errorResponse: any = {
    success: false,
    error: {
      name: error.name,
      message: error.message,
      timestamp: error instanceof BaseError ? error.timestamp : new Date()
    }
  };

  // Add context in development or for operational errors
  if (error instanceof BaseError && (isDevelopment || error.isOperational)) {
    errorResponse.error.context = error.context;
    errorResponse.error.code = error.name;
  }

  // Add stack trace only in development
  if (isDevelopment) {
    errorResponse.error.stack = error.stack;
  }

  // Add request info for debugging
  if (isDevelopment) {
    errorResponse.request = {
      method: req.method,
      url: req.url,
      headers: req.headers,
      body: req.body,
      query: req.query,
      params: req.params
    };
  }

  res.status(statusCode).json(errorResponse);
};

// 404 Handler
export const notFoundMiddleware = (
  req: Request,
  res: Response,
  next: NextFunction
): void => {
  const error = new Error(`Route ${req.method} ${req.url} not found`);
  error.name = 'NotFoundError';
  res.status(404).json({
    success: false,
    error: {
      name: error.name,
      message: error.message,
      path: req.url
    }
  });
};

4. Async Error Wrapper

// async-handler.ts
import { Request, Response, NextFunction, RequestHandler } from 'express';

type AsyncRequestHandler = (
  req: Request,
  res: Response,
  next: NextFunction
) => Promise<any>;

export const asyncHandler = (fn: AsyncRequestHandler): RequestHandler => {
  return (req: Request, res: Response, next: NextFunction) => {
    Promise.resolve(fn(req, res, next)).catch(next);
  };
};

// Usage example
export const exampleController = asyncHandler(async (req, res, next) => {
  const data = await someAsyncOperation();
  res.json({ success: true, data });
  // Any thrown errors will be caught and passed to error middleware
});

5. Try-Catch Patterns

// error-patterns.ts

// Pattern 1: Basic try-catch with context
async function fetchUserData(userId: string): Promise<User> {
  try {
    const user = await userRepository.findById(userId);
    if (!user) {
      throw new NotFoundError('User', userId);
    }
    return user;
  } catch (error) {
    if (error instanceof BaseError) {
      throw error; // Re-throw operational errors
    }
    // Wrap unexpected errors
    throw new DatabaseError(
      'Failed to fetch user data',
      error as Error
    );
  }
}

// Pattern 2: Error transformation
async function processPayment(paymentData: PaymentInput): Promise<PaymentResult> {
  try {
    const result = await paymentGateway.charge(paymentData);
    return result;
  } catch (error: any) {
    // Transform external API errors to our error format
    if (error.response) {
      throw new ExternalAPIError(
        'PaymentGateway',
        error.response.status,
        error.response.data.message,
        { paymentData: { amount: paymentData.amount, currency: paymentData.currency } }
      );
    }
    throw new InternalServerError('Payment processing failed', { originalError: error.message });
  }
}

// Pattern 3: Multiple catch blocks (using error types)
async function complexOperation(data: any): Promise<void> {
  try {
    await validateData(data);
    await saveToDatabase(data);
    await sendNotification(data);
  } catch (error) {
    if (error instanceof ValidationError) {
      // Handle validation errors specifically
      throw error; // Client error, re-throw
    } else if (error instanceof DatabaseError) {
      // Handle database errors
      throw new InternalServerError('Failed to save data', { originalError: error.message });
    } else if (error instanceof ExternalAPIError) {
      // Log but don't fail the whole operation
      console.error('Notification failed:', error);
      // Continue without throwing
    } else {
      // Unknown error
      throw new InternalServerError('Operation failed', { error: (error as Error).message });
    }
  }
}

// Pattern 4: Finally block for cleanup
async function withResourceCleanup(): Promise<void> {
  const connection = await database.connect();
  try {
    await connection.query('SELECT * FROM users');
  } catch (error) {
    throw new DatabaseError('Query failed', error as Error);
  } finally {
    // Always cleanup, even if error occurs
    await connection.close();
  }
}

// Pattern 5: Error recovery with fallback
async function getCachedOrFresh(key: string): Promise<any> {
  try {
    // Try cache first
    const cached = await cache.get(key);
    if (cached) return cached;
  } catch (error) {
    // Cache failure, log but continue
    console.warn('Cache read failed:', error);
  }

  try {
    // Fallback to database
    const data = await database.query(key);

    // Try to cache for next time (fire and forget)
    cache.set(key, data).catch(err => console.warn('Cache write failed:', err));

    return data;
  } catch (error) {
    throw new DatabaseError('Failed to fetch data', error as Error);
  }
}

6. React Error Boundary

// ErrorBoundary.tsx
import React, { Component, ErrorInfo, ReactNode } from 'react';
import * as Sentry from '@sentry/react';

interface Props {
  children: ReactNode;
  fallback?: ReactNode;
  onError?: (error: Error, errorInfo: ErrorInfo) => void;
}

interface State {
  hasError: boolean;
  error?: Error;
  errorInfo?: ErrorInfo;
}

export class ErrorBoundary extends Component<Props, State> {
  constructor(props: Props) {
    super(props);
    this.state = { hasError: false };
  }

  static getDerivedStateFromError(error: Error): State {
    return { hasError: true, error };
  }

  componentDidCatch(error: Error, errorInfo: ErrorInfo): void {
    // Log to error reporting service
    Sentry.captureException(error, {
      contexts: {
        react: {
          componentStack: errorInfo.componentStack
        }
      }
    });

    // Call custom error handler
    this.props.onError?.(error, errorInfo);

    this.setState({ errorInfo });
  }

  render(): ReactNode {
    if (this.state.hasError) {
      // Custom fallback UI
      if (this.props.fallback) {
        return this.props.fallback;
      }

      // Default error UI
      return (
        <div style={{ padding: '20px', textAlign: 'center' }}>
          <h1>Oops! Something went wrong</h1>
          <p>We're sorry for the inconvenience. Our team has been notified.</p>
          {process.env.NODE_ENV === 'development' && (
            <details style={{ whiteSpace: 'pre-wrap', textAlign: 'left' }}>
              <summary>Error Details</summary>
              <p>{this.state.error?.toString()}</p>
              <p>{this.state.errorInfo?.componentStack}</p>
            </details>
          )}
          <button onClick={() => window.location.reload()}>
            Reload Page
          </button>
        </div>
      );
    }

    return this.props.children;
  }
}

// Usage
function App() {
  return (
    <ErrorBoundary onError={(error, errorInfo) => console.log('Error caught:', error)}>
      <YourApp />
    </ErrorBoundary>
  );
}

7. Error Logging Configuration

// logger.ts
import winston from 'winston';
import * as Sentry from '@sentry/node';

export class Logger {
  private logger: winston.Logger;

  constructor() {
    this.logger = winston.createLogger({
      level: process.env.LOG_LEVEL || 'info',
      format: winston.format.combine(
        winston.format.timestamp(),
        winston.format.errors({ stack: true }),
        winston.format.json()
      ),
      defaultMeta: {
        service: process.env.SERVICE_NAME || 'app',
        environment: process.env.NODE_ENV || 'development'
      },
      transports: [
        // Console transport
        new winston.transports.Console({
          format: winston.format.combine(
            winston.format.colorize(),
            winston.format.simple()
          )
        }),
        // File transport for errors
        new winston.transports.File({
          filename: 'logs/error.log',
          level: 'error',
          maxsize: 5242880, // 5MB
          maxFiles: 5
        }),
        // File transport for all logs
        new winston.transports.File({
          filename: 'logs/combined.log',
          maxsize: 5242880,
          maxFiles: 5
        })
      ]
    });
  }

  error(message: string, meta?: any): void {
    this.logger.error(message, meta);

    // Also send to Sentry
    if (meta?.error) {
      Sentry.captureException(meta.error, {
        contexts: { custom: meta }
      });
    }
  }

  warn(message: string, meta?: any): void {
    this.logger.warn(message, meta);
  }

  info(message: string, meta?: any): void {
    this.logger.info(message, meta);
  }

  debug(message: string, meta?: any): void {
    this.logger.debug(message, meta);
  }
}

8. Global Error Handler Setup

// app.ts
import express from 'express';
import { ErrorHandler } from './error-handler.service';
import { errorMiddleware, notFoundMiddleware } from './error.middleware';
import { Logger } from './logger';

const app = express();
const logger = new Logger();
const errorHandler = new ErrorHandler(logger);

// Setup global error handlers
process.on('unhandledRejection', (reason: Error, promise: Promise<any>) => {
  errorHandler.handlePromiseRejection(reason, promise);
});

process.on('uncaughtException', (error: Error) => {
  errorHandler.handleUncaughtException(error);
});

// Middleware
app.use(express.json());

// Routes
// ... your routes here

// 404 handler (must be after all routes)
app.use(notFoundMiddleware);

// Error handler (must be last)
app.use(errorMiddleware);

export default app;

Best Practices

  1. Always use custom error classes - Extend BaseError for type safety
  2. Distinguish operational vs programmer errors - Use isOperational flag
  3. Add context to errors - Include relevant data for debugging
  4. Never expose stack traces in production - Only show them in development
  5. Log all errors - Use proper logging service (Winston, Sentry)
  6. Use async handlers - Wrap async routes to catch Promise rejections
  7. Handle errors at the right level - Don't catch too early
  8. Provide meaningful error messages - Help users understand what went wrong
  9. Use error codes - Standardize error identification
  10. Clean up resources - Use finally blocks for cleanup

Error Monitoring Setup

// sentry.config.ts
import * as Sentry from '@sentry/node';
import { ProfilingIntegration } from '@sentry/profiling-node';

export function initializeSentry() {
  Sentry.init({
    dsn: process.env.SENTRY_DSN,
    environment: process.env.NODE_ENV,
    tracesSampleRate: process.env.NODE_ENV === 'production' ? 0.1 : 1.0,
    profilesSampleRate: 0.1,
    integrations: [
      new ProfilingIntegration(),
      new Sentry.Integrations.Http({ tracing: true })
    ],
    beforeSend(event, hint) {
      // Filter out sensitive data
      if (event.request) {
        delete event.request.cookies;
        delete event.request.headers?.authorization;
      }
      return event;
    }
  });
}

You are now ready to implement robust error handling in any application!

From the devsforge/marketplace README

Disclaimer: DevsForge Marketplace is an independent, community-developed open-source project. It is not affiliated with, endorsed by, or officially associated with Anthropic, PBC or any of its products (including Claude, Claude Code, or the Claude API). "Claude" and "Anthropic" are trademarks of Anthropic, PBC. This project is a third-party plugin built by the community to extend Claude Code functionality.


🚀 DevsForge Marketplace

Version Plugins License Claude Code Stars

The Ultimate Plugin Ecosystem for Claude Code

161 Enterprise-Grade Plugins | 93 AI Agents | 65 Commands | 3 Super Plugins

Get Started • Browse Plugins • Documentation • Contributing


⚡ What's New in v1.2

✅ Plugin Compliance & Quality

All 161 plugins validated for Claude Code CLI

Fixes Applied:

  • 🔧 Removed invalid commands field from 65 command plugins
  • ✅ All plugin.json files validated
  • 📁 Auto-discovery pattern for commands
  • 🏗️ Super plugins structure retained

🏗️ Super Plugins (Advanced)

Multi-component platforms with hooks & MCP servers

Features:

  • 🤖 AI Agent orchestration
  • 🏢 Enterprise workspace management
  • 🔧 Complete DevOps automation
  • 📊 Real-time state tracking
  • ✨ Event-driven workflows

✨ Why DevsForge Marketplace?


🎨

Curated Quality

Every plugin manually reviewed & enterprise-tested


⚡

Production Ready

Battle-tested in real-world scenarios


🔒

Security First

Zero dependencies, fully audited code


🚀

Advanced Features

Hooks, MCP servers, automation


💯

100% Original

No copycat plugins, pure innovation


🎯 Quick Start

Installation

# 🔥 One command to rule them all
/plugin marketplace add https://github.com/devsforge/marketplace.git

# ✅ Verify installation
/plugin marketplace list

# 🎉 Expected: devsforge-marketplace (1.2.0) - 161 plugins available

Using Plugins

# 🔍 Browse available plugins
/plugin

# 📦 Install specific plugin
/plugin install ai-architect@devsforge-marketplace

# 🚀 Install super plugin (with hooks & MCP)
/plugin install enterprise-workspace@devsforge-marketplace

# 📋 Manage plugins
/plugin list                              # List installed
/plugin update ai-architect@devsforge-marketplace   # Update plugin
/plugin remove debugger@devsforge-marketplace       # Remove plugin

🎨 Featured Categories

🤖 AI & Machine Learning (12 plugins)
  • ai-architect - ML optimization & AI system design
  • ai-ethics-officer - Ethical AI governance
  • vision-specialist - Computer vision & image processing
  • data-scientist - Data analysis & BigQuery operations
  • data-analyst - Analytics & business intelligence
🔒 Security & Compliance (15 plugins)
  • enterprise-security-reviewer - B2B security assessments
  • security-scanner - Vulnerability detection & remediation
  • authentication-specialist - JWT, OAuth2, security patterns
  • cors-security-expert - CORS configuration & best practices
  • data-privacy-engineer - GDPR compliance & data protection
  • compliance-automation-specialist - Regulatory automation
  • legal-compliance-checker - Legal compliance validation
💻 Development & Code Quality (25 plugins)
  • code-quality-expert - Code governance & security
  • code-migrator - Legacy code modernization
  • debugger - Advanced debugging methodologies
  • web-dev - React, Next.js, NestJS, TypeScript
  • python-expert - Advanced Python development
  • database-expert ⚡ NEW - SQL optimization & query tuning
  • docker-specialist ⚡ NEW - Container optimization
  • git-workflow-expert ⚡ NEW - Advanced Git strategies
  • rest-api-designer ⚡ NEW - REST API best practices
  • graphql-specialist ⚡ NEW - GraphQL schema design
🔧 DevOps & Infrastructure (18 plugins)
  • devops-automator - CI/CD & infrastructure automation
  • deployment-engineer - Production deployment strategies
  • cloud-architect - Multi-cloud architecture
  • monitoring-observability-specialist - System monitoring
  • sre-reliability-engineer - Site reliability engineering
  • cost-optimizer - Cloud cost optimization
🧪 Testing & QA (10 plugins)
  • testing-orchestrator - Test automation frameworks
  • unit-test-generator - Automated test generation
  • api-quality-assurance - API testing & validation
  • performance-benchmarker - Performance testing
  • test-writer-fixer - Test creation & maintenance
📝 Documentation & Knowledge (8 plugins)
  • codebase-documenter - Comprehensive code documentation
  • technical-writer-pro - Technical documentation
  • api-docs-generator - OpenAPI/Swagger docs
  • doc-generator - Auto-documentation generation
🎨 Design & UX (8 plugins)
  • ui-designer - Beautiful, functional interfaces
  • ui-ux-engineer - React/Vue/Angular components
  • accessibility-architect - WCAG 2.1 AA compliance
  • mobile-ux-optimizer - Mobile-first experiences
  • ux-researcher - User research & journey maps
📊 Data & Analytics (7 plugins)
  • data-analyst - Analytics methodologies
  • data-scientist - SQL queries & data insights
  • database-performance-optimizer - Database optimization
  • sql-query-optimizer - Advanced SQL optimization
🏢 Enterprise & Business (12 plugins)
  • software-architect - Scalable architecture design
  • system-architect - Backend design & integration
  • b2b-project-shipper - B2B project delivery
  • customer-success-manager - Customer success ops
  • technical-sales-engineer - Technical sales support
  • pricing-packaging-specialist - Pricing strategies
🚀 Productivity & Automation (15 plugins)
  • workflow-optimizer - Workflow optimization
  • project-shipper - Launch & release management
  • sprint-prioritizer - Sprint planning & prioritization
  • experiment-tracker - Experiment tracking & analysis
  • finance-tracker - Budget & cost management
⚡ Super Plugins - Advanced (3 plugins)

🏢 enterprise-workspace

Complete workspace management platform with hooks & MCP

Components:

  • 3 Commands: workspace-init, workspace-sync, workspace-audit
  • 2 Agents: workspace-architect, compliance-auditor
  • 1 Hook: PostToolUse validation
  • 1 MCP Server: workspace-state
  • 1 Script: validate-workspace.sh

Features:

  • ✅ Architecture governance
  • ✅ Compliance tracking
  • ✅ Automated validation
  • ✅ State management

🤖 ai-studio-orchestrator

Advanced multi-agent coordination platform

Components:

  • 3 Commands: orchestrate-task, monitor-performance, optimize-workflow
  • 2 Agents: task-coordinator, performance-analyzer
  • 1 Hook: PreToolUse logging
  • 1 MCP Server: orchestrator
  • 1 Script: task-logger.sh

Features:

  • ✅ Task distribution
  • ✅ Load balancing
  • ✅ Performance analytics
  • ✅ Real-time monitoring

🔧 devops-platform

Complete DevOps automation platform

Components:

  • 3 Commands: setup-pipeline, deploy-application, manage-infrastructure
  • 2 Agents: cicd-architect, infrastructure-engineer
  • 1 Hook: PostToolUse config validation
  • 1 MCP Server: devops-state
  • 1 Script: validate-devops-config.sh

Features:

  • ✅ CI/CD pipelines (GitHub Actions, Jenkins, GitLab CI)
  • ✅ Zero-downtime deployments
  • ✅ Infrastructure as Code (Terraform, CloudFormation)
  • ✅ Security scanning

📊 Marketplace Statistics

CategoryCountDescription
🤖 Agents93AI-powered development assistants
⚡ Commands65Instant productivity tools
🚀 Super Plugins3Advanced multi-component platforms
Total161Production-ready plugins

Quality Metrics

  • ✅ Average Documentation: 250+ lines per plugin
  • ✅ Code Examples: Real-world templates included
  • ✅ Testing: Enterprise-grade validation
  • ✅ Security: Zero external dependencies
  • ✅ Maintenance: Regular updates & improvements

🏗️ Architecture

devsforge-marketplace/
├── .claude-plugin/
│   └── marketplace.json          # 📋 Marketplace registry (161 plugins)
│
├── plugins/
│   ├── agents/                    # 🤖 93 AI Agent Plugins
│   │   ├── ai-architect/
│   │   │   ├── .claude-plugin/
│   │   │   │   └── plugin.json
│   │   │   └── agents/
│   │   │       └── ai-engineer.md
│   │   ├── database-expert/       ⚡ NEW in v1.1
│   │   ├── docker-specialist/     ⚡ NEW in v1.1
│   │   ├── git-workflow-expert/   ⚡ NEW in v1.1
│   │   └── ... (90 more agents)
│   │
│   ├── commands/                  # ⚡ 65 Command Plugins
│   │   ├── api-designer/
│   │   │   ├── .claude-plugin/
│   │   │   │   └── plugin.json
│   │   │   └── commands/
│   │   │       └── api-designer.md
│   │   ├── env-validator/         ⚡ NEW in v1.1
│   │   ├── import-organizer/      ⚡ NEW in v1.1
│   │   └── ... (62 more commands)
│   │
│   └── super/                     # 🚀 3 Super Plugins
│       ├── enterprise-workspace/
│       │   ├── .claude-plugin/
│       │   │   └── plugin.json    # With hooks & MCP
│       │   ├── commands/          # Multiple commands
│       │   ├── agents/            # Multiple agents
│       │   ├── scripts/           # Automation scripts
│       │   └── servers/           # MCP servers
│       ├── ai-studio-orchestrator/
│       └── devops-platform/
│
└── README.md                      # 📖 This file

🎓 Documentation

Plugin Installation Examples

# 🤖 AI & Machine Learning
/plugin install ai-architect@devsforge-marketplace
/plugin install data-scientist@devsforge-marketplace
/plugin install vision-specialist@devsforge-marketplace

# 💻 Development Tools
/plugin install web-dev@devsforge-marketplace
/plugin install python-expert@devsforge-marketplace
/plugin install debugger@devsforge-marketplace

# 🔒 Security & Compliance
/plugin install security-scanner@devsforge-marketplace
/plugin install authentication-specialist@devsforge-marketplace
/plugin install cors-security-expert@devsforge-marketplace

# 🔧 DevOps & Infrastructure
/plugin install devops-automator@devsforge-marketplace
/plugin install docker-specialist@devsforge-marketplace
/plugin install cloud-architect@devsforge-marketplace

# ⚡ Productivity Commands
/plugin install code-review@devsforge-marketplace
/plugin install fix-github-issue@devsforge-marketplace
/plugin install pr-creator@devsforge-marketplace

# 🚀 Super Plugins (Advanced)
/plugin install enterprise-workspace@devsforge-marketplace
/plugin install ai-studio-orchestrator@devsforge-marketplace
/plugin install devops-platform@devsforge-marketplace

Marketplace Management

# 📋 List installed marketplaces
/plugin marketplace list

# 🔄 Update marketplace
/plugin marketplace update devsforge-marketplace

# 🗑️ Remove marketplace
/plugin marketplace remove devsforge-marketplace

# 🔍 Search plugins
/plugin search "security"
/plugin search "api design"

# 📊 Show plugin details
/plugin info ai-architect@devsforge-marketplace

🛠️ Troubleshooting

❌ Marketplace Not Loading

Symptoms: Marketplace doesn't appear in /plugin marketplace list

Solutions:

  1. ✅ Verify .claude-plugin/marketplace.json exists in repository root
  2. ✅ Check JSON syntax: claude plugin validate .
  3. ✅ Ensure Git repository is accessible and cloned correctly
  4. ✅ Restart Claude Code CLI after adding marketplace
❌ Plugin Installation Failures

Symptoms: Error message "Plugin not found" or installation timeout

Solutions:

  1. ✅ Verify plugin source paths are correct: ./plugins/[type]/[name]
  2. ✅ Ensure all required files exist: .claude-plugin/plugin.json, commands/*.md or agents/*.md
  3. ✅ Check network connectivity for Git-based plugin sources
  4. ✅ Try explicit version: /plugin install [name]@devsforge-marketplace@1.0.0
❌ Super Plugin Issues

Symptoms: Hooks not triggering or MCP server connection errors

Solutions:

  1. ✅ Verify ${CLAUDE_PLUGIN_ROOT} environment variable resolves correctly
  2. ✅ Check script permissions: chmod +x on Linux/Mac
  3. ✅ Ensure Node.js is installed for MCP server JavaScript files
  4. ✅ Review Claude Code logs for hook execution errors
❌ Performance Issues

Symptoms: Slow marketplace loading or plugin installation

Solutions:

  1. ✅ Check internet connection speed (GitHub clone performance)
  2. ✅ Verify available disk space (minimum 50MB required)
  3. ✅ Close unnecessary applications to free system resources
  4. ✅ Use local path installation for faster access after initial clone

🤝 Contributing

We welcome contributions! Here's how you can help:

🎯 Contributing New Plugins

  1. 🍴 Fork the repository
  2. 📁 Create plugin structure in appropriate directory (agents/, commands/, or super/)
  3. 📝 Follow plugin.json schema requirements
  4. 📖 Add comprehensive documentation (200-700+ lines recommended)
  5. 🧪 Test thoroughly with Claude Code CLI
  6. 🚀 Submit pull request with detailed description

📋 Plugin Quality Standards

  • ✅ Minimum 200 lines of documentation
  • ✅ Real-world code examples and templates
  • ✅ Phase-based methodologies
  • ✅ Best practices and anti-patterns
  • ✅ Quality metrics and KPIs
  • ✅ Business impact analysis

💡 Contributing Ideas

  • 💬 Open a GitHub Discussion with plugin proposal
  • 📝 Describe use case and business value
  • 💻 Provide examples of desired functionality
  • 🗳️ Community votes on most valuable additions

🔒 Security & Trust

⚠️ Important Disclaimer

DevsForge Marketplace is an independent, community-driven project

  • ❌ NOT affiliated with Anthropic or Claude
  • ❌ NOT officially endorsed or connected to Anthropic
  • ✅ Community maintained by open-source contributors
  • ⚠️ Use at your own risk - review plugin code before production use

Security Measures

Our Practices:

  • ✅ Security vulnerability scanning
  • ✅ Static code analysis
  • ✅ Zero third-party dependencies
  • ✅ Open source transparency
  • ✅ Community moderation
  • ✅ Regular security audits

Your Responsibilities:

  • 🔍 Review plugin source code
  • 🧪 Test in development first
  • 🐛 Report security issues on GitHub
  • 🔄 Keep plugins updated
  • 🔒 Follow least privilege principle
  • 📖 Read documentation carefully

📜 License

MIT License - See LICENSE for details

Copyright (c) 2025 DevsForge Community


🙏 Acknowledgments

Built with ❤️ by the DevsForge Community

Special thanks to:

  • 🎨 Anthropic for Claude Code CLI platform
  • 💻 All plugin contributors and testers
  • 🏢 Enterprise users providing valuable feedback
  • 🌟 Open source community for inspiration

🚀 Ready to supercharge your Claude Code experience?

Get Started Now • Browse Plugins • Contribute


DevsForge Marketplace v1.2 - The Ultimate Plugin Ecosystem for Claude Code

Made with Love Community Driven Production Ready

Details

Marketplace
devsforge/marketplace
Source
plugins/agents/error-handler
Author
DevsForge Community
Category
Agents
Keywords
devsforge, agent, error, handler
Listed since
Apr 7, 2026

Questions

What does the error-handler plugin add to Claude Code?

The error-handler plugin adds an expert agent called error-expert for error handling patterns, custom error classes, error boundaries, logging with Sentry, and robust error recovery strategies in TypeScript and Node.js applications. It is a single agent with no commands, hooks or MCP servers listed in its files.

Where does error-handler stand in the Backend & APIs category?

error-handler is listed in the Backend & APIs category on Claude Marketplaces. Other plugins in that category include ruflo-ddd, Prismic Automation and svix-automation, which may suit different backend work. error-handler focuses specifically on error handling and logging for TypeScript and Node.js code.

How do I install the error-handler plugin in Claude Code?

Run /plugin marketplace add devsforge/marketplace first, then run /plugin install error-handler@devsforge-marketplace inside Claude Code. The second command installs the error-expert agent from the devsforge-marketplace.

More from devsforge/marketplace

All 161

Similar to error-handler

More Backend & APIs