# Obsidian Tasks Query

> Creates Obsidian Tasks plugin query blocks with filters, sorting, grouping, and layout options. Use when the user asks to build a task dashboard, show overdue tasks, list tasks by priority, create a task view or report in a note, write a tasks code block, group tasks by project, filter tasks by folder or date, make a weekly review page, or anything involving a tasks query block in markdown.

- **Type:** Skill
- **Install:** `agentstack add skill-lexbritvin-obsidian-skills-pack-obsidian-tasks-query`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [lexbritvin](https://agentstack.voostack.com/s/lexbritvin)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [lexbritvin](https://github.com/lexbritvin)
- **Source:** https://github.com/lexbritvin/obsidian-skills-pack/tree/main/skills/obsidian-tasks-query

## Install

```sh
agentstack add skill-lexbritvin-obsidian-skills-pack-obsidian-tasks-query
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Creating Task Queries

Write `tasks` code blocks in markdown notes. The Tasks plugin renders them as live, filtered views of tasks across the vault.

## Query Block Syntax

````markdown
```tasks
not done
due before tomorrow
sort by priority
```
````

Each line is a separate instruction. All filter lines must match (implicit AND). Queries are case-insensitive except boolean operators (`AND`, `OR`, `NOT` must be UPPERCASE — lowercase is silently ignored). Add `explain` to any query to debug how Tasks interprets it.

## Common Patterns

**Overdue tasks:**
````markdown
```tasks
not done
due before today
sort by due
```
````

**Due this week, grouped by file:**
````markdown
```tasks
not done
due this week
group by filename
sort by due
```
````

**High priority:**
````markdown
```tasks
not done
(priority is highest) OR (priority is high)
sort by due
```
````

**Exclude folders:**
````markdown
```tasks
not done
(folder does not include Templates) AND (folder does not include Archive)
sort by due
```
````

**Backlog (no dates):**
````markdown
```tasks
not done
no due date
no scheduled date
sort by path
limit 20
```
````

These cover the most common cases. For anything more complex — date ranges, custom scripting, regex filters, layout options — read the reference files below.

## Overriding the Global Query

The Tasks plugin has a `globalQuery` setting (Settings → Tasks → Global query) that prepends to every query block. To run a block without it — for example a "show everything" view, or to look at items the user has globally hidden — add `ignore global query` as the first line:

````markdown
```tasks
ignore global query
not done
group by filename
```
````

This disables the entire globalQuery for that block. Selective override of individual lines is not supported — it's all or nothing. Use this when you specifically want to surface tasks the global filter normally hides (e.g. items tagged `#wishlist` or `#learning` in frontmatter).

## Boolean Filters

Combine multiple conditions on a single line with operators:

```
(filter 1) AND (filter 2)
(filter 1) OR (filter 2)
NOT (filter 1)
(filter 1) AND NOT (filter 2)
```

Operators must be UPPERCASE — this is a common mistake. `and`/`or` in lowercase are silently ignored, making the query behave unexpectedly. Delimiters: `()`, `[]`, `{}`, `""` (don't mix types on one line).

## Reference Documentation

Read these when the inline patterns above aren't enough:

- [Query Reference](references/QUERY_REFERENCE.md) — complete filter, sorting, grouping, layout options, boolean combinations, and custom scripting. Read when you need a specific filter syntax or want to check available sort/group fields.
- [Examples](references/EXAMPLES.md) — more query recipes including dependencies, compact views, task trees, and date category grouping. Read when building a complex dashboard or looking for inspiration.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [lexbritvin](https://github.com/lexbritvin)
- **Source:** [lexbritvin/obsidian-skills-pack](https://github.com/lexbritvin/obsidian-skills-pack)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-lexbritvin-obsidian-skills-pack-obsidian-tasks-query
- Seller: https://agentstack.voostack.com/s/lexbritvin
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
