express-rest-api
Production-ready REST API development with Express.js, covering routing, middleware, validation, and error handling.
Works with
3
total installs
3
this week
2
GitHub stars
0
upvotes
Install Skill
Run in your terminal
3
installs
3
this week
2
stars
What it does
Supports standard HTTP methods (GET, POST, PUT, DELETE) with RESTful route design patterns and centralized error handling
Includes middleware patterns for authentication, validation, CORS, security headers, and request logging
Provides structured project organization (controllers, routes, services, models) and common response formats with pagination support
Covers e
Installation Guide
How to use express-rest-api on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your machine
- ›Node.js 16+ with npm — verify with
node --version - ›Active project directory where you want to add
express-rest-api
Run the install command
Execute the skills CLI command in your project's root directory to begin installation:
Fetches express-rest-api from pluginagentmarketplace/custom-plugin-nodejs and configures it for Cursor.
Select Cursor when prompted
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate express-rest-api. Access via /express-rest-api in your agent's command palette.
Security Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Documentation
Express REST API Skill
Master building robust, scalable REST APIs with Express.js, the de-facto standard for Node.js web frameworks.
Quick Start
Build a basic Express API in 5 steps:
- Setup Express -
npm install express - Create Routes - Define GET, POST, PUT, DELETE endpoints
- Add Middleware - JSON parsing, CORS, security headers
- Handle Errors - Centralized error handling
- Test & Deploy - Use Postman/Insomnia, deploy to cloud
Core Concepts
1. Express Application Structure
const express = require('express');
const app = express();
// Middleware
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
// Routes
app.use('/api/users', userRoutes);
app.use('/api/products', productRoutes);
// Error handling
app.use(errorHandler);
app.listen(3000, () => console.log('Server running'));
2. RESTful Route Design
// GET /api/users - Get all users
// GET /api/users/:id - Get user by ID
// POST /api/users - Create user
// PUT /api/users/:id - Update user
// DELETE /api/users/:id - Delete user
const router = express.Router();
router.get('/', getAllUsers);
router.get('/:id', getUserById);
router.post('/', createUser);
router.put('/:id', updateUser);
router.delete('/:id', deleteUser);
module.exports = router;
3. Middleware Patterns
// Authentication middleware
const authenticate = (req, res, next) => {
const token = req.headers.authorization;
if (!token) return res.status(401).json({ error: 'Unauthorized' });
// Verify token...
next();
};
// Validation middleware
const validate = (schema) => (req, res, next) => {
const { error } = schema.validate(req.body);
if (error) return res.status(400).json({ error: error.message });
next();
};
// Usage
router.post('/users', authenticate, validate(userSchema), createUser);
4. Error Handling
// Custom error class
class APIError extends Error {
constructor(message, statusCode) {
super(message);
this.statusCode = statusCode;
}
}
// Global error handler
app.use((err, req, res, next) => {
const statusCode = err.statusCode || 500;
res.status(statusCode).json({
success: false,
error: err.message,
...(process.env.NODE_ENV === 'development' && { stack: err.stack })
});
});
Learning Path
Beginner (2-3 weeks)
- ✅ Setup Express and create basic routes
- ✅ Understand middleware concept
- ✅ Implement CRUD operations
- ✅ Test with Postman
Intermediate (4-6 weeks)
- ✅ Implement authentication (JWT)
- ✅ Add input validation
- ✅ Organize code (MVC pattern)
- ✅ Connect to database
Advanced (8-10 weeks)
- ✅ API versioning (
/api/v1/,/api/v2/) - ✅ Rate limiting and security
- ✅ Pagination and filtering
- ✅ API documentation (Swagger)
- ✅ Performance optimization
Essential Packages
{
"dependencies": {
"express": "^4.18.0",
"helmet": "^7.0.0", // Security headers
"cors": "^2.8.5", // Cross-origin requests
"morgan": "^1.10.0", // HTTP logger
"express-validator": "^7.0.0", // Input validation
"express-rate-limit": "^6.0.0" // Rate limiting
}
}
Common Patterns
Response Format
// Success
{ success: true, data: {...} }
// Error
{ success: false, error: "Message" }
// Pagination
{
success: true,
data: [...],
pagination: { page: 1, limit: 10, total: 100 }
}
HTTP Status Codes
200 OK- Successful GET/PUT201 Created- Successful POST204 No Content- Successful DELETE400 Bad Request- Validation error401 Unauthorized- Auth required403 Forbidden- No permission404 Not Found- Resource not found500 Internal Error- Server error
Project Structure
src/
├── controllers/ # Route handlers
├── routes/ # Route definitions
├── middlewares/ # Custom middleware
├── models/ # Data models
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases
Task Automation & Efficiency
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Knowledge Enhancement
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Quality Improvement
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Implementation Guide
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Steps
- 1Install skill using provided installation command
- 2Test with simple use case relevant to your work
- 3Evaluate output quality and relevance
- 4Iterate on prompts to improve results
- 5Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Related Skills
rest-api-design
7aj-geddes/useful-ai-prompts
typescript-best-practices
96jwynia/agent-skills
google-search-console
41kostja94/marketing-skills
java-springboot
40github/awesome-copilot
python-expert-best-practices-code-review
34wispbit-ai/skills
fastapi-python
27mindrally/skills
Reviews
- ZZaid Malhotra★★★★★Dec 20, 2024
I recommend express-rest-api for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- IIra Iyer★★★★★Dec 16, 2024
Keeps context tight: express-rest-api is the kind of skill you can hand to a new teammate without a long onboarding doc.
- CChaitanya Patil★★★★★Dec 12, 2024
Registry listing for express-rest-api matched our evaluation — installs cleanly and behaves as described in the markdown.
- MMaya Thompson★★★★★Dec 4, 2024
Keeps context tight: express-rest-api is the kind of skill you can hand to a new teammate without a long onboarding doc.
- MMaya Patel★★★★★Nov 23, 2024
Registry listing for express-rest-api matched our evaluation — installs cleanly and behaves as described in the markdown.
- HHassan Robinson★★★★★Nov 11, 2024
Useful defaults in express-rest-api — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- IIsabella Ramirez★★★★★Nov 7, 2024
Registry listing for express-rest-api matched our evaluation — installs cleanly and behaves as described in the markdown.
- PPiyush G★★★★★Nov 3, 2024
Keeps context tight: express-rest-api is the kind of skill you can hand to a new teammate without a long onboarding doc.
- WWilliam Jain★★★★★Oct 26, 2024
Useful defaults in express-rest-api — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- SShikha Mishra★★★★★Oct 22, 2024
I recommend express-rest-api for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
showing 1-10 of 56
Discussion
Comments — not star reviews- No comments yet — start the thread.