Notion agent cli
A Claude Code plugin that adds task-level Notion actions with markdown-first I/O for faster, lower-friction agent workflows
npx -y skills add jgorostegui/notion-agent-cli --skill notion-agent-cliAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Notion workspace operations via CLI. TRIGGER when the user asks to read, create, edit, copy, merge, split, move, query, search, archive, export, or batch-update Notion pages, databases, or properties — including "duplicate a page", "find duplicates", "compare pages", "replace a section", "add a comment", "apply a template", or "workspace map". Also trigger for casual requests like "what's in my Notion?", "update that database", "copy my meeting notes", "check for stale pages", or "show workspace overview". DO NOT TRIGGER for general web scraping, non-Notion APIs, or discussion about this plugin's implementation, source code, or repository internals.
SKILL.md
4.4 KB, as published. Nobody here has run it
CLI
node ${CLAUDE_PLUGIN_ROOT}/scripts/actions.mjs <action> [args...]
Run actions directly. If the decision tree does not cover your case, run schema <action> for live metadata. Prefer schema over reading source.
Quick Patterns
- Read + summarize/report ->
getPage->createPage(2 calls) - Copy with modifications ->
copyPageWith(1 call) - Merge pages ->
createPage->mergePages(2 calls) - Batch property update ->
batchSetProperties(1 call)
Decision Tree
- Find something ->
search "query"orworkspaceMap - Read a page ->
getPage <id> - Query a database ->
queryDatabase <dbId>(markdown table;--format rawfor JSON) - Create a page ->
createPage <parentId> "Title" "markdown content" - Replace all content ->
updatePage <id> "content" - Add to end ->
appendBlocks <id> "content" - Update properties ->
setProperties <id> '{"Status":"Done"}' - Markdown table to database ->
importTable <parentId> "| md | table |" --title "Name"(infers column types) - Full copy with subpages ->
deepCopy <src> <parent> - Copy + modify ->
copyPageWith <src> <parent> "Title" --appendMd "## Extra" - Merge pages ->
mergePages '["id1","id2"]' <target> - Read one section ->
extractSection <id> "Heading" - Edit one section ->
replaceSection <id> "Heading" "new content" - Batch update ->
batchSetProperties '["id1","id2"]' '{"Status":"Done"}'
Key Behaviors
- Page reads and database queries return markdown by default.
getPageandextractSectionreturn markdown.queryDatabasereturns a compact markdown table with row IDs for follow-up actions. setPropertiesauto-types values from the database schema. Pass{"Status": "Done"}— no raw Notion API format needed.createPageaccepts markdown as the content argument.- Compound actions save turns — each CLI call is one agentic turn:
copyPageWith= read + modify + create in 1 callmergePages= N reads + merge in 1 call (target must exist; usecreatePagefirst)batchSetProperties= N updates in 1 call
- Stdin mode for large content:
echo '{"action":"createPage",...}' | node ${CLAUDE_PLUGIN_ROOT}/scripts/actions.mjs - - Auto-snapshot before destructive operations.
Common Pitfalls
- Do NOT fetch database entries individually —
queryDatabasereturns all in one call - Do NOT use
getPage+createPagewhencopyPageWithdoes both in one call - Do NOT use multiple
setPropertieswhenbatchSetPropertieshandles N pages - Do NOT read the script source — use
schema <action>or the references below mergePagestarget must already exist — usecreatePagefirst to create it- Large content (>4KB) should use stdin mode, not inline CLI args
- Properties are auto-typed from the database schema — pass simple values like
{"Status": "Done"}, not raw Notion API format - File/image URLs expire after ~1 hour — re-fetch if reusing later
References
references/action-reference.md— Read when you need exact parameter names or options for an unfamiliar action.references/workflows.md— Read when combining operations or piping large content via stdin.references/api-limits.md— Read when hitting API errors, size limits, or unexpected behavior.