Automatically modifies files and triggers prompts based on git commits, session events, and tool usage.
/plugin marketplace add ivanlutsenko/awac-claude-code-plugins/plugin install obsidian-tracker@awac-claude-code-pluginsDefined inline in plugin.json manifest
{
"PreCompact": [
{
"hooks": [
{
"type": "prompt",
"prompt": "Check if .claude/obsidian-tracking.json exists. If it does, read it and include this info in your response so it survives compaction: 'OBSIDIAN TRACKING ACTIVE: Project={project}, Goal={goal}, Actions={actions.length}'. If file doesn't exist, do nothing."
}
]
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "prompt",
"prompt": "If .claude/obsidian-tracking.json exists: Read the tool input, find todos with status='completed', add them as 'โ
{content}' to the actions array in the tracking file. Work silently, don't notify user."
}
],
"matcher": "TodoWrite"
}
],
"SessionStart": [
{
"hooks": [
{
"type": "prompt",
"prompt": "Check if .claude/obsidian-tracking.json exists. If yes: 1) Read the tracking data, 2) Call mcp__plugin_obsidian_tracker_obsidian__addSession with project, goal, actions, results='Session completed via /clear', 3) Delete .claude/obsidian-tracking.json, 4) Notify user: '๐ Session saved to Obsidian'. If file doesn't exist, do nothing silently."
}
],
"matcher": "clear"
},
{
"hooks": [
{
"type": "prompt",
"prompt": "Check if .claude/obsidian-tracking.json exists. If yes, read it and notify: '๐ Obsidian Tracking active: {project} - {goal}'. If no, do nothing silently."
}
],
"matcher": "compact|resume"
},
{
"hooks": [
{
"type": "prompt",
"prompt": "Auto-detect Obsidian project: 1) Call mcp__obsidian-tracker__listProjects to get all projects, 2) Check if current working directory matches any project's local_path (from frontmatter), 3) If match found AND .claude/obsidian-tracking.json doesn't exist: create .claude/obsidian-tracking.json with {project, goal:'', actions:[], startedAt:now} and notify '๐ Auto-tracking: {project}', 4) If .claude/obsidian-tracking.json already exists, notify '๐ Tracking active: {project}', 5) If no match, do nothing silently."
}
],
"matcher": "startup"
}
]
}{
"riskFlags": {
"touchesBash": false,
"matchAllTools": false,
"touchesFileWrites": true
},
"typeStats": {
"prompt": 5
},
"eventStats": {
"PreCompact": 1,
"PostToolUse": 1,
"SessionStart": 3
},
"originCounts": {
"absolutePaths": 0,
"pluginScripts": 0,
"projectScripts": 0
},
"timeoutStats": {
"commandsWithoutTimeout": 0
}
}