Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add tranhieutt/software_development_department --skill backend-patternsgit clone --depth 1 https://github.com/tranhieutt/software_development_departmentWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/tranhieutt/software_development_department/backend-patterns)<a href="https://agentmods.dev/skills/tranhieutt/software_development_department/backend-patterns"><img src="https://agentmods.dev/badge/skills/tranhieutt/software_development_department/backend-patterns/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/tranhieutt/software_development_department/backend-patterns"><img src="https://agentmods.dev/badge/skills/tranhieutt/software_development_department/backend-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00051 | $0.01347 |
| Opus 5.5 | $0.00020 | $0.00539 |
| Sonnet 5.5 | $0.00010 | $0.00269 |
| Haiku 4.5 | $0.00005 | $0.00135 |
Grade A, and why
backend-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 164 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Backend Patterns
Critical rules (non-obvious)
- Always handle async errors in Express: unhandled promise rejections crash the process; use
express-async-errorsor wrap every async handler - Never trust
req.bodysize: setlimiton body-parser; default 100kb is too large for some, too small for others process.envaccess at import time: if accessed beforedotenv.config(), value is undefined; call config() first in entry file- Connection pool misconfiguration: default pool size (10) will exhaust under load; set
pool.maxbased on(num_cores * 2) + effective_spindle_count res.json()afterres.send(): causes "Cannot set headers after they are sent" — alwaysreturnafter sending response
Express: production setup
import express from "express";
import "express-async-errors"; // patches async error handling globally
import helmet from "helmet";
import { rateLimit } from "express-rate-limit";
const app = express();
app.use(helmet());
app.use(express.json({ limit: "10kb" }));
app.use(rateLimit({ windowMs: 15 * 60 * 1000, max: 100 }));
// Routes
app.use("/api/v1/users", userRouter);
app.use("/api/v1/products", productRouter);
// 404 handler — must come after all routes
app.use((req, res) => res.status(404).json({ error: "Not found" }));
// Global error handler — must have 4 params
app.use((err: Error, req: Request, res: Response, next: NextFunction) => {
const status = err instanceof AppError ? err.statusCode : 500;
res.status(status).json({ error: err.message });
});
Repository pattern
interface IUserRepository {
findById(id: string): Promise<User | null>;
findByEmail(email: string): Promise<User | null>;
save(user: User): Promise<User>;
delete(id: string): Promise<void>;
}
class PgUserRepository implements IUserRepository {
constructor(private readonly db: Pool) {}
async findById(id: string) {
const { rows } = await this.db.query(
"SELECT * FROM users WHERE id = $1 AND deleted_at IS NULL", [id]
);
return rows[0] ?? null;
}
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 164 lines · 51 tokens per session scan A 2d4b08e5adc7
backend-patterns is a skill published in the GitHub repository tranhieutt/software_development_department (73 stars, last pushed 5mo ago), licensed MIT. It adds 51 tokens to every session and 1,347 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
architecture
Proactive architecture review — explore codebase structure, generate a self-contained HTML report with Mermaid diagrams and candidate improvements, then grill the findings. Use when planning a large refactor, onboarding to an unfamiliar codebase, or before a major architectural change.
fastapi
Skill "fastapi" from DongDuong2001/pudo-code-system, covering python fastapi pudo checklist, 1. plan (architecture & strategy), 2. understand (context & auditing), 3. develop (implementation) and 4. optimize (performance & review).
javascript-code
JavaScript/TypeScript development, paradigms, and runtime environments.
api-design-plan
Planning and designing scalable, secure, and intuitive APIs.
architecture-plan
Planning scalable system designs and architectural patterns.
backend-code
Server-side logic, data processing, and state management.