xs-notion-manager

Implements page search, view, and creation via the Notion API, plus file upload, diary creation with images, and single-block update and deletion. Intended for commands like “search in Notion,” “write a diary in Notion,” “upload file to Notion,” and “modify a single block in Notion.”

Last repository push
GitHub Stars
137
Forks
15
Issues / PRs
0

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "xs-notion-manager" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-863e15c03a47c85e579e49a8d178f380a3363d7e8788829870b9a5b9d089c8d2. Verify the upstream source and version against https://github.com/karaage0703/ai-assistant-workspace before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Implements page search, view, and creation via the Notion API, plus file upload, diary creation with images, and single-block update and deletion. Intended for commands like “search in Notion,” “write a diary in Notion,” “upload file to Notion,” and “modify a single block in Notion.”

0 Downloads

Introduction source: third_party · karaage0703 · 0.0.1 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: xs-notion-manager
description: Notion APIでページ検索・閲覧・作成、ファイルアップロード、画像付き日記作成、個別ブロックの更新・削除を行うスキル。「Notionで検索して」「Notionに日記書いて」「Notionにファイルアップロードして」「Notionの個別ブロックを修正して」で使用。

Notion Manager

Notion APIを使ってページの検索・閲覧・作成、ファイルアップロードを行う。

絶対遵守事項

  • APIキー設定が必要(初回のみ)
  • 対象ページには「接続」許可が必要
  • アップロードは20MB以下は single-part、20MB超は自動で multi-part upload(10MBチャンク)

セットアップ(初回のみ)

  1. https://notion.so/my-integrations でIntegration作成
  2. APIキー(ntn_xxx)をコピー
  3. 設定:
    mkdir -p ~/.config/notion
    echo "ntn_xxxxx" > ~/.config/notion/api_key
  4. 対象ページで「...」→「接続」→ Integration名を選択

コマンド一覧

検索

cd [WORKSPACE]/skills/notion-manager
uv run python notion_tool.py search "検索ワード"
uv run python notion_tool.py search "検索ワード" -t page  # ページのみ
uv run python notion_tool.py search "検索ワード" --json   # JSON出力

ページ読み込み

uv run python notion_tool.py read <page_id>
uv run python notion_tool.py read <page_id> --json
uv run python notion_tool.py read <page_id> --with-ids  # 各ブロックIDを表示(編集対象を特定するため)

ページ作成

uv run python notion_tool.py create <parent_id> "タイトル"
uv run python notion_tool.py create <parent_id> "タイトル" -c "本文"
uv run python notion_tool.py create <db_id> "タイトル" --database  # DB内に作成

ファイルアップロード

# 画像をアップロード(imageブロックとして追加)
uv run python notion_tool.py upload photo.jpg <page_id>

# 動画をアップロード(videoブロックとして追加)
uv run python notion_tool.py upload video.mp4 <page_id>

# ファイルをアップロード(fileブロックとして追加)
uv run python notion_tool.py upload document.pptx <page_id> --as-file

# キャプション付き
uv run python notion_tool.py upload photo.jpg <page_id> -c "東京の風景"

対応形式:

  • 画像: jpg, jpeg, png, gif, webp
  • 動画: mp4, mov, webm, avi, mkv
  • 音声: mp3, wav, m4a, ogg, flac
  • 文書: pdf, pptx, docx, xlsx
  • テキスト: txt, md, csv, json, html

サイズ: 20MB以下は single-part、20MB超は自動で multi-part upload(10MBチャンクで分割→/complete で結合)。

個別ブロックの取得・更新・削除

# 1. ブロックIDを調べる(read --with-ids でページ内の全ブロックIDを表示)
uv run python notion_tool.py read <page_id> --with-ids

# 2. 単一ブロックの取得
uv run python notion_tool.py get-block <block_id>
uv run python notion_tool.py get-block <block_id> --json

# 3. ブロックのテキスト更新(既存タイプを維持)
uv run python notion_tool.py update <block_id> -t "新しいテキスト"

# 4. リンク付きテキストに変更
uv run python notion_tool.py update <block_id> -t "クリックでサイトへ" --link "https://example.com"

# 5. To-doブロックのチェック切替
uv run python notion_tool.py update <block_id> --checked
uv run python notion_tool.py update <block_id> --unchecked

# 6. ブロックタイプを切り替え(段落 ↔ 見出し ↔ 箇条書き等)
uv run python notion_tool.py update <block_id> --type bulleted_list_item    # 段落→箇条書き
uv run python notion_tool.py update <block_id> -l 3                         # 見出し2 → 見出し3
uv run python notion_tool.py update <block_id> --type heading_2 -t "新タイトル"  # テキストも同時変更

# 7. ブロック削除(-y で確認スキップ)
uv run python notion_tool.py delete <block_id> -y

対応ブロックタイプ: paragraph, heading_1〜3, bulleted_list_item, numbered_list_item, to_do, quote, code

注意:

  • Notion API はブロックタイプの直接変更を許可しないため、--type 指定時は 新タイプを直後に挿入 → 旧ブロック削除 で位置を保ちつつ置き換える(新ブロックIDが返る)
  • --type の対応タイプ: paragraph / heading_1〜3 / bulleted_list_item / numbered_list_item / to_do / quote
  • 画像・動画・ファイルブロックは update 非対応 → delete して upload で再投稿
  • delete は archive 扱い(Notion上はゴミ箱に入る、復元可)

ページに追記(append)

# 見出し追加
uv run python notion_tool.py append <page_id> -H "セクション名" -l 2

# テキスト追加
uv run python notion_tool.py append <page_id> -t "本文テキスト"

# 箇条書き追加
uv run python notion_tool.py append <page_id> -b "箇条書きアイテム"

# クリッカブルなリンク付き箇条書き
uv run python notion_tool.py append <page_id> -b "リンクテキスト" --link "https://example.com"

# 複数の箇条書き
uv run python notion_tool.py append <page_id> --bullets "項目1" "項目2" "項目3"

# 長文・コマンド名・URL・特殊文字を含む内容(バックティック / $() / "" / \ など)
# → 必ず --body-file 経由。bash の解釈事故(バックティックがコマンド置換になる等)を防ぐ
uv run python notion_tool.py append <page_id> -F bullet.txt              # default: bullet
uv run python notion_tool.py append <page_id> -F text.txt --as text      # paragraph
uv run python notion_tool.py append <page_id> -F head.txt --as heading   # heading 2
echo "本文 with \`gh pr edit\` and \$(date)" | uv run python notion_tool.py append <page_id> -F -  # stdin

⚠️ -b "..." / -t "..." インラインでは、内容にバックティックや $() を含めない。bash がダブルクォート内のそれらをコマンド置換として解釈し、bullet/text の該当部分が空文字に化ける。コマンド名・URL・特殊文字を含む長文は -F/--body-file 一択。

添付ファイルのダウンロード

read --json で取得した JSON の file ブロックには署名付きURLが入る。curl -sL -o <out> <url> でダウンロード。URLは1時間で期限切れなので取得後すぐに。

日記作成(画像付き)

# シンプルな日記
uv run python notion_tool.py diary <parent_page_id>

# タイトル・内容・画像付き
uv run python notion_tool.py diary <parent_page_id> \
  -t "2026-01-30 日記" \
  -c "今日の出来事" \
  -i photo1.jpg photo2.jpg

Page IDの取得方法

NotionのページURL末尾の32文字(ハイフンなし)がPage ID。 https://notion.so/Page-Title-abc123def456... の abc123def456... 部分。


制限事項・トラブルシューティングは README.md を参照。

Version history

  1. v0.2.2 GitHub ↗
    Original release notes

    ## 変更内容 AIアシスタントの行動指示と既存スキルを、特定のユーザー・マシン・チャットサービスに依存しない形で改善しました。 - 会話再開時は提供済みの文脈を優先し、不足分だけを取得。許可範囲と根拠確認のルールを整理 - 開発手順に初期状態からの検証、ローカルとCIの分担、マージ・配備・再起動の区別を追加 - 原因調査と修正を分離し、回復記録と証拠に基づく再発判定を追加 - リポジトリ分析でGitHubの現行HEADとDeepWikiの索引commitを比較 - 複数AI実行時のGrok設定を分離し、既存の読み取り制限と成果物検証を維持 - スキル改善時の全項目監査と関連ファイルの整合確認を追加 - メモ・日記はローカル保存と読み戻しで完了し、Git同期・Notion保存は任意に整理 - ニュースのRSS全量取得、記事本文・日時・重複の確認、注目記事の選定理由を追加 各手順に対応するREADMEとスキル一覧も更新しています。 ## 検証と留意点 複数AIの回帰テストとGrok設定分離の追加テスト、文書・リンク・構文検査、ニュース取得例の正常応答・空応答・HTTPエラー確認を実施しました。 実CLIの疎通はCursor・Antigravityが成功しました。Codexは確認失敗、Claudeは認証期限切れ、Grokは前置き付き回答により厳密なトークン一致の判定では不合格でした。Grokは別途通常のファイル読み取りで成功を確認しています。文書手順全体と実ニュース要約の通し確認は未実施です。 ## 含まれるPull Request - #24 改善: 行動指示と既存スキルの汎用的な運用手順を更新 ## 完全な変更履歴 <https://github.com/karaage0703/ai-assistant-workspace/compare/v0.2.1...v0.2.2>

  2. v0.2.1 GitHub ↗
    Original release notes

    ## 変更内容 - `trigger.yaml` と `handler.sh` で構成される簡易スキルTriggerを削除 - 同梱していた `technews` / `weather` のTriggerを削除 - READMEとAGENTS.mdから簡易スキルTriggerの案内を削除 ## 維持する機能 - 長時間処理の完了通知に使う `xangi tool trigger` - scheduler - Local LLMの各モード - `skills/` のスキル機構 ## 含まれるPull Request - #23 簡易スキルTriggerを削除 ## 完全な変更履歴 <https://github.com/karaage0703/ai-assistant-workspace/compare/v0.2.0...v0.2.1>

  3. v0.2.0 GitHub ↗
    Original release notes

    ## 主な変更 ### xangiの現行仕様へ対応 - xangiの導入・ワークスペース選択を`xangi setup`へ一本化 - secret設定をローカルの`xangi settings`から行う安全な導線へ更新 - AI向けコマンドを`xangi tool`形式へ移行 - Web UIの公式Extensionカタログからxangi-searchを追加する手順を推奨導線として追加 ### 検索基盤をxangi-searchへ移行 - 同梱していた`xs-workspace-rag`とRAGトリガーを削除 - ワークスペース検索は外部Extensionのxangi-searchを推奨 - xangi-search未導入時は通常のファイル読み取り・文字列検索で利用可能 - AI CLIから直接使う構成も補足導線として維持 ### ワークスペースを汎用化 - 初回設定、記憶、長時間処理、公開操作の安全ルールを整理 - runtime stateや検索indexを公開リポジトリへ混入させないignore設定を追加 - xangi本体とワークスペースの責務を分離し、重複していたオンボーディングを削除 ### multi-agent運用を改善 - Codex、Claude、Grok、Cursor、Antigravityなど、実際に利用できるAIだけを検出して使用 - 読み取り専用実行、空応答・途中終了の除外、provider familyの検証を追加 - 外部AIが利用できない場合も、現在のAIセッションだけで処理を継続 - GitHubへのレビュー投稿は自動実行せず、明示的な確認後に行う構成へ変更 ## 移行時の注意 - `skills/xs-workspace-rag/`と`triggers/rag/`は削除されました - RAGを利用していた場合は、xangi Web UIの「拡張」からxangi-searchを追加してください - 旧`.workspace_rag/`は誤公開防止のため引き続きignoreされます ## 含まれるPull Request - #17 borot運用知見をワークスペースに反映 - #18 ワークスペース初期設定を汎用化 - #19 workspace-RAGの過去文書ランキングを修正 - #20 xangiオンボーディングを本体setupへ統合 - #21 multi-agentとworkspace-RAGを任意機能として汎用化 - #22 xangi仕様への追従と検索基盤の移行 ## 完全な変更履歴 <https://github.com/karaage0703/ai-assistant-workspace/compare/v0.1.0...v0.2.0>

  4. v0.1.0 GitHub ↗
    Original release notes

    ## What's Changed * ワークスペースをアップデート by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/1 * fix: 未定義変数を相対パスに置換、README更新 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/3 * feat: 自発的おしゃべりスキル(spontaneous-talk)を追加 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/2 * feat: スキル群をアップデート(xs:統一・内容充実化・scripts整理) by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/4 * feat: arxiv・code-reviewer スキルを追加 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/5 * feat: MEMORY.md長期記憶の追加 & スキルドキュメント更新 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/6 * feat: workspace-ragバグ修正・改善 & google-workspace & triggers追加 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/7 * fix: !discord/!schedule統一 + skill-creator強化 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/8 * feat: 汎用スキル3つ追加 + トリガー(rag/technews/weather)README整備 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/9 * notion-manager個別ブロック編集 + skill-creatorプロンプト設計原則 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/10 * notion-manager: テキスト系MIME追加と20MB超のmulti-part upload対応 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/11 * feat: なぜなぜ分析(xangi-kaizen)スキルを追加 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/12 * skills: workspace-rag/notion-manager/arxiv を強化 + xangi-onboarding 新設 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/13 * feat(xangi-onboarding): 3モード対応 + 上級スタックチャン連動 + コンテキスト分割 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/14 * xangi-kaizen と開発ワークフローを公開向けに更新 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/15 * スキル名を xs- プレフィックスに統一 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/16 ## New Contributors * @karaage0703 made their first contribution in https://github.com/karaage0703/ai-assistant-workspace/pull/1 **Full Changelog**: https://github.com/karaage0703/ai-assistant-workspace/commits/v0.1.0

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value95/100

Highlights

  • 完整覆盖 Notion 核心操作
  • 支持多类型文件与大小自适应上传
  • 提供块级精细编辑能力
  • 包含特殊字符安全处理指南
Trigger Precision95/100

Highlights

  • 触发词精准覆盖搜索、创建、上传、编辑等典型场景
  • 边界清晰不易误触
Structure and Standards95/100

Highlights

  • 步骤清晰分阶段说明
  • 每个命令均有完整示例
  • 重要警告与限制明确标注
Execution Reliability95/100

Highlights

  • API 使用规范正确
  • 异常处理机制完善
  • 不可逆操作有确认提示
Evidence Verifiability (mean of the first four)95/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Accounts, secrets or authorization

    Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.

    Mentioned in main document · lines 23
Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • example.com
  • notion.so

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.