agentleFS
EnakoneschniyEnakoneschniy/claude-dev-stack/skills/notion-importer/SKILL.md

notion-importer

Skill5 starsChanged 8 months agoMITView on GitHub

Import Notion pages into project vault via MCP. Trigger when user wants to import or sync Notion content into the vault: "import notion", "notion docs", "sync notion", "импортируй notion", "обнови notion", "sync notion pages", "обнови notion docs". Uses the claude.ai Notion MCP server (notion-fetch tool) directly from a live Claude session. Does NOT spawn subprocesses.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 1 is distinctive, and 11 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 11

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Import Notion pages into the project vault using the claude.ai Notion MCP server.

    line 13
  2. Very specific:

    Run claude-dev-stack notion add <url> to add pages.

    line 24
  3. Very specific:

    Determine vault path: Use the vault_path field from the page config (default: docs/notion).

    line 43
  4. Distinctive:

    If file does not exist → create it with stamp (status: created)

    line 60
  5. Very specific:

    If notion_content_hash in frontmatter matches hash of new content → skip (status: unchanged)

    line 61
  6. Very specific:

    If local body hash matches stored notion_content_hash (no local edits) → overwrite in place (status: updated)

    line 62
  7. Very specific:

    If local body hash differs from stored notion_content_hash (local edits detected) → write {filename}.notion-update.md sibling and warn …

    line 63
  8. Very specific:

    Filename convention: Use the page title for the filename, cleaned with the same rules as cleanNotionFilename() in lib/docs.mjs — strip …

    line 65
  9. Very specific:

    Do NOT spawn node, claude mcp call, or any subprocess.

    line 74
  10. Very specific:

    After import, existing notebooklm sync picks up the new files automatically.

    line 76
  11. Very specific:

    If the Notion MCP server is not configured, run: claude mcp add notion

    line 77
  12. Very specific:

    Check MCP status: claude mcp list

    line 78

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Notion Importer Skill

Import Notion pages into the project vault using the claude.ai Notion MCP server. This skill calls MCP tools directly from a live Claude session — no subprocess needed.

Trigger Phrases

English: "import notion", "notion docs", "sync notion", "sync notion pages", "import notion pages" Russian: "импортируй notion", "обнови notion", "обнови notion docs", "синхронизируй notion"

Required Setup

The project must have .claude/notion_pages.json configured. Run claude-dev-stack notion add <url> to add pages.

Import Steps

  1. Read config: Load .claude/notion_pages.json to get the list of pages.
cat .claude/notion_pages.json
  1. Fetch each page: For each page in config.pages, call the notion-fetch MCP tool with the page_id to retrieve markdown content. Use the MCP tool directly:
notion-fetch(page_id: "<page_id>")

Or use notion-search MCP tool if you need to locate pages by title.

  1. Determine vault path: Use the vault_path field from the page config (default: docs/notion). Resolve against the vault project directory: vault/projects/{project-slug}/docs/notion/
  2. Write with provenance: Each imported file gets a frontmatter stamp:
---
notion_page_id: <page_id>
notion_last_synced: <ISO timestamp>
notion_content_hash: <SHA-256 of content below frontmatter>
---

<page content>
  1. 3-way hash check (overwrite protection, per D-06):
    • If file does not exist → create it with stamp (status: created)
    • If notion_content_hash in frontmatter matches hash of new content → skip (status: unchanged)
    • If local body hash matches stored notion_content_hash (no local edits) → overwrite in place (status: updated)
    • If local body hash differs from stored notion_content_hash (local edits detected) → write {filename}.notion-update.md sibling and warn (status: conflict)
  2. Filename convention: Use the page title for the filename, cleaned with the same rules as cleanNotionFilename() in lib/docs.mjs — strip Notion UUID suffixes, lowercase, replace spaces with hyphens. Example: My Page abc123... → my-page.md
  3. Report results: Print a summary of created/updated/unchanged/conflict counts.

Important Notes

  • Use MCP tools directly — call notion-fetch or notion-search from the Claude session. Do NOT spawn node, claude mcp call, or any subprocess.
  • The notion_pages.json config is per-project (.claude/notion_pages.json).
  • After import, existing notebooklm sync picks up the new files automatically.
  • If the Notion MCP server is not configured, run: claude mcp add notion
  • Check MCP status: claude mcp list

Example Session

User: импортируй notion
Claude: [reads .claude/notion_pages.json]
        [calls notion-fetch(page_id: "abc123...") via MCP]
        [writes vault/projects/myproject/docs/notion/my-page.md with frontmatter]
        Summary: 1 created, 0 updated, 0 unchanged, 0 conflicts

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.