skills/backend_database/SKILL.md
--- name: backend_database router_kit: FullStackKit description: Repository pattern, transactions, caching ve query optimization. metadata: skillport: category: development tags: [accessibility, api integration, backend, backend database, browser apis, client-side, components, css3, debugging, deployment, frameworks, frontend, fullstack, html5, javascript, libraries, node.js, npm, performance optimization, responsive design, seo, state management, testing, typescript, ui/ux, web develo
npx skillsauth add vuralserhat86/antigravity-agentic-skills skills/backend_databaseInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Database patterns, caching ve performance optimization.
interface IUserRepository {
findById(id: string): Promise<User | null>;
findByEmail(email: string): Promise<User | null>;
create(data: CreateUserDto): Promise<User>;
update(id: string, data: UpdateUserDto): Promise<User>;
delete(id: string): Promise<void>;
}
class UserRepository implements IUserRepository {
constructor(private prisma: PrismaClient) {}
async findById(id: string) {
return this.prisma.user.findUnique({ where: { id } });
}
}
async function transferMoney(fromId, toId, amount) {
return prisma.$transaction(async (tx) => {
const from = await tx.account.update({
where: { id: fromId },
data: { balance: { decrement: amount } },
});
if (from.balance < 0) throw new Error('Insufficient funds');
await tx.account.update({
where: { id: toId },
data: { balance: { increment: amount } },
});
});
}
async function getCachedUser(id: string) {
const cacheKey = `user:${id}`;
const cached = await redis.get(cacheKey);
if (cached) return JSON.parse(cached);
const user = await userRepository.findById(id);
if (user) {
await redis.set(cacheKey, JSON.stringify(user), 'EX', 3600);
}
return user;
}
// ❌ N+1 problem
const users = await prisma.user.findMany();
for (const user of users) {
await prisma.post.findMany({ where: { authorId: user.id } });
}
// ✅ Include ile tek sorgu
const users = await prisma.user.findMany({
include: { posts: true },
});
// ✅ Select ile sadece gerekli alanlar
const users = await prisma.user.findMany({
select: { id: true, name: true, email: true },
});
// ❌ Sequential
const user = await getUser(id);
const orders = await getOrders(id);
// ✅ Parallel
const [user, orders] = await Promise.all([
getUser(id),
getOrders(id),
]);
backend-core - Yapı, TypeScriptbackend-api - Endpoints, responsebackend-api - Endpoints, responseBackend Database v1.2 - Verified
Kaynak: 12 Factor App - Backing Services
EXPLAIN ile analiz et ve index ekle.| Aşama | Doğrulama | |-------|-----------| | 1 | Migration dosyaları Git'e commit edilmiş mi? | | 2 | N+1 sorgu problemi var mı? (Loop içinde query) | | 3 | DB şifresi kodun içinde hardcoded mı? (Asla olmamalı) |
tools
Production-tested setup for Zustand state management in React. Includes patterns for persistence, devtools, and TypeScript patterns. Prevents hydration mismatches and render loops.
development
Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas
development
--- name: websocket_engineer router_kit: FullStackKit description: WebSocket specialist for real-time communication systems. Invoke for Socket.IO, WebSocket servers, bidirectional messaging, presence systems. Keywords: WebSocket, Socket.IO, real-time, pub/sub, Redis. triggers: - WebSocket - Socket.IO - real-time communication - bidirectional messaging - pub/sub - server push - live updates - chat systems - presence tracking role: specialist scope: implementation output-format:
tools
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.