Backend
Skill chinhanxt/Store_AI_Myhome/.agents/skills/insforge-dev/backend
Use this skill when contributing to InsForge's backend package. This is for maintainers editing backend routes, services, providers, auth, database logic, realtime, schedules, or backend tests in the InsForge monorepo.From its SKILL.md
npx -y skills add chinhanxt/Store_AI_Myhome --skill backendAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 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, as published. Nobody here has run it
InsForge Dev Backend
Use this skill for backend/ work in the InsForge repository.
Scope
backend/src/api/**backend/src/services/**backend/src/providers/**backend/src/infra/**backend/tests/**
Working Rules
-
Keep the route -> service -> provider/infra split intact.
- Routes handle auth, parsing, validation, and delegation.
- Services own business logic and orchestration.
- Providers and infra wrap external systems or lower-level integrations.
- Service layer code should be the only layer that interacts with the core PostgreSQL database.
- Do not put direct database access in routes.
- Do not bypass services when reading from or writing to Postgres.
-
Follow backend conventions.
- Use ESM-style
.jsimport specifiers in TypeScript source. - InsForge's core database is PostgreSQL.
- InsForge currently runs as a single-instance server, so be careful about introducing logic that assumes distributed coordination, cross-instance locking, or background worker separation.
- Reuse shared schemas from
@insforge/shared-schemaswhen contracts cross packages. - Use
safeParseplusAppErrorfor invalid input. - Return successful results through
successResponse. - Preserve existing auth middleware patterns such as
verifyAdmin,verifyUser, andverifyApiKey. - Never use the TypeScript
anytype. Prefer precise interfaces, schema-derived types,unknown, or constrained generics. - For schema changes, write a new migration file instead of editing database structure manually.
- Put schema changes under
backend/src/infra/database/migrations/.
- Use ESM-style
-
Preserve existing behavior around mutation flows.
- Keep audit logging when surrounding routes already log state changes.
- Keep error handling flowing through shared middleware.
- Do not introduce a new response envelope unless the existing feature already uses one.
- For critical flows with multiple dependent database writes, use an explicit transactional process so the whole operation succeeds or fails together.
- Be especially careful with transactions around auth, secrets, billing-like usage updates, schema changes, and any flow that would leave the system inconsistent if partially applied.
Validation
cd backend && npm testcd backend && npm run build
For contract changes, also validate packages/shared-schemas/ and any affected dashboard consumers.