roamresearch

Roam Research operations via roam-cli. Use this skill for page/block retrieval, search, datalog queries, markdown save, journaling lookup, and low-level block or batch writes with environment-injected credentials.

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 "roamresearch" with this command: npx skills add leechael/roamresearch-skills/leechael-roamresearch-skills-roamresearch

RoamResearch Skill

Use this skill to perform Roam Research read/write/query workflows through roam-cli.

Prerequisites

  • roam-cli binary in PATH
  • Environment variables: ROAM_API_TOKEN, ROAM_API_GRAPH
  • Run roam-cli status to verify before any operations

If not set up, see references/installation.md.

Command Mapping

CommandPurpose
getRead page by title or block by UID
searchSearch blocks by terms
qRun raw datalog query
saveSave GFM markdown as a page, daily page, or under a parent block
journalRead daily journaling blocks
block findFind block UID by text on a page/daily note
block create-treeCreate nested block tree from JSON (preferred for multi-block writes)
block create/update/delete/move/getLow-level single-block operations
batch runBatch actions (native + create-with-children DSL)

Run roam-cli help <category> for categorized usage examples. Categories: read, write, workflow, or all.

Write Strategy (critical — read this first)

Minimize API calls. Every tool call costs tokens. Use the highest-level command that fits.

ScenarioUse thisNOT this
Save content to today's daily pagesave --to-daily-pagejournal → parse UID → save --parent
Save content to a specific daily pagesave --to-daily-page 2026-03-14block find --dailysave --parent
Save a long document/article as a pagesave --title "Page Name"Sequential block create
Create a parent with childrenblock create-tree --parent <uid>block create parent → block create child × N
Multiple heterogeneous writesbatch runMultiple individual write calls
Single block, no childrenblock create(this is fine)

Daily page operations

Use --to-daily-page for one-shot writes to daily pages. Do NOT manually construct Roam daily page titles like "March 14th, 2026" — the CLI handles this internally.

# Save markdown to today's daily page
cat note.md | roam-cli save --to-daily-page

# Save to a specific date
cat note.md | roam-cli save --to-daily-page 2026-03-14

# Search/find on a daily page — pass ISO date, CLI auto-resolves
roam-cli search --page 2026-03-14 keyword
roam-cli block find --page 2026-03-14 --text "[[📖 Daily Reading]]"

Anti-patterns — do NOT do these

  • Do NOT call block create in a loop to build a tree. Use block create-tree.
  • Do NOT fire multiple block create in parallel to the same parent. Use batch run or block create-tree.
  • Do NOT do multi-step "find daily page UID → then write". Use save --to-daily-page.
  • Do NOT manually construct "Month DDth, YYYY" date strings. Pass ISO dates (YYYY-MM-DD) to --to-daily-page, --daily, or --page — the CLI converts them.
  • Do NOT add --stdin when piping — it's automatic.

Pipeline Support

All commands that accept input (save, block create-tree, batch run) read from stdin by default when --file is not given. No --stdin flag needed.

echo '{"text":"root","children":[{"text":"child"}]}' | roam-cli block create-tree --parent <uid>
cat note.md | roam-cli save --title "Page Name"
echo '[...]' | roam-cli batch run

block create-tree Input Contract

  • Requires --parent <block-uid>.
  • Accepts JSON from pipe or --file.
  • JSON supports either a single object or an array of objects.
  • Node shape: text (required), children (optional array of nodes).
  • Both text and string keys accepted (text takes precedence).
{"text": "headline", "children": [
  {"text": "point 1"},
  {"text": "point 2", "children": [{"text": "sub-point"}]}
]}

Date Handling

The CLI auto-resolves ISO dates (YYYY-MM-DD) to Roam daily page titles wherever a page reference is expected:

FlagInputResolved to
save --to-daily-page2026-03-14Creates/finds page "March 14th, 2026"
search --page2026-03-14Searches in "March 14th, 2026"
block find --page2026-03-14Finds block in "March 14th, 2026"
block find --daily2026-03-14Finds by daily page UID (existing behavior)
journal --date2026-03-14Reads daily journal (existing behavior)

Recommended Workflow

  1. roam-cli status — verify credentials.
  2. Read: get, search, q, journal, block find.
  3. Write (pick one, in order of preference):
    • Daily page content → save --to-daily-page
    • Long markdown → save --title
    • Structured tree → block create-tree
    • Mixed operations → batch run
    • Single block → block create

Save Markdown (GFM format)

save accepts GFM and auto-converts to Roam blocks:

  • Do NOT include # h1 — title comes from --title or --to-daily-page
  • ##### → headed blocks (levels 4–6 capped to 3)
  • Lists → nested child blocks; ordered lists preserve marker
  • Tables → {{[[table]]}} blocks (must be valid GFM pipe+separator)
  • Code blocks, blockquotes → passed through
  • Horizontal rules → discarded

Full rules: references/gfm-format.md

Error Handling Rules

  • Missing credentials: report missing ROAM_API_TOKEN / ROAM_API_GRAPH.
  • API failures: include HTTP status code and response body.
  • Not found: include the identifier/uid that was requested.

Output Rules

  • Preserve JSON output when --json is requested.
  • Keep default output concise and readable.
  • Never invent Roam data; only report real command results.

Detailed Examples

Run roam-cli help all or see references/usage-examples.md.

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.

General

api-docs

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

Tidal CLI

Control Tidal music streaming from the terminal. Use when the user wants to search Tidal's catalog (artists, albums, tracks, videos, playlists), manage playl...

Registry SourceRecently Updated
Coding

Wip Ai Devops Toolbox Private

Complete DevOps toolkit for AI-assisted software development. Release pipeline, license compliance, copyright enforcement, repo visibility guard, identity fi...

Registry SourceRecently Updated
Coding

AI Remote Work Empire Builder — Find the Best Remote Jobs, Clients & Countries to Build Your Location-Free Income

Find top remote jobs and freelance clients, analyze best countries for geo-arbitrage, build remote business setup, automate client acquisition, and secure wo...

Registry SourceRecently Updated