Nestjs Search
ASecurityTreat PostgreSQL as the source of truth and synchronize Elasticsearch asynchronously. Avoid `await db.save(); await es.index()` in the request because a partial failure leaves the two systems inconsistent. Use an outbox/domain event or CDC: commit the database change, emit `EntityUpdated`, enqueue an indexing job, and let a worker transform the entity into a flatter search document with retries and idempotent document IDs. Debezium CDC is the strongest consistency option when operational comp...
- 584 stars
- 0 votes
- 0 copies
- 1 view
- Added September 5, 2026
Security analysis
100/100Pro scans all 11 files and shows the line behind each finding
npx -y skills add HoangNguyen0403/agent-skills-standard --skill nestjs-search --agent claude-codeAre you the author of Nestjs Search?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-nestjs-search-agent-skills-standard)Treat PostgreSQL as the source of truth and synchronize Elasticsearch asynchronously. Avoid `await db.save(); await es.index()` in the request because a partial failure leaves the two systems inconsistent.
Use an outbox/domain event or CDC: commit the database change, emit `EntityUpdated`, enqueue an indexing job, and let a worker transform the entity into a flatter search document with retries and idempotent document IDs. Debezium CDC is the strongest consistency option when operational complexity is acceptable. Critical E2E tests should run Elasticsearch 8 in Docker rather than mocking the search engine.
Files in this skill
- eval-1.baseline.md
- eval-1.with-skill.md
- eval-2.baseline.md
- eval-2.with-skill.md
- eval-3.baseline.md
- eval-3.with-skill.md
- trigger-1.md
- trigger-2.md
- trigger-3.md
- trigger-4.md
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.