Files
shancheas 0b0bdd9c4b Add new skills for backend patterns, coding standards, continuous learning, and NestJS best practices
- Introduced backend patterns skill with guidelines on API design, database optimization, and server-side best practices.
- Added coding standards skill outlining universal coding principles for TypeScript, NestJS, and Node.js development.
- Implemented continuous learning skill to automatically extract reusable patterns from Cursor sessions.
- Created NestJS best practices skill detailing architecture patterns, dependency injection, error handling, and security measures.
- Included various rules and templates for NestJS best practices to ensure production-ready applications.
2026-08-20 18:30:39 +07:00

51 lines
1.3 KiB
Plaintext

---
description: Cursor hooks system, auto-accept permissions, and TodoWrite practices
alwaysApply: true
---
# Hooks System
Project hooks live in `.cursor/hooks.json` (schema version 1) and scripts under `.cursor/hooks/` and `.cursor/scripts/hooks/`.
## Hook Events
- **sessionStart / sessionEnd**: Load and persist session context
- **preCompact**: Save state before context compaction
- **afterFileEdit**: Suggest strategic compact after edits
- **beforeShellExecution**: Gate long-running servers and `git push`
## Current Project Hooks
### sessionStart
- Load previous session files from `.cursor/sessions/`
- Detect package manager
- Report learned skills in `.agents/skills/learned/`
### sessionEnd
- Persist session state
- Evaluate the session for extractable patterns
### preCompact
- Log compaction and append a note to the active session file
### afterFileEdit
- Suggest manual compaction after many edits
### beforeShellExecution
- Ask before running dev servers outside tmux
- Ask before `git push`
## Auto-Accept Permissions
Use with caution:
- Enable for trusted, well-defined plans
- Disable for exploratory work
- Never skip permissions for git push, installs, or production commands
## TodoWrite Best Practices
Use TodoWrite to:
- Track progress on multi-step tasks
- Verify understanding of instructions
- Show granular implementation steps