Stats
Actions
Tags
Runs bash scripts on session start to ensure an index is present and on session end to update it. Likely for a cartography or knowledge mapping tool.
2 events · 2 hooks
Where this hook configuration is defined
Defined in ./hooks/hooks.json
Event handlers and matchers — expand Raw Configuration for the full JSON
node -e "try { const fs = require('fs'); const path = require('path'); const statePath = path.join(process.cwd(), '.ultraplan', 'STATE.md'); if (!fs.existsSync(statePath)) { console.log('UltraPlan: No STATE.md to update on session end'); process.exit(0); } const content = fs.readFileSync(statePath, 'utf8'); const now = new Date().toISOString().split('T')[0]; const updated = content.replace(/Last activity:.*/, 'Last activity: ' + now + ' - Session ended'); fs.writeFileSync(statePath, updated, 'utf8'); console.log('UltraPlan: STATE.md updated with session end timestamp'); } catch (err) { console.error('UltraPlan SessionEnd hook error: ' + err.message); }"node -e "try { const fs = require('fs'); const path = require('path'); const statePath = path.join(process.cwd(), '.ultraplan', 'STATE.md'); if (!fs.existsSync(statePath)) { console.log('UltraPlan: No existing state found, fresh session'); process.exit(0); } const content = fs.readFileSync(statePath, 'utf8'); const rawId = (process.env.CLAUDE_SESSION_ID || 'unknown').replace(/[^a-zA-Z0-9_-]/g, ''); const lines = content.split('\n'); let updated = false; const newLines = lines.map(function(line) { if (line.startsWith('Session ID:')) { updated = true; return 'Session ID: ' + rawId; } return line; }); if (!updated) { newLines.splice(2, 0, 'Session ID: ' + rawId); } fs.writeFileSync(statePath, newLines.join('\n'), 'utf8'); console.log('UltraPlan: Resumed session, STATE.md updated with session ' + rawId); } catch (err) { console.error('UltraPlan SessionStart hook error: ' + err.message); }"npx claudepluginhub ankurjain1121/dev-workflow-skills --plugin clear-thought-ultraplan