Install
npx skillscat add igorhit/garson-ferias Install via the SkillsCat registry.
SKILL.md
Ferias Project Skill
Purpose
- Provide a repeatable execution playbook for backend and database work.
- Keep delivery aligned with
AGENTS.md(SOLID, DRY, YAGNI, KISS, LoD, TDA, SRP).
Scope
- In scope: SQL Server schema and query changes (
ferias.sql). - In scope: API work in
backend/Ferias.Api(Data, Endpoints, Models, Infra). - In scope: local run/build/validation commands.
- Out of scope: Pencil and
layout.penworkflow.
Project map
ferias.sql: database schema and seed/update scripts.run-db-tests.ps1: DB connectivity/check script usingprod.env.backend/Ferias.Api/Program.cs: app bootstrap and endpoint registration.backend/Ferias.Api/Endpoints: HTTP contracts and endpoint mapping.backend/Ferias.Api/Data: repositories and DB access.backend/Ferias.Api/Models: request/response contracts.example.env: safe template for required environment variables.prod.env: real secrets/local environment values (never commit secrets).
Workflow 1: DB change
- Update
ferias.sqlwith the minimal required change. - Prefer additive and backward-compatible SQL when possible.
- Re-run DB checks with
powershell -NoProfile -ExecutionPolicy Bypass -File .\run-db-tests.ps1. - If a breaking change is required, document impact and migration steps.
Workflow 2: API endpoint change
- Define/update request and response models in
Models. - Implement repository method in
Datawith focused responsibility. - Add/adjust endpoint mapping in
Endpoints. - Ensure API envelope/error pattern remains consistent with existing endpoints.
- Keep authorization and role checks explicit in endpoint handlers.
- Build and validate with
dotnet build .\Ferias.sln.
Workflow 3: Auth and user domain rule
- Keep accepted login domain restricted to
@garsoncredito.com.br. - Validate email normalization consistently (trim/lowercase).
- Reject invalid domain with clear and stable API error shape.
Workflow 4: Environment management
- Keep
example.envupdated with every required key. - Do not store real credentials in repository-tracked files.
- Use
prod.envonly for local/internal execution. - Confirm
run-db-tests.ps1reads expected keys before changing scripts.
Definition of done (backend/db task)
- Change is minimal and matches current requirement.
dotnet buildpasses.- DB check script passes when DB is reachable.
- No duplication introduced across endpoint/repository/model layers.
- Public API response/error format remains consistent.
- Any new env var is documented in
example.env.
Guardrails
- Do not add abstractions unless they are needed now.
- Keep methods small and explicit.
- Avoid cross-layer leakage: endpoint knows contracts and orchestration.
- Avoid cross-layer leakage: repository knows SQL/data access.
- Avoid cross-layer leakage: model knows shape, not behavior.
- Do not revert unrelated user changes.