Skip to content
Back to skills

Spekka Backend Api

ASecurity

Express-based REST API design patterns for the video rendering service. Use this when creating or modifying API endpoints in server/index.ts, handling HTTP requests/responses, implementing error handling, or setting up SSE streams for progress updates.

  • 666 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 31, 2026
developmenttypescriptgoexpressapibackend

Works with

  • claude code
  • api

Security analysis

A100/100

Scanned May 31, 2026

npx -y skills add majiayu000/claude-skill-registry --skill spekka-backend-api --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Spekka Backend Api?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Spekka Backend Api
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-spekka-backend-api/badge)](https://www.skillsdirectory.com/skills/majiayu000-spekka-backend-api)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: Backend API
description: Express-based REST API design patterns for the video rendering service. Use this when creating or modifying API endpoints in server/index.ts, handling HTTP requests/responses, implementing error handling, or setting up SSE streams for progress updates.
---

# Backend API

This Skill provides Claude Code with specific guidance on how it should handle backend API.

## When to use this skill:

- Creating new API endpoints in server/index.ts
- Modifying request handlers or route definitions
- Implementing request validation and error responses
- Setting up Server-Sent Events (SSE) for progress streaming
- Handling async operations in Express routes
- Defining JSON response formats

## Instructions

- **Express Routes**: Define routes in `server/index.ts` with clear handler separation
- **HTTP Status Codes**: Return appropriate codes: 200 (success), 201 (created), 400 (bad request), 404 (not found), 500 (server error)
- **Error Responses**: Return consistent JSON error format: `{ error: string, details?: any }`
- **Request Validation**: Validate request bodies early with TypeScript types from `src/lib/types.ts`
- **Server-to-Server Design**: This is a backend microservice API for Cawpile.org, not user-facing
- **Health Checks**: Maintain `/health` endpoint for monitoring and orchestration
- **Progress Streaming**: Use SSE (Server-Sent Events) for long-running operations like video renders
- **Async Handlers**: Use async/await pattern; wrap handlers with error catching middleware

**Examples:**
```typescript
// Good: Clear validation, proper types, error handling
app.post('/render', async (req, res) => {
  try {
    const request: RenderRequest = req.body;
    if (!request.month || !request.year) {
      return res.status(400).json({ error: 'Missing month or year' });
    }
    const result = await renderVideo(request);
    res.json({ url: result.s3Url, duration: result.duration });
  } catch (error) {
    res.status(500).json({ error: 'Render failed', details: error.message });
  }
});

// Bad: No validation, unclear error handling
app.post('/render', (req, res) => {
  renderVideo(req.body).then(r => res.json(r));
});
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.