Commit d74da8a1f5d3

Vincent Demeester <vincent@sbr.pm>
2025-12-05 10:10:58
refactor(skills): integrate Org skill into TODOs and Notes workflows
- Enable programmatic org-mode operations using org-manager tool - Replace fragile grep/sed patterns with reliable Emacs batch API - Provide consistent JSON-based interface for both skills Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 7c1f765
Changed files (2)
dots
.config
claude
skills
dots/.config/claude/skills/Notes/SKILL.md
@@ -268,25 +268,62 @@ CLOSED: [2025-12-03 Wed 14:23]
 
 ## Finding and Organizing Notes
 
+### Using the Org Skill
+
+This skill can integrate with the **Org skill** for programmatic org-mode operations on note files.
+
+**Tool location:** `~/.config/claude/skills/Org/tools/org-manager`
+
+**Search notes:**
+```bash
+# Search for term across all notes
+org-manager search ~/desktop/org/notes/*.org "wireguard"
+
+# Count TODOs in notes
+org-manager count ~/desktop/org/notes/20251203T151822--project__ai.org
+
+# List sections in a note
+org-manager sections ~/desktop/org/notes/20251203T151822--project__ai.org
+```
+
 ### By Tags
 Notes with `:nixos:` tag can be found by searching filenames with `_nixos`
 
+```bash
+# Find notes with specific tag
+ls ~/desktop/org/notes/*__*homelab*.org
+ls ~/desktop/org/notes/*__*nixos*.org
+```
+
 ### By Date
 Files are naturally sorted by timestamp, most recent first when reverse sorted
 
+```bash
+# Most recent notes
+ls -t ~/desktop/org/notes/*.org | head -10
+
+# Notes from specific month
+ls ~/desktop/org/notes/202512*.org
+```
+
 ### By Title
 Search for keywords in the title portion between `--` and `__`
 
-### Using grep
+```bash
+# Find notes with "wireguard" in title
+ls ~/desktop/org/notes/*--*wireguard*.org
+```
+
+### Using grep (fallback)
 ```bash
 # Find notes about a topic
 grep -l "wireguard" ~/desktop/org/notes/*.org
 
-# Find notes with specific tag
-ls ~/desktop/org/notes/*__*homelab*.org
-
 # Search content
 grep -r "NixOS configuration" ~/desktop/org/notes/
+
+# Find notes with specific tag in frontmatter
+rg "#+filetags:.*:nixos:" ~/desktop/org/notes/
 ```
 
 ## Special Note Types
dots/.config/claude/skills/TODOs/SKILL.md
@@ -315,36 +315,85 @@ If you're using Emacs, these commands are available:
 - `TAB` - Cycle visibility
 - `S-TAB` - Global cycle visibility
 
-## Viewing TODOs from Command Line
+## Using the Org Skill for TODO Operations
+
+This skill integrates with the **Org skill** for programmatic org-mode manipulation. The Org skill provides the `org-manager` tool for reliable TODO operations.
+
+### Tool Location
+`~/.config/claude/skills/Org/tools/org-manager`
+
+### Common Operations
+
+**List TODOs:**
+```bash
+# All NEXT tasks
+org-manager list ~/desktop/org/todos.org --state=NEXT
+
+# All STRT tasks
+org-manager list ~/desktop/org/todos.org --state=STRT
+
+# Tasks scheduled for today
+org-manager scheduled ~/desktop/org/todos.org
+
+# High priority tasks (1-2)
+org-manager list ~/desktop/org/todos.org --priority=1,2
+
+# Tasks in specific section
+org-manager by-section ~/desktop/org/todos.org "Work"
+```
+
+**Modify TODOs:**
+```bash
+# Add new TODO
+org-manager add ~/desktop/org/todos.org "Task description" \
+  --section=Work --priority=2 --scheduled=2025-12-10
+
+# Update state
+org-manager update-state ~/desktop/org/todos.org "Task heading" DONE
+
+# Schedule task
+org-manager schedule ~/desktop/org/todos.org "Task heading" 2025-12-10
+
+# Set priority
+org-manager priority ~/desktop/org/todos.org "Task heading" 2
+
+# Archive completed
+org-manager archive ~/desktop/org/todos.org
+```
+
+**Statistics:**
+```bash
+# Count by state
+org-manager count ~/desktop/org/todos.org
+
+# Get all sections
+org-manager sections ~/desktop/org/todos.org
+
+# Search for term
+org-manager search ~/desktop/org/todos.org "wireguard"
+```
+
+All commands return JSON for easy parsing:
+```bash
+org-manager list ~/desktop/org/todos.org --state=NEXT | jq -r '.data[] | "[\(.todo)] \(.heading)"'
+```
+
+### Fallback: Direct Command Line (Legacy)
+
+If org-manager is not available, you can use grep/sed:
 
-### Show Active Tasks
 ```bash
 # All NEXT tasks
 grep -n "^\*\* NEXT" ~/desktop/org/todos.org
 
-# All STRT tasks
-grep -n "^\*\* STRT" ~/desktop/org/todos.org
-
 # Tasks scheduled for today
 today=$(date +"%Y-%m-%d")
 grep -B1 "SCHEDULED: <$today" ~/desktop/org/todos.org
-```
 
-### Show by Priority
-```bash
 # High priority tasks
 grep "^\*\* TODO \[#[12]\]" ~/desktop/org/todos.org
 ```
 
-### Show by Category
-```bash
-# Work tasks
-sed -n '/^\* Work/,/^\* [A-Z]/p' ~/desktop/org/todos.org | grep "^\*\* TODO\|^\*\* NEXT"
-
-# Systems tasks
-sed -n '/^\* Systems/,/^\* [A-Z]/p' ~/desktop/org/todos.org | grep "^\*\* TODO\|^\*\* NEXT"
-```
-
 ## Suggested Workflows
 
 ### 1. Daily Review