Scaffold and manage backend Express server structures and modular plugins.

Install

mkdir -p .claude/skills/backend-setup && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15872" && unzip -o skill.zip -d .claude/skills/backend-setup && rm skill.zip

Installs to .claude/skills/backend-setup

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Express server scaffolding, plugin architecture, middleware patterns. Use when: starting backend development, adding middleware, troubleshooting server startup, designing plugin systems.
186 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • Scaffold Express server structure
  • Implement authentication middleware
  • Configure error handling middleware
  • Load plugins dynamically
  • Initialize activity modules

How it works

The skill scaffolds an Express server with a CampusOS plugin system, middleware templates, and modular structure by creating specific files and directories.

Inputs & outputs

You give it
Module name, port, or middleware types
You get back
Scaffolded Express server with plugin system and middleware

When to use backend-setup

  • Start new backend project
  • Add custom middleware
  • Troubleshoot server startup
  • Initialize plugin modules

About this skill

Backend Setup

When to Use

  • Starting backend development
  • Adding Express middleware
  • Troubleshooting server startup
  • Designing plugin architecture
  • Initializing new activity modules

What This Skill Does

Scaffolds Express server with CampusOS plugin system, middleware templates, modular structure, and service initialization patterns.

Procedure

Phase 1: Project Structure

  1. Start in /backend/src/
  2. Create directory structure:
    src/
    ├── index.js
    ├── app.js
    ├── server.js
    ├── plugin-loader.js
    ├── middleware/
    │   ├── auth.js
    │   ├── error.js
    │   └── logger.js
    └── utils/
        └── registry.js
    

Phase 2: Core Components

  1. Create index.js - Express app initialization with express()
  2. Create app.js - Load middleware in correct order (auth → routes → error handling)
  3. Create server.js - HTTP server startup on configured PORT
  4. Create plugin-loader.js - Dynamic module discovery from /apps/

Phase 3: Middleware Implementation

  1. Authentication middleware - Verify JWT/tokens before route handlers
  2. Error handling middleware - Catch and format errors at end of chain
  3. Logging middleware - Track all requests/responses
  4. CORS configuration - Handle cross-origin requests

Phase 4: Plugin System

  1. Initialize module registry in utils/registry.js
  2. Scan /apps/ directory for modules with index.js
  3. Call module.init(app, registry) for each module
  4. Register routes via app.post(), app.get() from each module
  5. Mount services/authenticators/resolvers

Quick Reference

cd backend && pnpm install
npm run dev        # Start dev server with hot reload
npm run build      # Compile TypeScript (if used)
npm test          # Run integration tests
# Set custom port: PORT=3001 npm run dev

Common Issues

IssueSolution
Plugin not loadingCheck /apps/module/src/index.js exports init() function
Middleware order wrongPlace auth before routes, error handler at end of chain
Port in useChange PORT env var or kill process: lsof -i :3000
Routes undefinedVerify module calls app.post() during init phase
CORS errorsConfigure CORS middleware with allowed origins
Services not registeredEnsure registry.set() called during module initialization

When not to use it

  • When a plugin's `init()` function is not exported
  • When middleware order is incorrect
  • When routes are undefined

Limitations

  • Requires `init()` function export for plugins
  • Requires correct middleware order
  • Requires `app.post()` calls during module init phase for routes

How it compares

This skill provides a structured scaffolding for Express with a built-in plugin system, unlike starting an Express project from scratch.

Compared to similar skills

backend-setup side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
backend-setup (this skill)03moReviewIntermediate
telegram-bot-builder1066moReviewIntermediate
telegram-mini-app626moReviewAdvanced
stripe-integration482moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

telegram-bot-builder

davila7

Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users. Use when: telegram bot, bot api, telegram automation, chat bot telegram, tg bot.

106130

telegram-mini-app

davila7

Expert in building Telegram Mini Apps (TWA) - web apps that run inside Telegram with native-like experience. Covers the TON ecosystem, Telegram Web App API, payments, user authentication, and building viral mini apps that monetize. Use when: telegram mini app, TWA, telegram web app, TON app, mini app.

62163

stripe-integration

wshobson

Implement Stripe payment processing for robust, PCI-compliant payment flows including checkout, subscriptions, and webhooks. Use when integrating Stripe payments, building subscription systems, or implementing secure checkout flows.

48165

nodejs-backend-patterns

wshobson

Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices. Use when creating Node.js servers, REST APIs, GraphQL backends, or microservices architectures.

1246

hubspot-integration

davila7

Expert patterns for HubSpot CRM integration including OAuth authentication, CRM objects, associations, batch operations, webhooks, and custom objects. Covers Node.js and Python SDKs. Use when: hubspot, hubspot api, hubspot crm, hubspot integration, contacts api.

540

backend-architect

sickn33

Expert backend architect specializing in scalable API design, microservices architecture, and distributed systems. Masters REST/GraphQL/gRPC APIs, event-driven architectures, service mesh patterns, and modern backend frameworks. Handles service boundary definition, inter-service communication, resilience patterns, and observability. Use PROACTIVELY when creating new backend services or APIs.

1014

Search skills

Search the agent skills registry