backend-guidance
Skill4 starsChanged 12 days agoMITView on GitHub
Baseline overlay for routine thin HTTP, gRPC, or message-consumer implementation and review; use `backend-systems-guidance` for multi-layer, data-access, transaction, reliability, or trust-boundary work. Compose with matching implementation guidance. Not for outbound-client-only or security-audit tasks.
In this repository47 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agentic-sdlc-improvementSkill
- agentic-sdlcSkill
- agent-skill-generatorSkill
- agents-md-generatorSkill
- backend-systems-guidanceSkill
- bounded-delegationSkill
- chrome-devtools-axiSkill
- coding-guidance-bashSkill
- coding-guidance-cppSkill
- coding-guidance-goSkill
- coding-guidance-go-tuiSkill
- coding-guidance-pythonSkill
- coding-guidance-qtSkill
- context-engineeringSkill
- deepseek-harnessSkill
- design-md-authorSkill
- development-contract-processSkill
- development-contract-repo-overlay-templateSkill
- development-contract-systemSkill
- documenter-coauthoringSkill
- documenterSkill
- dream-thinkingSkill
- fuse-skillsSkill
- godotSkill
- go-testing-with-testifySkill
- jekyllSkill
- lighthouseSkill
- playwright-testingSkill
- project-config-and-testsSkill
- project-core-devSkill
- project-platform-diagnoseSkill
- project-release-maintainerSkill
- project-vendor-boundarySkill
- prompt-engineeringSkill
- recursive-thinkingSkill
- security-identity-accessSkill
- securitySkill
- setup-playwrightSkill
- story-clarifierSkill
- story-implementation-plannerSkill
- story-repo-scoutSkill
- story-to-plan-orchestratorSkill
- tester-mindsetSkill
- thinkingSkill
- ui-design-guidanceSkill
- ui-guidanceSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Use alongside the matching principle skill (for example, coding-guidance-cpp) when the change touches backend code.
- Distinctive: line 21
Use this as the thin default backend overlay for ordinary backend work.
- Very specific: line 22
If the task includes service-boundary refactors, repository or transaction work, queue or webhook reliability, stronger testing …
- Distinctive: line 51
Keep handlers thin in responsibility, not by literal line count — parse input, call a service function, map transport concerns, serialize …
- Distinctive: line 55
Keep business logic testable without transport — no HTTP context, no gRPC metadata leaking into domain functions.
- Distinctive: line 62
Keep transport-only concerns at the edge: request decoding, authentication, and transport-specific error mapping.
- Distinctive: line 67
Keep business invariants in service or domain code and persistence invariants in the data layer.
- Distinctive: line 71
Use dependency injection where it makes tests simpler — not as a default architectural pattern.
- Distinctive: line 78
Test seam: if testing a business rule requires transport infrastructure, move that rule inward.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Backend Guidance
This is a composable overlay, not a standalone workflow.
Use alongside the matching principle skill (for example,
coding-guidance-cpp) when the change touches backend code. Add
project-core-dev only when repository-specific completion checks still need
to be discovered or reported.
Choose the activity before applying the rules below:
- for implementation, make only the requested backend changes and validate them
- for review, inspect and report prioritized findings with evidence; do not edit files or require findings to be fixed unless the user also asks for remediation
Use this as the thin default backend overlay for ordinary backend work.
If the task includes service-boundary refactors, repository or transaction work,
queue or webhook reliability, stronger testing expectations, or explicit
trust-boundary hardening, prefer backend-systems-guidance.
Routing examples:
- thin route handler that delegates to existing service logic -> use this skill
- small message consumer bug fix with no retry or persistence redesign -> use this skill
- new endpoint with authz, repository, transaction, retry, or observability
changes -> use
backend-systems-guidance - security audit of an endpoint or tenant membership/authorization boundary ->
use
securityfirst; addsecurity-identity-accesswhen identity, session, or tenant authorization is central, and add the backend overlay only for implementation structure
When to use
The repo has server-side networked code: HTTP route handlers, gRPC service methods, message/event consumers, or similar request-processing pipelines.
Not for
HTTP client code, CLI tools that make outbound requests, batch processors, or offline data pipelines. These do not have the handler/service/boundary shape this skill addresses.
Rules
- Keep handlers thin in responsibility, not by literal line count — parse input, call a service function, map transport concerns, serialize output. If a handler starts owning business decisions, extract that logic into a service or core module.
- Keep business logic testable without transport — no HTTP context, no gRPC metadata leaking into domain functions.
- Isolate data access behind an interface when it simplifies testing. Do not add an abstraction layer when the data access is trivial or test-only.
- Decode, normalize, and validate the external transport shape at the untrusted boundary before it reaches business logic. Do not confuse that check with domain invariants that the service or domain owner must enforce.
- Keep transport-only concerns at the edge: request decoding, authentication, and transport-specific error mapping. Enforce authorization in the earliest shared policy layer that every relevant entrypoint traverses; an edge-only authorization check is sufficient only when no other entrypoint can bypass it.
- Keep business invariants in service or domain code and persistence invariants in the data layer. Avoid duplicate checks that enforce the same contract, but do not remove a check merely because another layer validates a different concern.
- Use dependency injection where it makes tests simpler — not as a default architectural pattern.
Decision Heuristics
- Handler responsibility: extract business decisions from transport glue when they obscure ownership; line count alone is not an architectural defect.
- Test seam: if testing a business rule requires transport infrastructure, move that rule inward. Tests of routing, serialization, or middleware may correctly need a real transport boundary.
- Validation placement: validate each concern at its owning boundary: transport shape at ingress, shared authorization before the action, domain invariants in the domain owner, and storage constraints in persistence. If checks are scattered, identify whether they duplicate one contract or protect different boundaries before consolidating them.
Validation
For implementation, a backend change is done when, in addition to the base implementation skill's validation:
- handlers delegate to testable service functions
- business logic tests run without transport dependencies
- external transport shape is validated at ingress, shared authorization cannot be bypassed through another entrypoint, and domain invariants remain in their owning layer
- transport-specific error handling stays at the boundary instead of leaking into domain logic
For review, completion means prioritized findings name the affected request or consumer path, supporting evidence, likely consequence, and validation gap. Open findings do not make the review incomplete.
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.

