- 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.
25 lines
907 B
Bash
Executable File
25 lines
907 B
Bash
Executable File
#!/bin/bash
|
|
# SessionStart Hook - Load previous context on new session
|
|
#
|
|
# Configured in .cursor/hooks.json:
|
|
# sessionStart -> node .cursor/scripts/hooks/session-start.js
|
|
# This shell version is a fallback for environments without Node.
|
|
|
|
ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
SESSIONS_DIR="${ROOT}/.cursor/sessions"
|
|
LEARNED_DIR="${ROOT}/.agents/skills/learned"
|
|
|
|
recent_sessions=$(find "$SESSIONS_DIR" -name "*.tmp" -mtime -7 2>/dev/null | wc -l | tr -d ' ')
|
|
|
|
if [ "$recent_sessions" -gt 0 ]; then
|
|
latest=$(ls -t "$SESSIONS_DIR"/*.tmp 2>/dev/null | head -1)
|
|
echo "[SessionStart] Found $recent_sessions recent session(s)" >&2
|
|
echo "[SessionStart] Latest: $latest" >&2
|
|
fi
|
|
|
|
learned_count=$(find "$LEARNED_DIR" -name "*.md" 2>/dev/null | wc -l | tr -d ' ')
|
|
|
|
if [ "$learned_count" -gt 0 ]; then
|
|
echo "[SessionStart] $learned_count learned skill(s) available in $LEARNED_DIR" >&2
|
|
fi
|