Use when you must find tasks or pick entries of a case in Casefile - search_tasks and the query argument of the case readers (get_task_case, list_task_entries, read_entries, the project, area and discussion cases). The query language, order and pages, cursors, what a cut means and how to read the rest.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Casefile Search?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/azimov777-casefile-search)
---
name: casefile-search
description: Use when you must find tasks or pick entries of a case in Casefile - search_tasks and the query argument of the case readers (get_task_case, list_task_entries, read_entries, the project, area and discussion cases). The query language, order and pages, cursors, what a cut means and how to read the rest.
---
# Finding tasks and picking entries in Casefile
One query language serves two jobs: `search_tasks` finds **tasks**, and the `query`
argument of the case readers picks **entries** of one case. The grammar, the operators,
the quoting and the refusals are the same; only the fields differ. The cycle of a task
(entering it, keeping its case, closing it) is the `casefile` skill; this one is for
looking things up. When this text and a tool description differ, the tool is right.
## 1. Which tool
- tasks: `search_tasks`, rows with `fields`, `next_cursor`; no `total`;
- the case of a task: `list_task_entries` (rows without bodies), `get_task_case` (entries
in full, one run), `read_entries` (bodies by `nos`, `types`, `after_no`);
- the case of a project or an area: `list_project_entries`, `get_project_case`,
`get_area_case`, `read_project_entries`; of a discussion: `get_discussion_case`,
`read_project_entries(key="TRK~7")`;
- discussions themselves: `list_discussions(task=, project=, status=, turn=, text=)`;
the tasks attached to one: `search_tasks(query="discussion: TRK~7")`;
- links of a task: `list_task_links`.
Look at titles first (`list_*`), then read the bodies you need. All of these share the
window of section 4.
## 2. The language
A condition is `field: [operator] value`; the operator stands **after** the colon.
Conditions join with `and` and `or`; `and` binds tighter. Parentheses group conditions,
never values.
- no operator means equality; comma-separated values mean membership:
`status: open, in_progress` equals `status: in open, in_progress`;
- operators: `=` `!=` `>` `>=` `<` `<=` `~` (substring, case-insensitive) `!~` `in` `not in`.
Each field takes only some of them; a wrong one is refused;
- a value with a space, a colon or the word `and` goes in double quotes:
`text: ~ "two words"`; inside quotes `\"` is a quote and `\\` a backslash;
- `empty()` is "no value", `!= empty()` is "has a value": `assignee: empty()`;
- no functions, no sorting in the string (tasks sort with `sort=["key"]`), no subqueries.
**Task fields** (`search_tasks`):
- `=` `!=` `in` `not in`: `project`, `area`, `status`, `key`, `parent` (direct children),
`under` (all descendants), `decision` (`TRK#15`), `discussion` (`TRK~7`), `blocked`,
`deferred` (`true` or `false`);
- plus `>` `>=` `<` `<=`: `priority` (`low` `normal` `high` `critical`) and the counters
`open_questions`, `open_blocking_questions`, `open_remarks`, `open_warnings`,
`open_drafts`, `remarks_in_work`;
- plus `~` `!~`: `assignee`, `text` (title or description);
- `last_entry_at`: `=` `!=` `>` `>=` `<` `<=`.
**Entry fields** (the `query` of a case reader):
- `type`: `=` `!=` `in` `not in` (entry types as in `types`);
- `author`: the same plus `~` (a signature, `claude`);
- `no`: the same plus `>` `>=` `<` `<=`;
- `at`, when it was filed: `=` `!=` `>` `>=` `<` `<=`, ISO 8601 in quotes;
- `text`: `~` `!~`, a substring of title or body;
- `in_force`: `true` or `false`, in a project's or an area's case only (decisions and
findings that still hold). A task's or a discussion's case refuses it with
`search_field_unknown`.
A range is two conditions: `at: >= "2026-11-30T00:00:00Z" and at: < "2026-12-01T00:00:00Z"`.
The older arguments (`types`, `nos`, `after_no`, `text`, `in_force`, and on `search_tasks`
`project`, `status`...) still work and join `query` with `and`.
## 3. Examples
Tasks:
```
search_tasks(query="project: TRK and status: open and blocked: false and open_questions: 0")
search_tasks(query="project: TRK and assignee: empty() and priority: >= high")
search_tasks(query='status: in open, in_progress and text: ~ "login form"', fields=["key", "title"])
search_tasks(query="under: TRK-40 and status: != done")
search_tasks(query="area: TRK/mcp and last_entry_at: >= \"2026-11-30T00:00:00Z\"")
search_tasks(query="discussion: TRK~7")
search_tasks(query="decision: TRK#15")
```
Entries of a task, a project, an area, a discussion:
```
list_task_entries(key="TRK-42", query="type: in decision, attempt")
get_task_case(key="TRK-42", page="last", limit=5)
get_task_case(key="TRK-42", query='author: claude and at: >= "2026-11-30T00:00:00Z"')
list_project_entries(key="TRK", query="type: decision and in_force: true")
read_project_entries(key="TRK/mcp", query='text: ~ "cursor" and in_force: true', limit=10)
get_area_case(key="TRK/mcp", order="desc", limit=5)
get_discussion_case(key="TRK~7", query="type: in question, answer, conclusion", page="last", limit=3)
read_entries(key="TRK-42", query="type: verdict and no: > 12")
```
## 4. Reading a case: order, pages, cursors
Eight readers take the same arguments: `query`, `order`, `page`, `limit`, `cursor`.
- `order`: `asc` (default, oldest first) or `desc` (newest first);
- `page`: `first` (default) starts at the beginning of the chosen order, `last` at its
end. With `order="asc"`, `page="last"` and `limit=N` you get the newest N entries, still
oldest-to-newest; with `order="desc"` and `page="last"` you get the oldest N;
- `limit`: the most entries on a page, at least 1. At most 44 for `list_task_entries` and
`list_project_entries`, 48 for `list_discussions`, 97 for `list_task_links`, 200 for
the rest; more is refused with `invalid_page_size` and `max` in `details`;
- `cursor`: the `next_cursor` (forward) or `prev_cursor` (back) of the previous page.
The answer carries `items`, `total` (everything the query selects, at the time of the
call), `shown` (rows on this page), `before` and `after` (selected rows before and after
this page in the order you read, so `before + shown + after = total`), `next_cursor` and `prev_cursor` (null
when there is nothing further that way).
A cursor remembers the tool, the case, `query` and `order`: send the same ones with it.
`limit` may change between pages. A different `query`, `order`, key or tool is refused
with `invalid_cursor`, `reason: cursor_mismatch`; start again without `cursor`. A new entry
filed meanwhile does not shift the pages already read.
## 5. Cuts, and how to know you have it all
- A page is filled by characters as well as by count: fewer than `limit` rows is **not**
the end. The end is `next_cursor: null` (and `after: 0`);
- to be sure you saw everything, walk from the start with the same arguments until
`next_cursor` is null; `total` says up front how many to expect. Entries filed after
the call come after the last page. In `search_tasks` a task changed between pages
jumps to the front of the default order: walk everything with `sort=["key"]`;
- an entry with `body_truncated` has a longer stored body of `body_length` characters;
read the rest with `read_entries(key="TRK-42", nos=[<no>], body_from=<characters read>)`,
and for a project, area or discussion with `read_project_entries(key=..., nos=[<no>],
body_from=...)`;
- a task row cut by `search_tasks` carries `<field>_length`: `get_task` gives the whole
text. A title ending in `…` has `title_length`;
- to count without reading, ask `limit=1` and read `total`.
## 6. Refusals and their repair
- `invalid_search_query` (the string does not parse): `details.position` and
`details.hint` give the right form. Typical slips:
- `status in (open, done)` is SQL; write `status: in open, done`;
- `text: ~ two words` needs quotes: `text: ~ "two words"`;
- a time without quotes: `at: >= "2026-11-30T00:00:00Z"`;
- `!empty()`: write `!= empty()`; `type = decision`: write `type: decision`;
- `search_field_unknown`: `details.allowed` lists the fields of that case or of tasks;
- `search_operator_not_supported`: `details.allowed` lists the operators of that field
(`~` is only for text and signatures; `type: ~ dec` is refused);
- `search_value_invalid`: no such project, status, task or entry type; `details.reason`
names which, `details.allowed` lists the allowed values where there is a list;
- `invalid_page_size`: `limit` outside 1..`max`;
- `invalid_cursor`: the cursor is damaged or belongs to another walk, see section 4.