notion-sdk

notion-sdk is a skill for Claude Code from terrylica/cc-skills. It costs 29 tokens per session (2,571 once invoked), scanned A, original, MIT.

A Python workflow for controlling Notion through its official software interface. Notion is a workspace for pages, databases, and content blocks; the workflow can create, query, and update those objects after receiving an integration token.

In plain words
What is it for?
Use it to create Notion pages or databases, query Notion databases, add text or code blocks, and automate Notion work with Python.
Why use it?
It avoids manually repeating Notion operations and makes the required access check explicit before changing data. It supports both database queries and page-content updates.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Part of the productivity-tools plugin — 8 skills shipped together , and of cc-skills

Good fit Use it to create Notion pages or databases, query Notion databases, add text or code blocks, and automate Notion work with Python.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/terrylica/cc-skills/notion-sdk
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add terrylica/cc-skills --skill notion-sdk
Clone the repo
git clone --depth 1 https://github.com/terrylica/cc-skills

Made for: Claude Code.

Or install productivity-tools, the plugin that ships this one along with the rest of its 8 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for notion-sdk

README.md
[![agentmods](https://agentmods.dev/badge/skills/terrylica/cc-skills/notion-sdk/github.svg)](https://agentmods.dev/skills/terrylica/cc-skills/notion-sdk)
Your own site
<a href="https://agentmods.dev/skills/terrylica/cc-skills/notion-sdk"><img src="https://agentmods.dev/badge/skills/terrylica/cc-skills/notion-sdk/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for notion-sdk

Your own site · 80×15
<a href="https://agentmods.dev/skills/terrylica/cc-skills/notion-sdk"><img src="https://agentmods.dev/badge/skills/terrylica/cc-skills/notion-sdk.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,571 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Rogue Agent · line 335
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00029 $0.02571
Opus 5 $0.00015 $0.01286
Sonnet 5 $0.00006 $0.00514
Haiku 4.5 $0.00003 $0.00257

Measured 5d ago against content hash 439783b002cc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

notion-sdk scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 9 executable files (scripts/add_blocks.py, scripts/create_page.py, scripts/notion_wrapper.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/productivity-tools/skills/notion-sdk/SKILL.md · 338 lines

How it starts

The opening of the file, as written. The whole thing — 338 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Notion SDK Skill

Control Notion programmatically using the official notion-client Python SDK. See PyPI for current version.

Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.

When to Use This Skill

Use this skill when:

  • Creating pages or databases in Notion via API
  • Querying Notion databases programmatically
  • Adding blocks (text, code, headings) to Notion pages
  • Automating Notion workflows with Python
  • Integrating external data sources with Notion

Preflight: Token Collection

Before any Notion API operation, collect the integration token:

AskUserQuestion(questions=[{
    "question": "Please provide your Notion Integration Token (starts with ntn_ or secret_)",
    "header": "Notion Token",
    "options": [
        {"label": "I have a token ready", "description": "Token from notion.so/my-integrations"},
        {"label": "Need to create one", "description": "Go to notion.so/my-integrations → New integration"}
    ],
    "multiSelect": false
}])

After user provides token:

  1. Validate format (must start with ntn_ or secret_)
  2. Test with validate_token() from scripts/notion_wrapper.py
  3. Remind user: Each page/database must be shared with the integration

Quick Start

1. Create a Page in Database

from notion_client import Client
from scripts.create_page import (
    create_database_page,
    title_property,
    status_property,
    date_property,
)

client = Client(auth="ntn_...")
page = create_database_page(
    client,
    data_source_id="abc123...",  # Database ID
    properties={
        "Name": title_property("My New Task"),
        "Status": status_property("In Progress"),
        "Due Date": date_property("2025-12-31"),
    }
)
print(f"Created: {page['url']}")

2. Add Content Blocks

from scripts.add_blocks import (
    append_blocks,
    heading,
    paragraph,
    bullet,
    code_block,
    callout,
)

blocks = [
    heading("Overview", level=2),
    paragraph("This page was created via the Notion API."),
    callout("Remember to share the page with your integration!", emoji="⚠️"),
    heading("Tasks", level=3),
    bullet("First task"),
    bullet("Second task"),
    code_block("print('Hello, Notion!')", language="python"),
]
append_blocks(client, page["id"], blocks)

Read the full file on GitHub · 338 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 338 lines · 29 tokens per session scan A 439783b002cc

Subscribe to this mod's changes

notion-sdk is a skill published in the GitHub repository terrylica/cc-skills (72 stars, last pushed today), licensed MIT. It adds 29 tokens to every session and 2,571 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.