AGENT SKILL

backend-dev

Use when an org role acts as backend developer and must build server-side services, APIs and database logic that are correct, secure and performant under load. Covers boundary validation, parameterized queries, idempotent writes and N+1 avoidance; for Node code patterns use backend-patterns.

License 许可
Apache-2.0
所属仓库
monoes/monomind
最近更新
2026-11-14
Stars
★ 23
Forks
2

01 前言 Front Matter

name
backend-dev
tags
[ "engineering", "backend", "api", "database" ]
tools
[ "monograph_query", "monograph_context", "monograph_impact" ]
source
https://github.com/monoes/monomind
license
Apache-2.0
description
Use when an org role acts as backend developer and must build server-side services, APIs and database logic that are correct, secure and performant under load. Covers boundary validation, parameterized queries, idempotent writes and N+1 avoidance; for Node code patterns use backend-patterns.

03 SKILL.md 正文

Backend Dev — Best Practices

Focus

Builds and maintains server-side services, APIs, and database logic that are correct, secure, and performant under real load.

Best practices

  • Design the data model and API contract before writing handlers; get the shape of the data right first.
  • Validate and sanitize every input at the system boundary — never trust client-supplied data.
  • Use parameterized queries always; never string-interpolate values into SQL or shell commands.
  • Handle errors explicitly with meaningful status codes/messages; don't let unhandled exceptions leak stack traces.
  • Design for idempotency on writes where retries are possible (payments, webhooks, queue consumers).
  • Add indexes deliberately based on actual query patterns, not speculatively on every column.
  • Keep authentication/authorization checks close to the resource they protect, and default-deny.
  • Log and monitor with enough context (request id, user id, latency) to debug production issues without re-deploying.

Common pitfalls

  • N+1 query patterns from looping over records and querying inside the loop instead of batching/joining.
  • Skipping rate limiting or auth checks on "internal" endpoints that later become externally reachable.
  • Returning inconsistent error shapes across endpoints, making client-side handling fragile.
  • Over-normalizing or under-normalizing schemas without considering actual read/write patterns.
  • Testing only the success path and skipping concurrent-write or partial-failure scenarios.

Tools & techniques

  • EXPLAIN ANALYZE (or equivalent) before assuming a query is slow or fast.
  • Contract/schema validation (e.g., Zod, JSON Schema) at API boundaries to catch malformed input early.
  • Load/soak testing before shipping anything expected to handle meaningful traffic.
  • Migration tooling with reversible, incremental schema changes — never hand-edit production schemas.

04 同仓库更多 Skills

monoes
monoes/monomind

isms-audit-expert

Use when planning or running an ISO 27001 ISMS audit: risk-based audit schedules, Annex A control assessment, Statement of Applicability and nonconformities. Auditor-side procedures, versus compliance-auditor, which is org role guidance across SOC 2, HIPAA and PCI-DSS.

★ 23
monoes
monoes/monomind

instrument-data-to-allotrope

Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full ASM JSON, flattened CSV for easy import, and exportable Python code for data engineers. Common triggers include converting instrument files, standardizing lab data, preparing data for upload to LIMS/ELN systems, or generating parser code for production pipelines.

★ 23
monoes
monoes/monomind

experiment-designer

Use when planning a product A/B or multivariate test: If/Then/Because hypotheses, primary and guardrail metrics, sample size and MDE, ICE prioritization. For logging and reproducing ML runs use experiment-tracker; for scientific study design use experimental-design.

★ 23
monoes
monoes/monomind

digest

Generate a daily or weekly digest of activity across all connected sources. Use when catching up after time away, starting the day and wanting a summary of mentions and action items, or reviewing a week's decisions and document updates grouped by project.

★ 23
monoes
monoes/monomind

design-critique

Get structured design feedback on usability, hierarchy, and consistency. Trigger with "review this design", "critique this mockup", "what do you think of this screen?", or when sharing a Figma link or screenshot for feedback at any stage from exploration to final polish.

★ 23
monoes
monoes/monomind

deployment-pipeline-design

Use when architecting a multi-stage CI/CD pipeline with approval gates, SAST and DAST scans, environment promotion, canary rollout and automated rollback. Design-level; for concrete Dockerfile and health check patterns use deployment-patterns.

★ 23