Agent skill

Notion Hub

by OpenMinis in OpenMinis/MinisSkills

Read and write Notion data using Python + notion-client SDK.

MITAuto-check passedDatabases

Install Notion Hub

skills CLI
$ npx skills add OpenMinis/MinisSkills --skill notion-hub -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install OpenMinis/MinisSkills notion-hub --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/OpenMinis/MinisSkills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/notion-hub .claude/skills/notion-hub && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
notion-hub
GitHub stars
446
Token cost
~2.3k tokens
SKILL.md length
427 words
Files
2 (incl. scripts)
Skills in repo
49
Repo updated
First seen
Licence
MIT

At a glance

Read and write Notion data using Python + notion-client SDK.

  • Works in 6 steps: First time: Run $NH search or $NH search… → Before writing to a database: Run $NH… → Reading a page: Use page-read for… → …
  • This skill whenever the user mentions Notion
  • SKILL.md covers Prerequisites, CLI Script, Commands Reference and Notion Filter Syntax Quick…, plus 5 more sections
  • Runs Python scripts from its folder; calls uv; reaches notion.so and file.png; needs NOTION_API_KEY

What it does

Notion Hub is an agent skill from OpenMinis/MinisSkills. Read and write Notion data using Python + notion-client SDK. Authenticated via NOTIONAPIKEY env var. Supports search, page CRUD (Markdown↔Blocks bidirectional conversion), database schema/query/create/add-row, block-level operations (append/update/delete), and comments. Trigger this skill whenever the user mentions "Notion", "notion", "notion-hub", "Notion page", "Notion database", "read Notion", "write Notion", "Notion API", or any scenario requiring programmatic read/write access to Notion data.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/notion_hub.py`).

It sits in Databases, covering Database schema design. It works with Notion and Python. The repository describes itself as: Skills collection for Minis. The licence is MIT.

When your agent uses it

  • This skill whenever the user mentions Notion
  • Notion database
  • Any scenario requiring programmatic read/write access to Notion data

Example prompts

  • “Notion”
  • “notion”
  • “notion-hub”
  • “/notion-hub”

Requirements

  • Python 3
  • A credential in NOTION_API_KEY

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. First time: Run $NH search or $NH search --filter database to discover accessible pages/databases and get their IDs.
  2. Before writing to a database: Run $NH db-get to see the schema (property names, types, select options).
  3. Reading a page: Use page-read for Markdown output — much more readable than raw blocks.
  4. Writing a page: Use page-write --text with Markdown — the script auto-converts to Notion blocks.
  5. IDs: Both raw UUIDs and full Notion URLs are accepted for all ID parameters.
  6. Pagination: All list/query commands auto-paginate. Use --limit to cap results.

What it can do on your machine

Read from SKILL.md and the folder at commit ae8c5db. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • notion.so
    • file.png

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • NOTION_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Notion Hub loads about 2.3k tokens when it runs. Until then it costs about 129 tokens; SKILL.md has 427 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~129
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from OpenMinis/MinisSkills at commit ae8c5db, republished under its MIT licence (© OpenMinis). 427 words, ~2,262 tokens.

Download SKILL.mdSave it as .claude/skills/notion-hub/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
notion-hub
description
Read and write Notion data using Python + notion-client SDK. Authenticated via NOTION_API_KEY env var. Supports search, page CRUD (Markdown↔Blocks bidirectional conversion), database schema/query/create/add-row, block-level operations (append/update/delete), and comments. Trigger this skill whenever the user mentions "Notion", "notion", "notion-hub", "Notion page", "Notion database", "read Notion", "write Notion", "Notion API", or any scenario requiring programmatic read/write access to Notion data.
version
1.0.0

Notion Hub

Read/write Notion via notion-client Python SDK. All operations through a single CLI script.

Prerequisites

  • Environment variable: NOTION_API_KEY — Notion Internal Integration Token
  • uv: The script uses uv inline script metadata (notion-client>=3.0.0, httpx>=0.27). Dependencies are auto-installed on first uv run, no manual pip install needed.
  • Integration access: The integration must be connected to target pages/databases in Notion UI (Share → Connections → add integration)

CLI Script

Path: /var/minis/skills/notion-hub/scripts/notion_hub.py

Run: uv run --script --cache-dir /root/.cache/uv /var/minis/skills/notion-hub/scripts/notion_hub.py <command> [options]

Alias for brevity:

sh
NH="uv run --script --cache-dir /root/.cache/uv /var/minis/skills/notion-hub/scripts/notion_hub.py"

Commands Reference

Search & Discovery
sh
# Search everything
$NH search "meeting notes"
$NH search "project" --filter page
$NH search --filter database
$NH search "Q1" --sort descending --limit 5

# List users / get bot info
$NH users
$NH users --me
Pages — Read
sh
# Get page properties (compact)
$NH page-get <page_id_or_url>
$NH page-get <page_id> --raw  # full API response

# Read page content as Markdown (best for AI consumption)
$NH page-read <page_id>
$NH page-read <page_id> --depth 5  # deeper recursion
$NH page-read <page_id> -o /var/minis/workspace/page.md  # save to file

# Accepts Notion URLs directly:
$NH page-read "https://notion.so/My-Page-abc123def456..."
Pages — Write
sh
# Create page under another page
$NH page-create --page-id <parent_id> --title "New Page" --icon "📝"

# Create page in a database (= add row with content)
$NH page-create --database-id <db_id> --properties '{"Name":{"title":[{"text":{"content":"Task 1"}}]}}'

# Write Markdown content to a page
$NH page-write <page_id> --text "# Hello\n\nThis is a paragraph.\n\n- Item 1\n- Item 2"

# Write from file
$NH page-write <page_id> --file /var/minis/workspace/content.md

# Replace all existing content
$NH page-write <page_id> --text "Fresh content" --replace

# Update page properties
$NH page-update <page_id> --properties '{"Status":{"status":{"name":"Done"}}}'
$NH page-update <page_id> --icon "✅"
$NH page-update <page_id> --archived true  # archive page
Databases
sh
# Get database schema (shows all properties, types, select options)
$NH db-get <database_id>
$NH db-get <database_id> --raw

# Query database rows
$NH db-query <database_id>
$NH db-query <database_id> --limit 20

# Query with filter
$NH db-query <database_id> --filter '{"property":"Status","status":{"equals":"In Progress"}}'

# Query with sort
$NH db-query <database_id> --sorts '[{"property":"Created","direction":"descending"}]'

# Compound filter
$NH db-query <db_id> --filter '{"and":[{"property":"Status","status":{"equals":"Done"}},{"property":"Priority","select":{"equals":"High"}}]}'

# Quick add a row (auto-detects property types from schema)
$NH db-add-row -d <database_id> --props '{"Name":"My Task","Status":"In Progress","Priority":"High","Due Date":"2024-03-15"}'
$NH db-add-row -d <database_id> --title "Simple row with just a title"

# Create a new database
$NH db-create --page-id <parent_page_id> --title "Task Tracker" --properties '{
  "Name": {"title": {}},
  "Status": {"status": {}},
  "Priority": {"select": {"options": [{"name":"High"},{"name":"Medium"},{"name":"Low"}]}},
  "Due Date": {"date": {}},
  "Tags": {"multi_select": {"options": [{"name":"Bug"},{"name":"Feature"}]}},
  "Assignee": {"people": {}},
  "Done": {"checkbox": {}}
}'

# Update database schema
$NH db-update <db_id> --title "New Title"
$NH db-update <db_id> --properties '{"New Column": {"rich_text": {}}}'
Blocks (Page Content)
sh
# Get top-level blocks of a page
$NH blocks-get <page_id>
$NH blocks-get <page_id> --raw

# Get ALL blocks recursively (full page tree)
$NH blocks-get-all <page_id>
$NH blocks-get-all <page_id> --depth 5

# Append content
$NH block-append <page_id> --text "A new paragraph"
$NH block-append <page_id> --text "Item A\\nItem B\\nItem C" --type bulleted_list_item
$NH block-append <page_id> --blocks '[{"type":"heading_2","heading_2":{"rich_text":[{"text":{"content":"Section"}}]}},{"type":"paragraph","paragraph":{"rich_text":[{"text":{"content":"Content here"}}]}}]'

# Update a specific block
$NH block-update <block_id> --content '{"paragraph":{"rich_text":[{"text":{"content":"Updated text"}}]}}'

# Delete a block
$NH block-delete <block_id>
Comments
sh
# List comments on a page
$NH comments-list <page_id>

# Add a comment to a page
$NH comment-create "This looks good!" --page-id <page_id>

# Reply in a discussion thread
$NH comment-create "Agreed" --discussion-id <discussion_id>

Notion Filter Syntax Quick Reference

json
// Text property
{"property": "Name", "rich_text": {"contains": "keyword"}}

// Select
{"property": "Status", "select": {"equals": "Done"}}

// Multi-select
{"property": "Tags", "multi_select": {"contains": "Bug"}}

// Status
{"property": "Status", "status": {"equals": "In Progress"}}

// Checkbox
{"property": "Done", "checkbox": {"equals": true}}

// Date
{"property": "Due", "date": {"before": "2024-04-01"}}
{"property": "Due", "date": {"on_or_after": "2024-01-01"}}

// Number
{"property": "Score", "number": {"greater_than": 80}}

// Compound (AND)
{"and": [{"property": "Status", "status": {"equals": "Done"}}, {"property": "Priority", "select": {"equals": "High"}}]}

// Compound (OR)
{"or": [{"property": "Status", "status": {"equals": "Done"}}, {"property": "Status", "status": {"equals": "Archived"}}]}

Notion Sort Syntax

json
[{"property": "Created", "direction": "descending"}]
[{"property": "Name", "direction": "ascending"}]
[{"timestamp": "last_edited_time", "direction": "descending"}]

Property Value Syntax for db-add-row --props

The --props JSON maps property names to simple values. The script auto-detects types from the database schema:

TypeValue formatExample
titlestring"My Title"
rich_textstring"Some text"
numbernumber42
selectstring (option name)"High"
multi_selectcomma-separated string or array"Bug,Feature" or ["Bug","Feature"]
statusstring (status name)"In Progress"
dateISO date string or {start, end}"2024-03-15"
checkboxbooleantrue
urlstring"https://..."
emailstring"a@b.com"
relationcomma-separated IDs or array"id1,id2"
peoplecomma-separated user IDs"user_id"
filesURL string or array of URLs"https://file.png"

Workflow Tips

  1. First time: Run $NH search or $NH search --filter database to discover accessible pages/databases and get their IDs.
  2. Before writing to a database: Run $NH db-get <id> to see the schema (property names, types, select options).
  3. Reading a page: Use page-read for Markdown output — much more readable than raw blocks.
  4. Writing a page: Use page-write --text with Markdown — the script auto-converts to Notion blocks.
  5. IDs: Both raw UUIDs and full Notion URLs are accepted for all ID parameters.
  6. Pagination: All list/query commands auto-paginate. Use --limit to cap results.
Show full SKILL.md (126 more words)Show less

Error Handling

All errors return {"error": "..."} JSON. Common issues:

  • 401: Invalid or expired token
  • 403: Integration not connected to the target page/database
  • 404: Page/database not found or not accessible
  • 429: Rate limited (auto-retry is not implemented; wait and retry)

Security Notes

  • NOTION_API_KEY: Never echo, print, or expose the token value in conversation. Always reference via $NOTION_API_KEY.
  • User emails: The users command auto-masks email addresses (e.g. w***3@gmail.com). Do not attempt to retrieve or display full emails.
  • File URLs: Notion internal file URLs contain signed AWS tokens. The script auto-strips these from Markdown/block output. If you need to download a file, use blocks-get --raw and handle the URL in a script without printing it.
  • Recursion depth: blocks-get-all and page-read cap at depth 10 to prevent API call storms.

© OpenMinis, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (scripts) in notion-hub of OpenMinis/MinisSkills.

  • SKILL.md
  • scripts/notion_hub.py

Open the folder on GitHubat commit ae8c5db

Compare with similar skills

Notion Hub next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Notion Hub compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Notion Hub this skillOpenMinis/MinisSkills446—~2.3kAutomated safety check: PassMIT
Add Mpk Taskmirage-project/mirage2.5k—~4.5kAutomated safety check: PassApache-2.0
Saleor Django Migration Rulessaleor/saleor23k—~1.6kAutomated safety check: PassBSD-3-Clause
SQL Schema Policy Validatorrominirani/antigravity-skills592—~264Automated safety check: PassNone
Tushare Plugin BuilderYourdaylight/stock_datasource189—~2.5kAutomated safety check: PassMIT
Modelersidequery/sidemantic129—~4.2kAutomated safety check: PassApache-2.0

Similar skills

  • Add Mpk Task

    mirage-project/mirage

    Step-by-step guide for adding a new task implementation to Mirage Persistent Kernel (MPK).

    2.5k GitHub stars~4.5k tokensUpdated 3 days ago
    DatabasesAuto-check passed
  • Rules for writing Django migrations in Saleor that avoid long table locks and stay compatible with zero-downtime rolling deploys.

    23k GitHub stars~1.6k tokensUpdated yesterday
    DatabasesAuto-check passed
  • SQL Schema Policy Validator

    rominirani/antigravity-skills

    Validates SQL schema files for compliance with internal safety and naming policies.

    592 GitHub stars~264 tokensUpdated 3 mo ago
    DatabasesAuto-check passed
  • Tushare Plugin Builder

    Yourdaylight/stock_datasource

    Turns a Tushare API doc URL into a full data plugin for the stock_datasource repo: extractor, ClickHouse schema, query service, config and curl examples.

    189 GitHub stars~2.5k tokensUpdated 1 mo ago
    Data & AnalyticsAuto-check passed
  • Modeler

    sidequery/sidemantic

    Build, validate, and manage semantic models using Sidemantic.

    129 GitHub stars~4.2k tokensUpdated 3 days ago
    DatabasesAuto-check passed
  • Mas Data Model

    AUTO-MAS-Project/AUTO-MAS

    Define backend data modeling standards for Python services. An agent skill from AUTO-MAS-Project/AUTO-MAS.

    711 GitHub stars~1.6k tokensUpdated today
    DatabasesAuto-check passed

More from OpenMinis/MinisSkills

All 49 skills in this repo
  • Android UI Automation

    OpenMinis/MinisSkills

    Automate Android apps that have no public API or web version by driving the UI layer through the Accessibility Service.

    446 GitHub stars~1.6k tokensUpdated 3 days ago
    Auto-check passed
  • Codex On Ish

    OpenMinis/MinisSkills

    Install and run OpenAI Codex CLI inside the Minis/iSH Alpine sandbox on iOS, where rustls TLS and async sockets are broken.

    446 GitHub stars~1k tokensUpdated 3 days ago
    Auto-check passed
  • Evidence Chain Builder

    OpenMinis/MinisSkills

    Score a claim against the evidence behind it. An agent skill from OpenMinis/MinisSkills.

    446 GitHub stars~2.4k tokensUpdated 3 days ago
    Auto-check passed
  • Hyperframes CLI

    OpenMinis/MinisSkills

    HyperFrames CLI and Minis rendering. An agent skill from OpenMinis/MinisSkills.

    446 GitHub stars~3.5k tokensUpdated 3 days ago
    Auto-check passed
  • Whenpeak

    OpenMinis/MinisSkills

    Predict when a person's brain works best from their sleep, using the WhenPeak performance-intelligence API, and turn it into concrete scheduling advice.

    446 GitHub stars~2.3k tokensUpdated 3 days ago
    Auto-check passed
  • Openstreetmap Marker

    OpenMinis/MinisSkills

    Generate a mobile-first, immersive, Amap(Gaode)-style custom landmark marker HTML map for travel itinerary planning, place showcasing, location sharing, etc.

    446 GitHub stars~1.9k tokensUpdated 3 days ago
    Auto-check passed

Works with

Categories

Questions about Notion Hub

What does Notion Hub do?

Read and write Notion data using Python + notion-client SDK. Notion Hub is an agent skill from OpenMinis/MinisSkills. Read and write Notion data using Python + notion-client SDK.

When should I use Notion Hub?

Notion Hub fits situations like: this skill whenever the user mentions Notion; notion database; any scenario requiring programmatic read/write access to Notion data.

How do I install Notion Hub in Claude Code?

Run `npx skills add OpenMinis/MinisSkills --skill notion-hub -a claude-code`. Or copy the skill folder (notion-hub in OpenMinis/MinisSkills) into .claude/skills/notion-hub in your project. Claude Code loads it when a task matches its description.

How do I install Notion Hub in Codex?

Run `npx skills add OpenMinis/MinisSkills --skill notion-hub -a codex`. Or copy the skill folder (notion-hub in OpenMinis/MinisSkills) into .agents/skills/notion-hub in your project. Codex loads it when a task matches its description.

Can I use Notion Hub in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add OpenMinis/MinisSkills --skill notion-hub -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/notion-hub, .gemini/skills/notion-hub, .github/skills/notion-hub and .opencode/skills/notion-hub in your project.

What does Notion Hub need to run?

Going by SKILL.md and its folder, Notion Hub needs Python for the scripts in its folder, the command-line tools its instructions call (uv) and credentials named NOTION_API_KEY. Our summary lists: Python 3; A credential in NOTION_API_KEY.

Does Notion Hub access the network?

SKILL.md names 2 domains. In commands or code: notion.so and file.png; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is Notion Hub safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Notion Hub use?

Notion Hub is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Notion Hub use?

About 2.3k tokens (SKILL.md is roughly 9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Notion Hub?

Skills that share tags, products or a category with Notion Hub: Add Mpk Task (mirage-project/mirage, 2.5k stars), Saleor Django Migration Rules (saleor/saleor, 23k stars), SQL Schema Policy Validator (rominirani/antigravity-skills, 592 stars) and Tushare Plugin Builder (Yourdaylight/stock_datasource, 189 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Notion Hub?

OpenMinis (a GitHub organization) maintains it in OpenMinis/MinisSkills, which has 446 GitHub stars. The repository holds 49 skills in this directory. The repository was last updated on October 7, 2026.

Source: OpenMinis/MinisSkills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.