agentleFS
lukashouthoofdlukashouthoofd/cenekathon/.agents/skills/backend-api/SKILL.md

backend-api

Skill1 starsChanged 13 days agoMITView on GitHub

Use when building the backend — a small REST/JSON API (FastAPI or Node), validation, error handling, CORS, streaming, and the contract shared with the frontend.

  • Reads credentials
  • Installs packages

9 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use documentation, debugging and 3 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AnthropicSkill

    documentation

    Write and maintain technical documentation. Trigger with "write docs for", "document this", "create a README", "write a runbook", "onboarding guide", or when the user needs help with any form of technical writing — API docs, architecture docs, or operational runbooks.

    Also in 3 projects that use this

  • BlockSkill

    debugging

    Debugging guidelines and best practices

    Also in 3 projects that use this

  • CloudflareSkill

    security-audit

    Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.

    Also in 5 projects that use this

  • MicrosoftSkill

    api-design

    Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.

    Also in 3 projects that use this

  • SentrySkill

    security-review

    Finds exploitable application security vulnerabilities in code changes. Use for Warden security scans, appsec review, OWASP-style checks, authentication or authorization bugs, injection, XSS, SSRF, path traversal, secrets, unsafe crypto, webhook verification, open redirects, or sensitive data exposure.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 0

    Distinctive

    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
  1. Very specific:

    State: start with in-memory or a JSON/SQLite file.

    line 14
  2. Very specific:

    Config: read from environment (AI_API_KEY, …).

    line 15

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Backend API (small and boring)

  • Pick one: Python → FastAPI (pip install fastapi uvicorn pydantic, run uvicorn app.main:app --reload). TypeScript → Next.js Route Handlers (see frontend-nextjs-vercel) or Hono/Express. Don't run two backends.
  • Contract first: list endpoints + request/response JSON in docs/STACK.md before coding; share types (Pydantic model ↔ TypeScript type / Zod schema).
  • Validate all input at the edge (Pydantic/Zod). Return JSON errors { "error": "message" } with proper status codes (400 bad input, 404, 500). Never leak stack traces or keys.
  • Health route: GET /health → { "ok": true } for the deploy platform and your own smoke test.
  • CORS: allow only the frontend origin (and localhost in dev). Frontend and API on one host (Next.js routes) avoids CORS entirely.
  • Slow work (AI calls): stream the response (SSE / chunked) or return a job id and poll; set timeouts; cache by input hash.
  • State: start with in-memory or a JSON/SQLite file; move to a managed DB only if the demo needs persistence across restarts (database-quick).
  • Config: read from environment (AI_API_KEY, …); fail fast at startup if a required var is missing.
  • Logging: one log line per request with status and duration; helps debugging during the demo.
  • Auth: skip unless the brief requires it. If it does, use a hosted provider (Clerk, Supabase Auth) — don't hand-roll.

Done when: curl against each documented endpoint returns the documented shape, bad input returns a 4xx, and /health is green on the deployed URL.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.