omnifocus-2

Manage OmniFocus tasks via JavaScript for Automation (JXA) scripts. Use when the user asks Clawdbot to interact with OmniFocus, including - (1) Adding tasks to inbox, (2) Listing or searching tasks (inbox, available, flagged, overdue, due soon), (3) Completing tasks, (4) Updating task properties (notes, due dates, flags), (5) Getting OmniFocus statistics, (6) Reporting on task status, or (7) Acting on tasks in OmniFocus based on user queries.

533 stars

Best use case

omnifocus-2 is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Manage OmniFocus tasks via JavaScript for Automation (JXA) scripts. Use when the user asks Clawdbot to interact with OmniFocus, including - (1) Adding tasks to inbox, (2) Listing or searching tasks (inbox, available, flagged, overdue, due soon), (3) Completing tasks, (4) Updating task properties (notes, due dates, flags), (5) Getting OmniFocus statistics, (6) Reporting on task status, or (7) Acting on tasks in OmniFocus based on user queries.

Teams using omnifocus-2 should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/omnifocus-2/SKILL.md --create-dirs "https://raw.githubusercontent.com/sundial-org/awesome-openclaw-skills/main/skills/omnifocus-2/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/omnifocus-2/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How omnifocus-2 Compares

Feature / Agentomnifocus-2Standard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Manage OmniFocus tasks via JavaScript for Automation (JXA) scripts. Use when the user asks Clawdbot to interact with OmniFocus, including - (1) Adding tasks to inbox, (2) Listing or searching tasks (inbox, available, flagged, overdue, due soon), (3) Completing tasks, (4) Updating task properties (notes, due dates, flags), (5) Getting OmniFocus statistics, (6) Reporting on task status, or (7) Acting on tasks in OmniFocus based on user queries.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# OmniFocus Task Management

Automate OmniFocus task management via JavaScript for Automation (JXA) scripts.

## Quick Start

All scripts are located in the `scripts/` directory and use JXA. Run with:

```bash
osascript -l JavaScript scripts/<script-name>.js [args]
```

**Key Scripts:**
- `add_task.js` - Add task to inbox
- `list_tasks.js` - List tasks with filters
- `search_tasks.js` - Search tasks by keyword
- `complete_task.js` - Complete a task by name
- `update_task.js` - Update task properties
- `get_stats.js` - Get OmniFocus statistics

## Core Operations

### Adding Tasks

```bash
osascript -l JavaScript scripts/add_task.js "Task name" ["Note"] ["YYYY-MM-DD"]
```

**Examples:**
```bash
osascript -l JavaScript scripts/add_task.js "Buy groceries"
osascript -l JavaScript scripts/add_task.js "Review doc" "Check sections 1-3"
osascript -l JavaScript scripts/add_task.js "Submit report" "Q1" "2026-01-31"
```

**Returns:** Task ID

### Listing Tasks

```bash
osascript -l JavaScript scripts/list_tasks.js [filter] [limit]
```

**Filters:**
- `inbox` - Inbox tasks
- `available` - Available (unblocked) tasks (default)
- `flagged` - Flagged tasks
- `due-soon` - Due within 3 days
- `overdue` - Past due
- `all` - All incomplete tasks

**Returns:** JSON array with task details (name, id, note, dueDate, flagged, project, tags)

### Searching Tasks

```bash
osascript -l JavaScript scripts/search_tasks.js "keyword" [limit]
```

Searches task names and notes. Case-insensitive.

**Returns:** JSON array of matching tasks

### Completing Tasks

```bash
osascript -l JavaScript scripts/complete_task.js "Task name"
```

Searches inbox first, then all tasks. Completes first match.

### Updating Tasks

```bash
osascript -l JavaScript scripts/update_task.js "Task name" [--note "text"] [--due "YYYY-MM-DD"] [--flag true/false]
```

**Examples:**
```bash
osascript -l JavaScript scripts/update_task.js "Review" --note "Added notes"
osascript -l JavaScript scripts/update_task.js "Submit" --due "2026-02-01"
osascript -l JavaScript scripts/update_task.js "Important" --flag true
```

### Getting Statistics

```bash
osascript -l JavaScript scripts/get_stats.js
```

**Returns:** JSON with counts:
- total, incomplete, inbox
- flagged, overdue, dueSoon
- available, blocked

## Usage Guidelines

### When Responding to User Queries

1. **List tasks** before acting on them to confirm targets
2. **Parse JSON output** for structured processing
3. **Present results** in user-friendly format (not raw JSON)
4. **Confirm operations** before completing or modifying tasks
5. **Handle errors gracefully** (task not found, etc.)

### Common Patterns

**Daily Review:**
```bash
# Statistics overview
osascript -l JavaScript scripts/get_stats.js

# What needs attention
osascript -l JavaScript scripts/list_tasks.js overdue
osascript -l JavaScript scripts/list_tasks.js due-soon
```

**Task Queries:**
```bash
# "What's in my inbox?"
osascript -l JavaScript scripts/list_tasks.js inbox

# "What are my next actions?"
osascript -l JavaScript scripts/list_tasks.js available 10

# "Show my flagged tasks"
osascript -l JavaScript scripts/list_tasks.js flagged
```

**Task Management:**
```bash
# "Add a task to call John"
osascript -l JavaScript scripts/add_task.js "Call John"

# "Find tasks about the project"
osascript -l JavaScript scripts/search_tasks.js "project"

# "Mark 'Buy milk' as complete"
osascript -l JavaScript scripts/complete_task.js "Buy milk"

# "Flag the review task"
osascript -l JavaScript scripts/update_task.js "Review" --flag true
```

### Output Handling

Scripts return JSON for structured data. When presenting to users:

1. Parse the JSON
2. Format results clearly
3. Summarize counts and key information
4. Highlight urgent items (overdue, due soon)

**Example response format:**
```
Found 3 overdue tasks:
• Submit Q1 report (due Jan 20)
• Review contract (due Jan 23)
• Call vendor (due Jan 24)

And 5 tasks due in the next 3 days:
• [list tasks]

Would you like me to flag or update any of these?
```

### Error Handling

Common errors:
- **Task not found** - Double-check name or search first
- **No tasks** - Empty result, report clearly
- **Invalid date** - Use YYYY-MM-DD format
- **OmniFocus not running** - Scripts require OmniFocus

### Multi-Step Operations

**Find then act:**
```bash
# 1. Search for task
RESULTS=$(osascript -l JavaScript scripts/search_tasks.js "meeting")

# 2. Parse and identify target task name

# 3. Complete the task
osascript -l JavaScript scripts/complete_task.js "Team meeting notes"
```

## Technical Reference

For detailed API information and advanced usage, see:
- **JXA API Reference:** `references/jxa-api.md` - Object model and methods
- **Automation Guide:** `references/automation-guide.md` - Detailed script documentation and workflows

Read these files when:
- Building complex queries
- Understanding OmniFocus data model
- Implementing custom workflows
- Debugging scripts

## Requirements

- macOS
- OmniFocus installed and running
- Scripts have execute permissions (chmod +x)

## Notes

- Scripts use JXA (JavaScript for Automation), not AppleScript
- Task matching is case-sensitive for exact names, case-insensitive for searches
- Date format: YYYY-MM-DD (ISO 8601)
- All operations are performed on the default OmniFocus document
- Scripts are read-only safe except for add, complete, and update operations

Related Skills

omnifocus

533
from sundial-org/awesome-openclaw-skills

Manage OmniFocus tasks, projects, and folders via Omni Automation. Use for task management, to-do lists, project tracking, GTD workflows, adding/completing/editing tasks, setting due dates, managing tags, and recurring tasks. Requires OmniFocus installed on macOS.

portfolio-watcher

533
from sundial-org/awesome-openclaw-skills

Monitor stock/crypto holdings, get price alerts, track portfolio performance

portainer

533
from sundial-org/awesome-openclaw-skills

Control Docker containers and stacks via Portainer API. List containers, start/stop/restart, view logs, and redeploy stacks from git.

portable-tools

533
from sundial-org/awesome-openclaw-skills

Build cross-device tools without hardcoding paths or account names

polymarket

533
from sundial-org/awesome-openclaw-skills

Trade prediction markets on Polymarket. Analyze odds, place bets, track positions, automate alerts, and maximize returns from event outcomes. Covers sports, politics, entertainment, and more.

polymarket-traiding-bot

533
from sundial-org/awesome-openclaw-skills

No description provided.

polymarket-analysis

533
from sundial-org/awesome-openclaw-skills

Analyze Polymarket prediction markets for trading edges. Pair Cost arbitrage, whale tracking, sentiment analysis, momentum signals, user profile tracking. No execution.

polymarket-agent

533
from sundial-org/awesome-openclaw-skills

Autonomous prediction market agent - analyzes markets, researches news, and identifies trading opportunities

polymarket-5

533
from sundial-org/awesome-openclaw-skills

Query Polymarket prediction markets. Use for questions about prediction markets, betting odds, market prices, event probabilities, or when user asks about Polymarket data.

polymarket-4

533
from sundial-org/awesome-openclaw-skills

Query Polymarket prediction markets. Use for questions about prediction markets, betting odds, market prices, event probabilities, or when user asks about Polymarket data.

polymarket-3

533
from sundial-org/awesome-openclaw-skills

Query Polymarket prediction market odds and events via CLI. Search for markets, get current prices, list events by category. Supports sports betting (NFL, NBA, soccer/EPL, Champions League), politics, crypto, elections, geopolitics. Real money markets = more accurate than polls. No API key required. Use when asked about odds, probabilities, predictions, or "what are the chances of X".

polymarket-2

533
from sundial-org/awesome-openclaw-skills

Query Polymarket prediction markets - check odds, trending markets, search events, track prices.