backend-dev
Skill4 starsChanged 9 months agoMITView on GitHub
Use this skill for backend development — server logic, authentication, microservices, serverless functions, middleware, background jobs, caching strategies, and backend architecture patterns. Trigger on keywords: backend, server, API endpoint, middleware, authentication, authorization, microservice, serverless, background job, queue, caching, session.
- Reads credentials
5 other projects use a version of this.
Adopted by
Most recently taken up by
- matos-ed/skillstheir own version, first seen Oct 11, 2026
- marmelab/atomic-crmtheir own version, first seen Oct 8, 2026
- Douglasst102/AgentSkillstheir own version, first seen Sep 28, 2026
- CODE-SAURABH/OpenSkillstheir own version, first seen Jul 25, 2026
- aico-platform/guardrails-demotheir own version, first seen Jul 4, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- marmelab/atomic-crm★ 1.5ksame name
- Douglasst102/AgentSkills★ 4same name
- CODE-SAURABH/OpenSkills★ 2same name
- matos-ed/skills★ 1same name
- aico-platform/guardrails-demo★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository37 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- ai-agent-designSkill
- ai-assisted-learningSkill
- ai-prompting-patternsSkill
- api-designSkill
- career-growthSkill
- client-communicationSkill
- code-explanationSkill
- code-readingSkill
- code-reviewSkill
- cross-functional-collabSkill
- database-designSkill
- debugging-mindsetSkill
- devops-cicdSkill
- doc-creationSkill
- focus-productivitySkill
- frontend-designSkill
- git-workflowSkill
- incident-responseSkill
- internal-commsSkill
- interview-prepSkill
- mcp-builderSkill
- performance-reviewSkill
- problem-solvingSkill
- prompt-engineeringSkill
- research-synthesisSkill
- resume-portfolioSkill
- self-healing-mindsetSkill
- side-project-planningSkill
- sprint-planningSkill
- system-designSkill
- technical-communicationSkill
- technical-mentoringSkill
- tech-researchSkill
- testingSkill
- threat-modelingSkill
- web-artifacts-builderSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Never skip this order. Auth before business logic.
- Distinctive: line 129
Every production API needs:
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Backend Development
Core Principles
- Stateless services — don't store session state in memory; use Redis or a DB
- Fail fast — validate inputs at the boundary, return errors early
- Idempotency — POST/PUT endpoints that can be called multiple times safely
- Observability — every service needs logs, metrics, and traces
API Endpoint Structure
Request Lifecycle
Request → Rate Limiting → Authentication → Authorization → Validation → Business Logic → ResponseNever skip this order. Auth before business logic. Validation before processing.
Response Standards
// Success
{ "data": { ... }, "meta": { "page": 1, "total": 100 } }
// Error
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Human-readable description",
"details": [{ "field": "email", "issue": "Invalid format" }]
}
}Authentication Patterns
JWT Best Practices
- Short access token TTL (15 min) + long refresh token (7 days)
- Store refresh token in httpOnly cookie (not localStorage)
- Validate signature, expiry, issuer, and audience
- Rotate refresh tokens on use
- Maintain a revocation list or use short-lived tokens only
Session-Based Auth
- Store session ID in httpOnly, Secure, SameSite cookie
- Store session data in Redis with TTL
- Regenerate session ID after login (session fixation prevention)
Authorization
// Check authorization at the service layer, not just the route
async function getOrder(userId: string, orderId: string) {
const order = await db.orders.findById(orderId)
if (!order) throw new NotFoundError()
// Authorization check — user can only see their own orders
if (order.userId !== userId) throw new ForbiddenError()
return order
}Background Jobs & Queues
Use queues for:
- Email sending
- Image/file processing
- External API calls that don't need to be synchronous
- Long-running tasks
Job Patterns
Fire-and-forget: Enqueue and return immediately
Scheduled: Run at specific time (cron)
Delayed: Run after X minutes/hours
Retry: Re-attempt on failure with backoffAlways implement:
- Dead letter queue for failed jobs
- Idempotency key to prevent duplicate processing
- Timeout per job
- Max retry count
Error Handling
// Structured error hierarchy
class AppError extends Error {
constructor(
public message: string,
public statusCode: number,
public code: string
) { super(message) }
}
class ValidationError extends AppError {
constructor(details: ValidationDetail[]) {
super('Validation failed', 400, 'VALIDATION_ERROR')
this.details = details
}
}
// Global error handler
app.use((err, req, res, next) => {
if (err instanceof AppError) {
return res.status(err.statusCode).json({ error: err })
}
// Log unexpected errors
logger.error('Unexpected error', { err, req })
res.status(500).json({ error: { code: 'INTERNAL_ERROR' } })
})Middleware Checklist
Every production API needs:
- Request logging (method, path, status, duration)
- Rate limiting (per IP, per user, per endpoint)
- CORS configuration (explicit whitelist)
- Helmet / security headers
- Request ID propagation (for distributed tracing)
- Body size limits
- Timeout handling
Environment Configuration
// Never hardcode configuration — always from environment
const config = {
db: {
url: process.env.DATABASE_URL, // required
poolSize: parseInt(process.env.DB_POOL_SIZE ?? '10')
},
jwt: {
secret: process.env.JWT_SECRET, // required
expiresIn: process.env.JWT_TTL ?? '15m'
}
}
// Validate required config at startup — fail fast
const required = ['DATABASE_URL', 'JWT_SECRET']
for (const key of required) {
if (!process.env[key]) throw new Error(`Missing required env: ${key}`)
}Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

