- Introduced coding standards for TypeScript and React in SKILL.md. - Added continuous learning skill with configuration and evaluation scripts. - Created detail layout guidelines for read-only pages. - Established form layout rules for data-entry forms. - Documented project guidelines for the frontend monorepo. - Implemented security review checklist for frontend/Electron applications. - Developed a verification loop skill for comprehensive session checks. This commit enhances the skill set available for developers, ensuring adherence to best practices and improving code quality.
51 lines
1.3 KiB
Plaintext
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
|