Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Notion Batch Writer — Claude Code Skill

A Claude Code skill that lets you batch-write structured data (CSV, JSON, Markdown tables) into Notion databases via the Notion MCP integration. Write-only by design — no delete operations allowed.

Features

  • Batch create Notion databases with auto-detected schemas
  • Bulk insert up to 100 pages per API call from CSV/JSON/Markdown
  • Auto-map data types to Notion property types (Title, Number, Select, Checkbox, Date, etc.)
  • Create-only by default — skill prohibits delete operations; updates require explicit user approval
  • Progress reporting — shows batch-by-batch progress for large datasets

Prerequisites

  1. Claude Code installed
  2. Notion MCP integration enabled in Claude Code (Settings → Connected Apps → Notion)
  3. Notion workspace with appropriate permissions

Installation

Option A: Add as a project skill (recommended)

# In your project directory
mkdir -p .claude/skills/notion-batch-writer
curl -o .claude/skills/notion-batch-writer/SKILL.md \
  https://raw.githubusercontent.com/jquser3-blip/notion-batch-writer/main/notion-batch-writer/SKILL.md

Option B: Add as a global skill

mkdir -p ~/.claude/skills/notion-batch-writer
curl -o ~/.claude/skills/notion-batch-writer/SKILL.md \
  https://raw.githubusercontent.com/jquser3-blip/notion-batch-writer/main/notion-batch-writer/SKILL.md

Usage

Once installed, just describe what you want in Claude Code:

把這個 CSV 寫入 Notion
Write this JSON file to a new Notion database
Import strategies.csv into my existing "Trading Strategies" database
從 Markdown 表格建立 Notion 資料庫

Example 1: CSV → New Notion Database

> 把 data/strategies.csv 寫入 Notion,建在「交易筆記」頁面下面

Claude will:

  1. Read strategies.csv
  2. Auto-detect columns and types
  3. Show you a preview and ask to confirm
  4. Create the database under "交易筆記"
  5. Batch-insert all rows
  6. Return the database URL

Example 2: JSON → Existing Database

> 把 results.json 的資料加到現有的 Notion 資料庫 "Backtest Results"

Claude will:

  1. Read results.json
  2. Search Notion for "Backtest Results" database
  3. Fetch the schema and map fields
  4. Insert all entries

Example 3: Markdown Table → Notion

> 把下面的表格寫入 Notion:
>
> | 策略 | 勝率 | 年化 |
> |------|------|------|
> | IBS  | 64%  | 12%  |
> | TPE  | 72%  | 22%  |

Supported Input Formats

Format How to use
CSV Point to a .csv file path
JSON Point to a .json file (array of objects)
Markdown table Paste inline or point to a .md file

Supported Notion Property Types

Notion Type Auto-detected from
Title First text column or column named "Name"/"Title"
Rich Text Free-form text columns
Number Numeric values
Select Columns with repeating categorical values
Multi-Select Comma-separated tag lists
Checkbox Yes/No, True/False, 1/0 values
Date ISO date strings, common date formats
URL Strings starting with http/https
Email Strings with @ symbol
Unique ID Auto-increment identifiers

Safety Design

This skill is create-only by default:

  • Default mode appends new pages only — no overwrites, no deletes
  • Updates require explicit user approval with exact page ID
  • Only uses notion-create-database, notion-create-pages, notion-search, notion-fetch, and notion-update-page
  • notion-update-page restricted to update_properties and update_content (never replace_content)
  • allow_deleting_content is always false
  • disable-model-invocation: true — Claude will never auto-trigger this skill; user must invoke it explicitly
  • Dry-run preview before every first write
  • Duplicate detection: skips rows whose title already exists (configurable)

Limitations

  • Maximum 100 pages per batch (Notion API limit)
  • Cannot create relation properties to databases that don't exist yet
  • Cannot upload files/images as property values
  • SELECT options are auto-created if they don't exist in the schema

License

MIT

Contributing

Issues and PRs welcome at github.com/jquser3-blip/notion-batch-writer

About

Claude Code skill: batch-write CSV/JSON/Markdown into Notion databases (write-only, no delete)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors