# Backend API AI

> Use this skill when changing the backend API, controllers, auth, article ingestion, sitewide chat backend, Gemini integration, Pinecone integration, or backend maintenance scripts in this repository.

- Skill: `hoangsonww/backend-api-ai-2` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add hoangsonww/backend-api-ai-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/hoangsonww/backend-api-ai-2/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: hoangsonww (https://skillmd.com/u/hoangsonww)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/hoangsonww/backend-api-ai-2

---


# Backend API And AI

This skill is for `backend/`.

## Focus Areas

- route and controller changes
- auth and user flows
- article CRUD and list/detail responses
- sitewide chat streaming and citation metadata
- maintenance scripts such as pruning and vector sync
- data model changes

## Working Rules

- Read the route, controller, service, and model together before changing behavior.
- Preserve response contracts unless the frontend is updated in the same task.
- Treat auth changes as security changes, not routine refactors.
- Check for build and deploy drift if you change runtime entrypoints or scheduled handlers.
- Prefer explicit env validation over silent fallback behavior.

## Validation

- Run `cd backend && npm test` for behavior changes when feasible.
- If you change scripts, ensure the relevant script still maps to a real file.
- If you change chat behavior, read `RAG_CHATBOT.md` and `CHATBOT_GUARDRAILS.md`.

## References

- For backend commands, env, and fragile files, read `references/backend-map.md`.
- For chat-specific guidance, read `references/chat-surface.md`.

