add-api-endpoint
Skill7 starsChanged 18 days agoApache-2.0View on GitHub
Add a new backend API endpoint to Prompt Maker Studio, following the repo's existing route/service/schema layering. Use when asked to add, create, or expose a new backend endpoint or API route.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- willdady/platypustheir own version, first seen Nov 8, 2026
- dream-horizon-org/pulsetheir own version, first seen Oct 8, 2026
- dipu-bd/lightnovel-crawlertheir own version, first seen Oct 8, 2026
- lncrawl/lightnovel-crawlertheir own version, first seen Oct 8, 2026
- Sandhyaa-a/Kaggle_main_Projecttheir own version, first seen Jul 6, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- dipu-bd/lightnovel-crawler★ 2.6ksame name
- lncrawl/lightnovel-crawler★ 2.6ksame name
- willdady/platypus★ 130same name
- dream-horizon-org/pulse★ 44same name
- Sandhyaa-a/Kaggle_main_Project★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- backend/AGENTS.mdAGENTS.md
- frontend/AGENTS.mdAGENTS.md
- code-reviewSkill
- coding-agent-briefSkill
- db-migrationSkill
- find-skillsSkill
- impeccableSkill
- product-ownerSkill
- readme-syncSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Follow this order — each step depends on the last:
“Common” is measured: kept by at least 6 in 10 of the 5 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.
Files
Add a backend API endpoint
Follow this order — each step depends on the last:
- Schema — add or extend the Pydantic request/response models in the matching domain module under
backend/app/schemas/(e.g.prompts.pyoraccounts.py). Reuse existing field-validation patterns in that module (e.g. unique-name validation) rather than inventing new ones. - Route — add the endpoint in the appropriate router file under
backend/app/api/(routes.pyfor prompt endpoints,session_routes.py,account_routes.py,password_routes.py, orllm_connection_routes.pyfor auth,eval_routes.pyfor evaluations,refine_routes.pyfor refinement,public_routes.pyfor unauthenticated/api/publicendpoints,admin_routes.pyfor admin-only;oauth_routes.pyandmcp_routes.pybelong to the MCP/OAuth integration). Keep the handler thin: parse/validate via the schema, call a service function, return its result. Apply the existing auth dependency pattern (backend/app/auth/dependencies.py) if the endpoint should require authentication — check how neighboring endpoints in the same file do it. Register a new router inbackend/app/main.pywhen needed; a new account router is composed inbackend/app/api/auth_routes.pyinstead. - Service logic — put any real logic in
backend/app/services/(new file or extend an existing one), not in the route handler. If the endpoint touches the database, follow the ownership-scoping pattern: services useservices/prompts/ownership.py(get_owned_prompt), and route handlers use theapi/deps.get_owned_promptwrapper, which maps a missing or foreign prompt to 404; useOperationErrorin services andcall_servicein HTTP adapters to translate expected service failures at the HTTP boundary. REST and MCP share prompt services; MCP calls those services directly and maps failures to tool errors. Keep ownership checks in the shared operation. Resolve AI calls in route handlers throughapi/deps.get_llm_connection(not the/me/llm-connectionhandler orservices/accounts/connections.get_llm_connection, which read the stored settings) andservices/llm_client.py, with the existing budget and spend-ledger handling. - Tests — add tests in
backend/tests/(there's already atest_api.py/test_auth.py/test_admin_routes.pysplit by router — put new tests in the matching file, or create a new one if the endpoint doesn't fit any existing file). Cover: happy path, validation failure (422), auth failure if applicable, and ownership isolation if the endpoint is user-scoped. Update the module table inbackend/tests/README.mdwhen adding a test file. - Document the contract — update
docs/api.mdfor public route changes. Updateproduct/FEATURES.md— add or edit a row in the relevant table with the feature name, status, one-line description, and the file(s) it's implemented in. This file is the project's source-of-truth feature list and is easy to forget. - Verify — run
make lint-backend && make testbefore considering the work done.
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.

