SuperAPI AI Directory

notion-docs-enhancer

Office & productivity

View repository

Updated 10-16 01:31

About this skill

Notion Document Enhancement Skill

Overview

This Skill helps users quickly create and improve Notion documents through Playwright browser automation, without requiring Notion API authorization.

Core Capabilities

  1. Create/modify page title - Automatically navigate to the page and modify the title
  2. Paste Markdown content - Automatically convert to Notion native format (headings, lists, tables, links)
  3. Clean up redundant content - Delete extra text blocks
  4. Screenshot verification - Automatically take screenshots to confirm the final result

How to Use

Basic Usage

帮我完善这个 Notion 文档:https://www.notion.so/xxx
内容:[你的 Markdown 内容]

Quick Create

在我的 Notion 创建一个关于 [主题] 的文档,包含以下章节:
1. 概述
2. 功能说明
3. 使用指南

Operation Flow

Step 1: Navigate to the page

// 使用 Playwright MCP 工具
await mcp__plugin_playwright_playwright__browser_navigate({
  url: "https://www.notion.so/page-id"
});

Step 2: Wait for the page to load

await mcp__plugin_playwright_playwright__browser_wait_for({
  time: 3  // 等待 3 秒确保页面完全加载
});

Step 3: Modify the title

// 获取页面快照找到标题元素
await mcp__plugin_playwright_playwright__browser_snapshot();

// 点击标题按钮
await mcp__plugin_playwright_playwright__browser_click({
  element: "页面标题",
  ref: "title-ref"
});

// 输入新标题
await mcp__plugin_playwright_playwright__browser_type({
  element: "标题输入框",
  ref: "input-ref",
  text: "新标题"
});

// 确认
await mcp__plugin_playwright_playwright__browser_press_key({
  key: "Enter"
});

Step 4: Paste content (key technique)

// 使用 browser_run_code 执行复杂操作
await mcp__plugin_playwright_playwright__browser_run_code({
  code: `async (page) => {
    const content = \`## 一、概述

你的 Markdown 内容...

## 二、功能说明

| 列1 | 列2 |
|-----|-----|
| 值1 | 值2 |
\`;

    // 写入剪贴板
    await page.evaluate((text) => {
      navigator.clipboard.writeText(text);
    }, content);

    // 等待
    await page.waitForTimeout(500);

    // 粘贴(Notion 会自动转换 Markdown)
    await page.keyboard.press('Meta+v');

    return 'Content pasted';
  }`
});

Step 5: Clean up and verify

// 删除多余内容
await mcp__plugin_playwright_playwright__browser_click({
  element: "多余文本",
  ref: "ref"
});
await mcp__plugin_playwright_playwright__browser_press_key({
  key: "Backspace"
});

// 截图验证
await mcp__plugin_playwright_playwright__browser_take_screenshot({
  filename: "notion-result.png",
  fullPage: true
});

// 关闭浏览器
await mcp__plugin_playwright_playwright__browser_close();

Important Techniques

Markdown Auto-conversion

When pasting, Notion automatically converts the following Markdown syntax:

Markdown Notion Effect
## 标题 Level 2 heading
- 列表项 Unordered list
1. 列表项 Ordered list
` Table
[链接](url) Hyperlink
**粗体** Bold text
`代码` Inline code

Common Issue Handling

Issue: Content was entered into the title Solution: Use Meta+z to undo, and make sure to move the cursor to the content area first

Issue: A menu popup blocks input Solution: Press Escape to close the menu, or press ArrowDown to move to the content area

Issue: The page requires login Solution: Make sure you are logged in to your Notion account in the browser

Template Content

Technical Documentation Template

## 一、概述

[产品/功能简介]

## 二、核心功能

| 功能 | 说明 |
|------|------|
| 功能1 | 描述 |
| 功能2 | 描述 |

## 三、使用指南

1. 步骤一
2. 步骤二
3. 步骤三

## 四、最佳实践

- 建议一
- 建议二

## 五、参考资源

- [资源链接](url)

Meeting Minutes Template

## 会议信息

- 日期:YYYY-MM-DD
- 参会人:
- 主持人:

## 议程

1. 议题一
2. 议题二

## 讨论要点

### 议题一
- 要点

### 议题二
- 要点

## 行动项

| 任务 | 负责人 | 截止日期 |
|------|--------|----------|
| 任务1 | @人员 | 日期 |

## 下次会议

- 时间:
- 主题:

Notes

  1. Browser status: Make sure the Playwright browser is installed (npx playwright install chromium)
  2. Login status: You need to log in to Notion in the browser on first use
  3. Page permissions: Make sure you have permission to edit the target page
  4. Network connection: A stable network connection is required

Detailed Reference