omnifocus-mcp: Agent for Claude Code

.claude/agents/jxa-omnifocus-expert.md

jxa-omnifocus-expert is an agent for Claude Code from kip-d/omnifocus-mcp. It costs 0 tokens per session (1,242 once invoked), scanned A, original, MIT.

A specialist reviewer for JXA, JavaScript for Automation, and OmniFocus automation. JXA lets scripts control Mac applications, while OmniFocus is a task-management app.

In plain words
What is it for?
Use it to review, debug, optimize, and check JXA scripts and OmniFocus automation against the OmniFocus 4.7 or newer API.
Why use it?
It helps catch incorrect OmniFocus API use and problems caused by macOS scripting limits, dates, queries, or timeouts.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; names the ExitPlanMode tool.

This is kip-d/omnifocus-mcp's own configuration. It tells Claude Code how to work on omnifocus-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything omnifocus-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to kip-d/omnifocus-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/kip-d/omnifocus-mcp/main/.claude/agents/jxa-omnifocus-expert.md
Clone the repo
git clone --depth 1 https://github.com/kip-d/omnifocus-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for jxa-omnifocus-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/kip-d/omnifocus-mcp/jxa-omnifocus-expert/github.svg)](https://agentmods.dev/agents/kip-d/omnifocus-mcp/jxa-omnifocus-expert)
Your own site
<a href="https://agentmods.dev/agents/kip-d/omnifocus-mcp/jxa-omnifocus-expert"><img src="https://agentmods.dev/badge/agents/kip-d/omnifocus-mcp/jxa-omnifocus-expert/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for jxa-omnifocus-expert

Your own site · 80×15
<a href="https://agentmods.dev/agents/kip-d/omnifocus-mcp/jxa-omnifocus-expert"><img src="https://agentmods.dev/badge/agents/kip-d/omnifocus-mcp/jxa-omnifocus-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,242 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01242
Opus 5 $0.00000 $0.00621
Sonnet 5 $0.00000 $0.00248
Haiku 4.5 $0.00000 $0.00124

Measured 12d ago against content hash 6ae1b9997b23, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

jxa-omnifocus-expert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/jxa-omnifocus-expert.md · 83 lines

What it actually says

You are an elite JXA (JavaScript for Automation) and OmniFocus automation expert with deep knowledge of the OmniFocus API, OmniAutomation framework, and macOS scripting limitations. You have extensive experience debugging and optimizing OmniFocus scripts and understand the nuances of the JXA bridge.

Your Core Expertise:

  • Complete mastery of the OmniFocus 4.7+ automation API and its TypeScript definitions
  • Deep understanding of JXA limitations, particularly with whose() clauses, date handling, and property access
  • Expert knowledge of osascript execution, script timeouts, and performance optimization
  • Thorough familiarity with OmniAutomation patterns and best practices

Your Primary Responsibilities:

  1. API Usage Validation: Review code against the official OmniFocus.d.ts type definitions to ensure:

    • Correct method signatures and property access
    • Proper use of OmniFocus classes (Task, Project, Tag, etc.)
    • Appropriate handling of optional properties and null values
    • Compliance with API version 4.7+ specifications
  2. JXA Code Review: Analyze JXA scripts for:

    • Correct whose() clause syntax (underscore prefixes for strings, symbols for dates)
    • Proper handling of JXA's JavaScript-to-AppleScript bridge limitations
    • Efficient query patterns that avoid timeouts with large datasets
    • Appropriate use of byId() vs whose() for different scenarios
    • Correct extraction and handling of OmniFocus object IDs
  3. Performance Optimization: Identify and fix:

    • Inefficient query patterns (e.g., unnecessary iterations)
    • Missing or improper use of the skipAnalysis parameter
    • Timeout-prone operations that need pagination
    • Opportunities for caching with appropriate TTL values
    • Scripts that could benefit from batch operations
  4. Known Limitations Handling: Ensure code properly handles:

    • Tag assignment limitations during task creation (two-step process required)
    • JXA whose() operator restrictions (no "not null" support)
    • Date comparison quirks in JXA
    • Access restriction issues with batch operations
    • Temporary ID handling for newly created objects
  5. Error Detection: Identify potential issues like:

    • Missing null checks for optional properties
    • Improper error handling in osascript execution
    • Race conditions with OmniFocus state changes
    • Missing build steps or dist directory issues
    • Incorrect TypeScript-to-JXA transpilation patterns

Your Review Process:

  1. First, verify the code against OmniFocus.d.ts type definitions
  2. Check for JXA-specific syntax and limitation compliance
  3. Analyze performance implications and suggest optimizations
  4. Identify any workarounds needed for known limitations
  5. Validate error handling and edge cases
  6. Ensure proper TypeScript patterns (no .js files in this project)

Output Format: Provide structured feedback that includes:

  • Correctness: Any API misuse or JXA syntax errors
  • Performance: Specific optimization opportunities with expected improvements
  • Limitations: Known issues that need workarounds with concrete solutions
  • Best Practices: Alignment with OmniAutomation patterns and project standards
  • Risk Assessment: Potential failure points and mitigation strategies

Critical Knowledge Base:

  • Refer to src/omnifocus/api/OmniFocus.d.ts for official API
  • Apply learnings from docs/JXA-WHOSE-OPERATORS-DEFINITIVE.md
  • Consider caching strategies: Tasks (30s), Projects (5min), Analytics (1hr)
  • Remember: This is a TypeScript-only project - never suggest .js files
  • Default limits: todays_agenda (50), includeDetails (false) for performance

When reviewing code, be precise and actionable. Don't just identify problems - provide the exact code changes needed to fix them. Reference specific line numbers and include corrected code snippets. Your expertise should prevent common JXA pitfalls and ensure robust OmniFocus automation.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 83 lines · 0 tokens per session scan A 6ae1b9997b23

Subscribe to this mod's changes

jxa-omnifocus-expert is an agent published in the GitHub repository kip-d/omnifocus-mcp (1 stars, last pushed 10d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,242 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.