orcanote-query

Guide for querying/searching data (blocks) in Orca Note.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "orcanote-query" with this command: npx skills add sethyuan/orcanote-agent-skills/sethyuan-orcanote-agent-skills-orcanote-query

Orca Note Querying

This skill provides guidance on how to query blocks in Orca Note using the QueryDescription2 schema. This is used for advanced filtering, search, and data retrieval within repositories.

Query Structure

A query consists of a QueryDescription2 object, which contains a main query group q, sorting options, and pagination settings.

{
  q: QueryGroup2;          // The main query criteria
  sort?: [string, string][]; // e.g., [["_created", "DESC"]]
  page?: number;           // 1-based page number
  pageSize?: number;       // Number of items per page
  randomSeed?: number;     // For stable random sorting
}

Query Groups (Logical Operators)

Groups combine multiple conditions. Every group has a kind and a conditions array.

KindNameDescription
100SELF_ANDAll conditions in the array must match the block.
101SELF_ORAt least one condition in the array must match the block.
106CHAIN_ANDMatches blocks that have a match in their ancestors, descendants, or themselves. Often used within a SELF_AND group to filter results by hierarchy.

Hierarchy Groups

  • 102: ANCESTOR_AND - Matches ancestors of blocks that match conditions.
  • 104: DESCENDANT_AND - Matches descendants of blocks that match conditions.

Condition Types

Each condition object must have a kind field.

KindTypeKey Fieldsdescription
3Journalstart, endJournal blocks within a specific journal date range.
4Tagname, propertiesBlocks with a specific tag. Can filter by tag properties.
6ReferenceblockIdBlocks referencing a specific block ID.
8Texttext, rawBlocks containing specified text.
9Blocktypes, hasParent, hasChild, hasTags, created, modifiedFilter by block metadata and properties.
11TaskcompletedSpecifically for task blocks.
12Block MatchblockIdMatch a specific block by its unique ID.
13Formatf, faMatch content fragments with specific markdown formats (e.g., bold, italic).

Dates (Relative & Absolute)

Used in Journal queries and Block property filters (created/modified).

  • Relative Date: {"t": 1, "v": -7, "u": "d"} (e.g., 7 days ago).
    • t: 1 (Relative)
    • v: Numeric value (positive or negative)
    • u: Unit (s, m, h, d, w, M, y)
  • Absolute Date: {"t": 2, "v": 1640995200000} (Unix timestamp in milliseconds).
    • t: 2 (Absolute)
    • v: Timestamp

Operators (op)

Used for property comparisons (tag properties, block metadata, etc.).

ValueOperatorDescription
1eqEquals
2noteqNot equals
3includesIncludes (for strings or lists)
4notincludesDoes not include
5hasHas property/tag
6nothasDoes not have
7gtGreater than
8ltLess than
9geGreater than or equal
10leLess than or equal
11nullIs null / empty
12notnullIs not null / not empty

Sorting & Pagination

Sorting

Specified as an array of tuples: [field, direction].

  • Fields: _created, _modified, _text, _journal, _refcount.
  • Direction: "ASC" or "DESC".

Example: [["_created", "DESC"], ["_text", "ASC"]]

Pagination

  • page: Default is 1.
  • pageSize: Default is 20.

Example Queries

1. Incomplete tasks tagged with "Project A"

{
  "q": {
    "kind": 100,
    "conditions": [
      { "kind": 4, "name": "Project A" },
      { "kind": 11, "completed": false }
    ]
  }
}

2. Blocks containing "deadline" created in the last 7 days

{
  "q": {
    "kind": 100,
    "conditions": [
      { "kind": 8, "text": "deadline" },
      {
        "kind": 9,
        "created": { "op": 9, "value": { "t": 1, "v": -7, "u": "d" } }
      }
    ]
  },
  "sort": [["_created", "DESC"]]
}

3. Hierarchy Search (Chain AND)

Find blocks containing "setup" that are children (or descendants, or parent, or ancestors) of blocks containing "environment".

{
  "q": {
    "kind": 100,
    "conditions": [
      { "kind": 8, "text": "setup" },
      {
        "kind": 106,
        "conditions": [{ "kind": 8, "text": "environment" }]
      }
    ]
  }
}

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

orcanote-reminder

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

orcanote-markdown

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

orcanote-whiteboard

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

orcanote-mermaid

No summary provided by upstream source.

Repository SourceNeeds Review