agentleFS
alanalvestechalanalvestech/hitank/skills/notion/SKILL.md

notion

Skill38 starsChanged 8 months agoMITView on GitHub

Manage Notion pages, databases, blocks and users via REST API

98 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use taskflow-inbox-triage, voice-call and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AtomicBot-aiSkill

    taskflow-inbox-triage

    Also in 6 projects that use this

  • seedprodSkill

    voice-call

    Start voice calls via the OpenClaw voice-call plugin.

    Also in 17 projects that use this

  • jiulingyunSkill

    BlueBubbles

    为Clawdbot构建或更新BlueBubbles外部通道插件(扩展包,REST发送/探测,webhook入站)。

    Also in 17 projects that use this

  • seedprodSkill

    session-logs

    Search and analyze your own session logs (older/parent conversations) using jq.

    Also in 17 projects that use this

  • hkyutongSkill

    openclaw-release-maintainer

    Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.

    Also in 4 projects that use this

  • AtomicBot-aiSkill

    taskflow

    Also in 6 projects that use this

  • +5 more from seedprod

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 93 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the output is OK, proceed to the Flow section.

    line 39
  2. Very specific:

    If the output is SETUP_NEEDED, guide the user step by step.

    line 41
  3. Distinctive:

    If the script outputs an error, the token is invalid.

    line 61
  4. Very specific:

    All requests include the Notion-Version: 2022-06-28 header

    line 159

“Common” is measured: kept by at least 6 in 10 of the 93 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/notion

Connect to Notion to search, manage pages, query databases, edit blocks and list users. Pure Ruby, zero gems — stdlib only.

Structure

scripts/
├── auth.rb              # Bearer token auth + notion_request helper (required by all scripts)
├── check_setup.rb       # Check if token exists (outputs OK or SETUP_NEEDED)
├── save_token.rb        # Save and validate an integration token
├── search.rb            # Search pages and databases
├── databases.rb         # List databases
├── database.rb          # Get database details and properties
├── query_database.rb    # Query a database
├── pages.rb             # List pages
├── page.rb              # Get page details
├── create_page.rb       # Create a page
├── update_page.rb       # Update page properties
├── blocks.rb            # List child blocks
├── append_blocks.rb     # Append blocks to a page
├── delete_block.rb      # Delete a block
└── users.rb             # List users

Setup (check before using)

ruby ~/.claude/skills/notion/scripts/check_setup.rb

If the output is OK, proceed to the Flow section.

If the output is SETUP_NEEDED, guide the user step by step. Present ONE step at a time, wait for the user to confirm before moving to the next.

Step 1 — Ask the user to create an integration:

You need a Notion integration token.

  1. Go to https://www.notion.so/my-integrations
  2. Click New integration
  3. Give it a name, select the workspace
  4. Copy the Internal Integration Secret (starts with secret_)
  5. Share the pages/databases you want to access with the integration (open the page, click ... > Connections > add your integration)

Paste the integration token here.

Step 2 — When the user pastes the token, save it:

ruby ~/.claude/skills/notion/scripts/save_token.rb 'PASTED_TOKEN'

If the script outputs an error, the token is invalid. Ask the user to double-check and try again.

If setup is not complete, DO NOT proceed to the Flow. Complete all steps first.

Flow

The argument $ARGUMENTS may contain an action or page title.

Step 1: Search or list

ruby ~/.claude/skills/notion/scripts/search.rb "QUERY"
ruby ~/.claude/skills/notion/scripts/pages.rb
ruby ~/.claude/skills/notion/scripts/databases.rb

Present the results and ask what the user wants to do.

Step 2: Actions

Search pages and databases:

ruby ~/.claude/skills/notion/scripts/search.rb "QUERY" --filter page
ruby ~/.claude/skills/notion/scripts/search.rb "QUERY" --filter database --page-size 10

List databases:

ruby ~/.claude/skills/notion/scripts/databases.rb

Get database details:

ruby ~/.claude/skills/notion/scripts/database.rb DATABASE_ID

Query a database:

ruby ~/.claude/skills/notion/scripts/query_database.rb DATABASE_ID --page-size 20

List pages:

ruby ~/.claude/skills/notion/scripts/pages.rb
ruby ~/.claude/skills/notion/scripts/pages.rb "QUERY" --page-size 10

Get page details:

ruby ~/.claude/skills/notion/scripts/page.rb PAGE_ID

Create a page under a page (requires user confirmation):

ruby ~/.claude/skills/notion/scripts/create_page.rb PARENT_PAGE_ID "My New Page"

Create a page in a database (requires user confirmation):

ruby ~/.claude/skills/notion/scripts/create_page.rb DATABASE_ID "New Entry" --database

Update page properties (requires user confirmation):

ruby ~/.claude/skills/notion/scripts/update_page.rb PAGE_ID "Name" "New Title"
ruby ~/.claude/skills/notion/scripts/update_page.rb PAGE_ID "Description" "Updated text"

List child blocks:

ruby ~/.claude/skills/notion/scripts/blocks.rb PAGE_ID
ruby ~/.claude/skills/notion/scripts/blocks.rb PAGE_ID --page-size 50

Append blocks to a page (requires user confirmation):

ruby ~/.claude/skills/notion/scripts/append_blocks.rb PAGE_ID "Hello world"
ruby ~/.claude/skills/notion/scripts/append_blocks.rb PAGE_ID "My Heading" --type heading_1
ruby ~/.claude/skills/notion/scripts/append_blocks.rb PAGE_ID "Buy groceries" --type to_do
ruby ~/.claude/skills/notion/scripts/append_blocks.rb PAGE_ID "console.log('hi')" --type code

Block types: paragraph (default), heading_1, heading_2, heading_3, bulleted_list_item, numbered_list_item, to_do, code

Delete a block (requires user confirmation):

ruby ~/.claude/skills/notion/scripts/delete_block.rb BLOCK_ID

List users:

ruby ~/.claude/skills/notion/scripts/users.rb

Notes

  • Pure Ruby, zero gems — stdlib only (json, net/http, uri, fileutils)
  • Auth via Bearer token (Internal Integration Secret starting with secret_)
  • All requests include the Notion-Version: 2022-06-28 header
  • Token file: ~/.config/notion/token (outside the repo, never commit)
  • Base URL: https://api.notion.com/v1
  • Pages/databases must be shared with the integration to be accessible
  • Creating pages, updating properties, appending/deleting blocks require explicit user confirmation

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.