Encore ts backend engineering
Skill meyverick/agy-skills/skills/encore-ts-backend-engineering
Engineers type-safe backend microservices using Encore.ts. Use when orchestrating declarative architectures and infrastructure-from-code topologies.From its SKILL.md
npx -y skills add meyverick/agy-skills --skill encore-ts-backend-engineeringAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.6 KB, 509 tokens by cl100k_base, as published. Nobody here has run it
Encore.ts Backend Engineering
This skill manages the creation of distributed, type-safe backends using Encore.ts. It enforces strict Infrastructure-from-Code (IfC) paradigms, ensuring that architecture and deployment topologies are inferred directly from TypeScript code.
When to Use
- Use when creating new backend services or RPC endpoints using Encore.ts.
- Use when defining declarative infrastructure (Databases, Pub/Sub, Cron jobs).
- NOT for modifying traditional Express.js or NestJS APIs.
Core Process
Phase 1: API Endpoint Definition
- Define API contracts directly via exported functions wrapped in
api(). - Ensure request/response schemas are heavily typed with explicit interfaces.
- Do not write manual OpenAPI schemas; Encore infers them from the TypeScript AST.
Phase 2: Declarative Infrastructure
Never manually provision databases or queues in an external console or IaC tool (like Terraform) if Encore supports it natively.
- Use
import { SQLDatabase } from "encore.dev/storage/sqldb"for databases. - Use
import { Topic, Subscription } from "encore.dev/pubsub"for event-driven boundaries. - Ensure all resources are bound directly to the code that utilizes them.
Phase 3: Service Communication
- Services must communicate via strictly typed, native function calls (e.g.,
serviceA.endpointB()). - Do not hardcode URLs or manual
fetchcalls to communicate between internal Encore services.
Common Rationalizations
| Rationalization | Reality |
|---|---|
| "I'll just define the Postgres database manually in AWS." | Encore's Infrastructure-from-Code automatically handles local, testing, and production provisioning. Manual IaC splits the truth. |
| "I'll write an Express middleware for this validation." | Encore handles request validation at the compile-time schema level. Standard middleware paradigms often bypass these guarantees. |
Red Flags
- Manual HTTP
fetchrequests pointing to internal cluster services. - Creating resources in cloud consoles instead of utilizing
encore.dev/storage/sqldb. - Hand-written OpenAPI/Swagger definitions.
Verification
Before finalizing the Encore service, verify:
- All APIs are wrapped in the
api()directive with strict TypeScript interfaces. - Infrastructure (DBs, PubSub) is defined natively within the code.
- Internal service calls utilize type-safe direct imports, not manual HTTP routing.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.