org-queries
How to query my personal org files.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
How to query my personal org files.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | org-queries |
| description | How to query my personal org files. |
For my personal TODO tracking, I use emacs org-mode. The files live in the ~/org
directory. For ease of use, I have a script named org-query that hits my
running emacs instance and produces structured json output for common
queries.
All queries run against files defined in org-agenda-files.
org-query <command> [tags]
| Command | Description |
|---|---|
todos | All entries with any TODO state |
active | Active entries (TODO, NEXT, REVIEW, DEPLOY) |
next | Only NEXT entries |
scheduled | Only entries with a SCHEDULED date |
deadlines | Only entries with a DEADLINE date |
Optional second argument filters by tags:
org-query active work # active items tagged :work:
org-query scheduled work,home # scheduled items tagged :work: or :home:
JSON array of entries:
[
{
"heading": "Write documentation",
"state": "NEXT",
"file": "/Users/me/org/projects.org",
"line": 42,
"tags": ["work", "docs"],
"scheduled": "2026-02-01",
"deadline": "2026-02-05"
}
]
You can pipe the output to a program like jq to slice out specific bits of
data.
If you are looking at work TODOs, always use the 'work' tag.