[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B0DTKEFTMX85W976RGJYVN":3,"skill-same:01M7B0DTKEFTMX85W976RGJYVN":77},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":14,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M7B0DTKEFTMX85W976RGJYVN","mcp-notion-patterns",null,"Patterns for using the Notion MCP server with mcp-cli.","dbillion\u002Fhermes-skills-public","dbillion","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F49393855?v=4","01M7AVH8QPGCM8WKWS22TRT0T6","Oludayo Adeoye","01M7AVH8RD1JJWA0YS9CFEWAV9",0,"MIT","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fmcp\u002Fmcp-notion-patterns\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: mcp-notion-patterns\ndescription: \"Patterns for using the Notion MCP server with mcp-cli.\"\nversion: 0.2.0\nauthor: community\nlicense: MIT\nplatforms: [linux, macos, windows]\nprerequisites:\n  env_vars: [NOTION_TOKEN]\n  alt_config_path: ~\u002F.mcp_servers.json\nmetadata:\n  hermes:\n    tags: [MCP, Notion, Productivity, Database, API, CLI]\n    homepage: https:\u002F\u002Fdevelopers.notion.com\n---\n\n# MCP Notion Patterns\n\nThis skill provides patterns for working with the Notion MCP server (`@notionhq\u002Fnotion-mcp-server`) via `mcp-cli`.\n\n## WORKFLOW RULE (user preference — non-negotiable on this project)\n\n**When a Notion MCP is configured and reachable, drive page create\u002Fimport\u002Fread through `mcp-cli call notion ...` — do NOT hand-roll raw `curl`\u002F`urllib` blocks against the Notion REST API.** The user explicitly pushed back when an export was done via raw HTTP instead of the MCP (\"why are you not using the mcp that talks directly to notion api using mcp-cli that can direct it accurately\"). The MCP path is:\n- less error-prone (no manual auth header juggling),\n- the path the user expects by default,\n- fully capable of full-fidelity page import via the `markdown` body (see references\u002Fmcp-cli-notion-bulk-import.md).\n\nUse raw HTTP only as a fallback when the MCP tool genuinely lacks the needed capability (e.g. archiving many pages in bulk, or paginating >100 children).\n\n### Why this rule exists (user signal)\nDuring a 4-vault Obsidian→Notion export the agent first used hand-rolled `curl`\u002F`urllib` against the REST API. The user stopped it with: *\"why are you not using the mcp that talks directly to notion api using mcp-cli that can direct it accurately\"*. Lesson: when a Notion MCP is configured, **default to `mcp-cli call notion ...`** without being asked. Reaching for curl first reads as the wrong path to this user even when curl would work.\n\n### Dispatch gotchas (learned hands-on)\n- **Pass args via `subprocess input=`, never as an argv string.** Large markdown bodies hit OS `ARG_MAX` (\"Argument list too long\") for notes >~150 KB. In Python: `subprocess.run([\"mcp-cli\",\"call\",\"notion\",tool], input=json.dumps(args).encode(), capture_output=True, text=False)`.\n- **Empty search:** `API-post-search` with no args or `{}` returns 0 results. To enumerate everything, pass `{\"query\":\"\"}` (empty string, not omitted). Broad `query:\"a\"` also returns 0 — search matches titles\u002Ftext, not wildcards.\n- **Response envelope:** unwrap `content[0].text` before `json.loads`. See `references\u002Fmcp-cli-notion-bulk-import.md`.\n- **Run bulk jobs in background** (`background=true`, `notify_on_complete=true`) — each call cold-spawns `npx` (~5–7 s); 400+ calls block a foreground loop.\n\n## Setup\n\nEnsure you have the Notion MCP server configured in `~\u002F.mcp_servers.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"notion\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@notionhq\u002Fnotion-mcp-server@latest\"],\n      \"env\": {\n        \"NOTION_TOKEN\": \"ntn_your_token_here\"\n      }\n    }\n  }\n}\n```\n\nThe server reads `NOTION_TOKEN` from the environment.\n\n## Pattern: Enumerating Accessible Databases\n\nTo find which databases (data sources) the integration can access, use `API-post-search` with an empty query. The results may include pages inside databases and the data sources themselves.\n\n```bash\nmcp-cli call notion API-post-search '{}' 2>\u002Fdev\u002Fnull > \u002Ftmp\u002Fnotion_search.json\n```\n\n### Extracting Data Source IDs\n\nFilter the results for objects with `\"object\": \"data_source\"` to get the database IDs needed for `API-query-data-source`.\n\n**Using jq:**\n```bash\njq '.results[] | select(.object == \"data_source\") | .id' \u002Ftmp\u002Fnotion_search.json\n```\n\n**Using python3:**\n```bash\npython3 -c \"import json; data=json.load(open('\u002Ftmp\u002Fnotion_search.json')); [print(r['id']) for r in data['results'] if r.get('object') == 'data_source']\"\n```\n\n### If No Data Sources Appear\n\nIf the filtering returns no results, the integration likely has not been granted access to any databases. In Notion, share the desired database with the integration:\n1. Open the database in Notion.\n2. Click \"Share\" → \"Connect\" → select your integration.\n\n## Pattern: Querying a Database\n\nOnce you have a `data_source_id`, use `API-query-data-source` to retrieve rows. The tool expects JSON input via stdin.\n\nExample: Get all rows from a database:\n```bash\necho '{\"data_source_id\": \"your-data-source-id-here\"}' | mcp-cli call notion API-query-data-source\n```\n\nExample: Filter by a select property:\n```bash\necho '{\"data_source_id\": \"your-data-source-id-here\", \"filter\": {\"property\": \"Status\", \"select\": {\"equals\": \"Done\"}}}' | mcp-cli call notion API-query-data-source\n```\n\n## Pattern: Creating a Page in a Database\n\nTo create a new page in a database, use `API-post-page`. You need the `database_id` (not the data_source_id). The `database_id` can be found in the parent of a page inside the database, or by retrieving the data source and looking for `database_id` in its properties (though the MCP server may not expose it directly).\n\nAlternatively, you can use the `ntn` CLI or HTTP API to create a page if you have the `database_id`.\n\n## Bulk import \u002F Obsidian export (deep dive)\n\nThe reference `references\u002Fmcp-cli-notion-bulk-import.md` covers the non-obvious, hard-won behaviors for bulk page creation:\n- the `mcp-cli` response envelope (unwrap `content[0].text`),\n- `API-post-page` accepting a `markdown` body for full-fidelity import,\n- `API-update-page-markdown` is diff-based (NOT a body setter),\n- the ~50 KB markdown body cap and how to split large notes,\n- `child_page.title` location for fast child enumeration,\n- idempotency \u002F duplicate-page avoidance,\n- wikilink and embed limitations.\n\nA ready-to-run bulk exporter lives at `scripts\u002Fmcp_notion_markdown_exporter.py` (TSV of title+markdown-file → Notion pages, with auto-chunking and envelope unwrap). Read the reference before any multi-page export.\n\n## Troubleshooting\n\n- **401 Unauthorized**: Verify `NOTION_TOKEN` is set correctly (not `NOTION_API_KEY`).\n- **Empty results from API-post-search**: Check that the integration is shared with the desired pages\u002Fdatabases.\n- **Tool call timeouts**: Use `MCP_NO_DAEMON=1` prefix to force fresh connections.\n- **mcp-cli returns zero bytes**: The MCP server may be failing silently. Fall back to direct HTTP calls using the token from `~\u002F.mcp_servers.json`.\n\n## Notes\n\n- The Notion MCP server uses the API version specified by the server; ensure it matches your integration's expectations.\n- Rate limits apply (~3 requests\u002Fsecond average).\n- For rich page creation with blocks, prefer the MCP server over raw API calls.\n","# MCP Notion Patterns\n\nThis skill provides patterns for working with the Notion MCP server (`@notionhq\u002Fnotion-mcp-server`) via `mcp-cli`.\n\n## WORKFLOW RULE (user preference — non-negotiable on this project)\n\n**When a Notion MCP is configured and reachable, drive page create\u002Fimport\u002Fread through `mcp-cli call notion ...` — do NOT hand-roll raw `curl`\u002F`urllib` blocks against the Notion REST API.** The user explicitly pushed back when an export was done via raw HTTP instead of the MCP (\"why are you not using the mcp that talks directly to notion api using mcp-cli that can direct it accurately\"). The MCP path is:\n- less error-prone (no manual auth header juggling),\n- the path the user expects by default,\n- fully capable of full-fidelity page import via the `markdown` body (see references\u002Fmcp-cli-notion-bulk-import.md).\n\nUse raw HTTP only as a fallback when the MCP tool genuinely lacks the needed capability (e.g. archiving many pages in bulk, or paginating >100 children).\n\n### Why this rule exists (user signal)\nDuring a 4-vault Obsidian→Notion export the agent first used hand-rolled `curl`\u002F`urllib` against the REST API. The user stopped it with: *\"why are you not using the mcp that talks directly to notion api using mcp-cli that can direct it accurately\"*. Lesson: when a Notion MCP is configured, **default to `mcp-cli call notion ...`** without being asked. Reaching for curl first reads as the wrong path to this user even when curl would work.\n\n### Dispatch gotchas (learned hands-on)\n- **Pass args via `subprocess input=`, never as an argv string.** Large markdown bodies hit OS `ARG_MAX` (\"Argument list too long\") for notes >~150 KB. In Python: `subprocess.run([\"mcp-cli\",\"call\",\"notion\",tool], input=json.dumps(args).encode(), capture_output=True, text=False)`.\n- **Empty search:** `API-post-search` with no args or `{}` returns 0 results. To enumerate everything, pass `{\"query\":\"\"}` (empty string, not omitted). Broad `query:\"a\"` also returns 0 — search matches titles\u002Ftext, not wildcards.\n- **Response envelope:** unwrap `content[0].text` before `json.loads`. See `references\u002Fmcp-cli-notion-bulk-import.md`.\n- **Run bulk jobs in background** (`background=true`, `notify_on_complete=true`) — each call cold-spawns `npx` (~5–7 s); 400+ calls block a foreground loop.\n\n## Setup\n\nEnsure you have the Notion MCP server configured in `~\u002F.mcp_servers.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"notion\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@notionhq\u002Fnotion-mcp-server@latest\"],\n      \"env\": {\n        \"NOTION_TOKEN\": \"ntn_your_token_here\"\n      }\n    }\n  }\n}\n```\n\nThe server reads `NOTION_TOKEN` from the environment.\n\n## Pattern: Enumerating Accessible Databases\n\nTo find which databases (data sources) the integration can access, use `API-post-search` with an empty query. The results may include pages inside databases and the data sources themselves.\n\n```bash\nmcp-cli call notion API-post-search '{}' 2>\u002Fdev\u002Fnull > \u002Ftmp\u002Fnotion_search.json\n```\n\n### Extracting Data Source IDs\n\nFilter the results for objects with `\"object\": \"data_source\"` to get the database IDs needed for `API-query-data-source`.\n\n**Using jq:**\n```bash\njq '.results[] | select(.object == \"data_source\") | .id' \u002Ftmp\u002Fnotion_search.json\n```\n\n**Using python3:**\n```bash\npython3 -c \"import json; data=json.load(open('\u002Ftmp\u002Fnotion_search.json')); [print(r['id']) for r in data['results'] if r.get('object') == 'data_source']\"\n```\n\n### If No Data Sources Appear\n\nIf the filtering returns no results, the integration likely has not been granted access to any databases. In Notion, share the desired database with the integration:\n1. Open the database in Notion.\n2. Click \"Share\" → \"Connect\" → select your integration.\n\n## Pattern: Querying a Database\n\nOnce you have a `data_source_id`, use `API-query-data-source` to retrieve rows. The tool expects JSON input via stdin.\n\nExample: Get all rows from a database:\n```bash\necho '{\"data_source_id\": \"your-data-source-id-here\"}' | mcp-cli call notion API-query-data-source\n```\n\nExample: Filter by a select property:\n```bash\necho '{\"data_source_id\": \"your-data-source-id-here\", \"filter\": {\"property\": \"Status\", \"select\": {\"equals\": \"Done\"}}}' | mcp-cli call notion API-query-data-source\n```\n\n## Pattern: Creating a Page in a Database\n\nTo create a new page in a database, use `API-post-page`. You need the `database_id` (not the data_source_id). The `database_id` can be found in the parent of a page inside the database, or by retrieving the data source and looking for `database_id` in its properties (though the MCP server may not expose it directly).\n\nAlternatively, you can use the `ntn` CLI or HTTP API to create a page if you have the `database_id`.\n\n## Bulk import \u002F Obsidian export (deep dive)\n\nThe reference `references\u002Fmcp-cli-notion-bulk-import.md` covers the non-obvious, hard-won behaviors for bulk page creation:\n- the `mcp-cli` response envelope (unwrap `content[0].text`),\n- `API-post-page` accepting a `markdown` body for full-fidelity import,\n- `API-update-page-markdown` is diff-based (NOT a body setter),\n- the ~50 KB markdown body cap and how to split large notes,\n- `child_page.title` location for fast child enumeration,\n- idempotency \u002F duplicate-page avoidance,\n- wikilink and embed limitations.\n\nA ready-to-run bulk exporter lives at `scripts\u002Fmcp_notion_markdown_exporter.py` (TSV of title+markdown-file → Notion pages, with auto-chunking and envelope unwrap). Read the reference before any multi-page export.\n\n## Troubleshooting\n\n- **401 Unauthorized**: Verify `NOTION_TOKEN` is set correctly (not `NOTION_API_KEY`).\n- **Empty results from API-post-search**: Check that the integration is shared with the desired pages\u002Fdatabases.\n- **Tool call timeouts**: Use `MCP_NO_DAEMON=1` prefix to force fresh connections.\n- **mcp-cli returns zero bytes**: The MCP server may be failing silently. Fall back to direct HTTP calls using the token from `~\u002F.mcp_servers.json`.\n\n## Notes\n\n- The Notion MCP server uses the API version specified by the server; ensure it matches your integration's expectations.\n- Rate limits apply (~3 requests\u002Fsecond average).\n- For rich page creation with blocks, prefer the MCP server over raw API calls.\n",{"name":5,"author":24,"license":15,"version":25,"metadata":26,"platforms":36,"description":7,"prerequisites":40},"community","0.2.0",{"hermes":27},{"tags":28,"homepage":35},[29,30,31,32,33,34],"MCP","Notion","Productivity","Database","API","CLI","https:\u002F\u002Fdevelopers.notion.com",[37,38,39],"linux","macos","windows",{"env_vars":41,"alt_config_path":43},[42],"NOTION_TOKEN","~\u002F.mcp_servers.json","master","f341c46fed021656175d5c9ccc67a72126e50bfb","skills\u002Fmcp\u002Fmcp-notion-patterns","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public","https:\u002F\u002Fgithub.com\u002Fdbillion","I enjoy writing codes,teaching programming, solving problems, tasted automation in Python and never looked back😋😋😋💞","2026-10-14 03:31:55",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add dbillion\u002Fhermes-skills-public --skill mcp-notion-patterns",{"tool":57,"command":58},"bunx","bunx skills add dbillion\u002Fhermes-skills-public --skill mcp-notion-patterns",{"tool":60,"command":61},"pnpm","pnpm dlx skills add dbillion\u002Fhermes-skills-public --skill mcp-notion-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fmcp\u002Fmcp-notion-patterns\u002FSKILL.md",true,[65,71],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Fmcp-cli-notion-bulk-import.md","REFERENCE","参考文档",5106,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fmcp\u002Fmcp-notion-patterns\u002Freferences\u002Fmcp-cli-notion-bulk-import.md",{"path":72,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":76},"scripts\u002Fmcp_notion_markdown_exporter.py","SCRIPT","脚本",3415,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fmcp\u002Fmcp-notion-patterns\u002Fscripts\u002Fmcp_notion_markdown_exporter.py",[78,85,92,101,108,115],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7B25T0V7RBKES86Y3RTXQRN","blocked-page-recovery","Use when a fetch fails: 403\u002F429, paywall, WAF, bot wall.","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fweb\u002Fblocked-page-recovery\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7B25DSBBMZRHVD28MAX7N5X","gemini-vision-fallback","Vision fallback: Gemini REST API if vision_analyze blocked.","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fvision\u002Fgemini-vision-fallback\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":96,"licenseFileUrl":97,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M7B22XW9QXT2ZWWXVZDFWYZP","twitter-cli","Use twitter-cli for ALL Twitter\u002FX operations — reading tweets, posting, replying, quoting, liking, retweeting, following, searching, user lookups. Invoke whenever user requests any Twitter interaction.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Ftwitter-cli\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Ftwitter-cli\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":19},"01M7B22QMWY1B4F7BC114RG4S6","prism-scan","Structural analysis through dynamically generated cognitive lenses. Generates the optimal analytical lens for the specific code\u002Fartifact, then executes it. Finds conservation laws, structural invariants, and concrete bugs that vanilla analysis misses. Use on any code file, system design, or text artifact.","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fts-superhermes-prism-scan\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":19},"01M7B22JA5XCAP1ACT6V50WYR1","prism-reflect","Constraint transparency: analyzes an artifact structurally, then analyzes what its own analysis concealed. Produces a conservation law AND a constraint report showing what was maximized, what was sacrificed, and what to investigate next. The only AI skill that knows what it can't see.","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fts-superhermes-prism-reflect\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":19},"01M7B22EB15M75M4X3C52YGDCC","prism-full","Full Prism: multi-pass structural analysis with mandatory adversarial self-correction. Designs custom analytical passes, executes them with chaining, then attacks its own findings before synthesizing. Use for maximum depth on important code or artifacts.","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fts-superhermes-prism-full\u002FSKILL.md",[],[]]