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 agentmods add skills/yerdaulet-damir/vibe-coding-rules/debug-backendnpx skills add yerdaulet-damir/vibe-coding-rules --skill debug-backendgit clone --depth 1 https://github.com/yerdaulet-damir/vibe-coding-rulesWrote 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/yerdaulet-damir/vibe-coding-rules/debug-backend)<a href="https://agentmods.dev/skills/yerdaulet-damir/vibe-coding-rules/debug-backend"><img src="https://agentmods.dev/badge/skills/yerdaulet-damir/vibe-coding-rules/debug-backend.svg" alt="Measured on agentmods" 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 | $0.00062 | $0.01163 |
| Opus 5 | $0.00031 | $0.00581 |
| Sonnet 5 | $0.00012 | $0.00233 |
| Haiku 4.5 | $0.00006 | $0.00116 |
Grade A, and why
debug-backend 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 4d 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 — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.
debug-backend
Stop. Do not edit any file yet. Work through these 5 steps in order.
Step 1 — Locate the layer
Run these greps to find where the bug lives. Check one layer at a time.
# Is it a routing problem? (wrong status code, missing auth, bad request parsing)
grep -n "HTTPException\|status_code\|Depends(" app/routers/<file>.py
# Is it a service logic problem? (wrong calculation, wrong state transition)
grep -n "def \|raise \|return " app/services/<file>.py
# Is it a repository problem? (wrong query, missing user_id scope, transaction issue)
grep -n "SELECT\|filter\|where\|FOR UPDATE" app/repositories/<file>.py
# Is it a provider problem? (timeout, wrong response shape, missing error handling)
grep -n "httpx\|raise\|return\|except" app/providers/<file>.py
Decision: fix only in the layer where the bug lives. Never fix a service bug in the router.
Step 2 — Check the 3 most common AI antipatterns
These cause 80% of production bugs in AI-coded backends. Grep for each:
# Antipattern 1: SQLAlchemy Session leaked into services
grep -rn "AsyncSession\|Session\|from sqlalchemy" app/services/
# Antipattern 2: Provider returning raw dict instead of domain type
grep -rn "return {" app/providers/
# Antipattern 3: Business logic in router (calculation, state change, external call)
grep -c "await.*service\|await.*repo\|if.*balance\|FOR UPDATE" app/routers/*.py
| Result | Root cause | Principle |
|---|---|---|
| Session in services | Hexagonal boundary broken | B1 |
return {} from provider |
Missing ACL | B3 |
| Logic in router | Layer violation | A3 / code-standards |
No user_id filter in query |
Multi-tenancy gap | security-rules |
Step 3 — Write a reproducing test first
Before changing any production code, write a failing test that captures the exact bug.
# Template: place in tests/unit/ or tests/integration/
async def test_<bug_description>():
# Arrange: minimal setup that triggers the bug
repo = FakeCreditsRepo()
repo.seed_balance("user-1", Decimal("5.00"))
service = CreditsUserService(repo=repo)
# Act: call the exact code path that fails
with pytest.raises(ValueError, match="Insufficient balance"):
await service.charge("user-1", Decimal("10.00"), idempotency_key="idem-1")
# Assert: prove the invariant that was violated
assert await repo.get_balance("user-1") == Decimal("5.00") # not negative
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.
- 4d ago First seen · 135 lines · 62 tokens per session scan A 859567984bf4
debug-backend is a skill published in the GitHub repository yerdaulet-damir/vibe-coding-rules (10 stars, last pushed 4mo ago), licensed MIT. It adds 62 tokens to every session and 1,163 once invoked, about $0.0003 per session on Opus 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-31.
Other skills, from other repositories
source-command-methodology-advisor
Analyzes your codebase and asks 3 targeted questions to recommend the right AI-assisted development methodology stack.
axum-idioms
Axum HTTP framework patterns — routing, extractors, middleware, state management. For Rust see rust-idioms.
nextjs-idioms
Next.js App Router, RSC, Server Actions, ISR. For React see react-idioms. For TypeScript see typescript-idioms.
postgres-idioms
PostgreSQL best practices — schema design, query performance, indexing, connection management, RLS, concurrency, monitoring, and migrations. Load when writing SQL, designing schemas, or optimizing PostgreSQL queries.
react-idioms
React hooks, Suspense, Server Components, React 19 patterns. For TypeScript see typescript-idioms.
hono-idioms
Hono HTTP framework patterns — routing, middleware, Zod validation, RPC client. For TypeScript see typescript-idioms.