adding-internal-api-route
adding-internal-api-route is an API design & implementation skill for AI agents, published by TriliumNext in the Trilium repository on GitHub. Skillspace rates adding-internal-api-route C (71/100) and the safety scan flagged it for review; a judge model has also reviewed it.
Flagged for review. Read the source before running it.
Use when adding, moving, or wiring an internal REST endpoint in Trilium (a new `/api/*` route) — choosing between a core-shared handler (`packages/trilium-core/src/routes/index.ts` `buildSharedApiRoutes`, ~140 routes that ALSO run in the standalone sqlite-wasm build) and a server-only one (`apps/server/src/routes/routes.ts`), picking the `apiRoute` vs `asyncApiRoute` vs `route`/`asyncRoute` wrapper, and getting the implicit return conventions (object→200, `undefined`→204, `[status, body]` tuple→that status) and `convertEntitiesToPojo`'s narrow entity-unwrapping right. Most routes are core-shared (and run under WASM); `apps/server/src/routes/api/` is the minority case. Pairs with writing-unit-tests for the cross-runtime CoreApiTester spec.
- Grade
- C
- Quality
- 71 / 100
- Safety
- Needs review
- GitHub stars
- 37,821
Placed #1 of 6 in the judged category final for API design & implementation.
This rating describes the version of the repository we crawled; it may have changed since, so go by its current files.
Our review
- Architecture
- 94 / 100
- Maturity
- Structured: ships references or scripts
- Security scan
- Medium-risk patterns
- License
- Not declared. Check the repository before reusing it.
Judge review
Placed #1 of 6 in the judged category final for API design & implementation.
- Trigger
88 88 - Instructions
92 92 - Specificity
95 95 - Safety
78 78 - Disclosure
80 80 - Maintenance
72 72
Exceptionally hard-won detail, exact file:line references and a real footgun (an async handler that silently commits an empty transaction) that only comes from having been bitten by it.
What the scanner flagged
- reads environment variables
Not checked yet
- Category is a classifier prediction; no model has read this skill yet
- No blind task eval yet
- Scope (portable / vendor / repo-internal) not assessed; only the top of each category is read for scope
- Sibling files (scripts, references) not fetched; security scan covers SKILL.md only
Skillspace indexes and rates this skill; it does not host or endorse it. Run third-party skills at your own risk.