集成

diy-pc-ingest

试用

把粘贴的 PC 配件文本解析后写入 Notion DIY_PC 表,带分类与字段追问确认。

它能做什么

本地解析粘贴的 PC 配件文本,按エンクロージャー(USB/RAID/HDD ケース、盘位数、取り外し表示名)、ストレージ(HDD/SSD/NVMe、容量、シリアル、健康状態)、PCConfig(CPU/GPU/RAM/PSU/MB/ケース等)、pcinput 四类目标拆条记录。可选用 web_search/web_fetch 补全规格,遇到シリアル缺失、盘位数不明或复合键碰撞多行等情况会先向用户追问,绝不静默写入。预览阶段通过 scripts/notion_apply_records.js 的 auto-discovery 模式只读查询并汇报 create/update/skip,经用户确认后才执行 upsert,使用 Notion-Version 2025-09-03 的 data_sources 接口。

什么时候用它

  • 从粘贴的购买凭证录入一块存储硬盘
  • 登记一个带盘位数与 取り外し表示名 的外接盒
  • 按 Name + 購入日 复合键新增 PCConfig 配件
  • 给已有ストレージ 行回填シリアル 或健康状態

技能文档

diy-pc-ingest

Setup (required)

This skill is intended to be shared. Do not hardcode your Notion IDs or token in the skill.

Install the required dependency skill via ClawHub before using this skill:

clawhub install notion-api-automation
  1. Read the DIY-PC Notion Targets table in the workspace AGENTS.md ## Tools section for the data_source_id and database_id values for each target. Pass them as explicit CLI arguments:
  • --pcconfig-dsid, --pcconfig-dbid
  • --pcinput-dsid, --pcinput-dbid
  • --storage-dsid, --storage-dbid
  • --enclosure-dsid, --enclosure-dbid
  1. Provide Notion auth for notion-api-automation (notionctl):
  • env: NOTION_API_KEY (legacy shell/service env remains supported)
  • OpenClaw config: skills.entries["diy-pc-ingest"].apiKey

apiKey is associated with metadata.openclaw.primaryEnv and is injected as NOTION_API_KEY for the host agent run. It may be a plaintext value or any OpenClaw SecretRef supported by the local gateway (env, file, exec, etc.). Do not hardcode provider-specific secret paths in this shared skill.

Example SecretRef shape:

{
  skills: {
    entries: {
      "diy-pc-ingest": {
        apiKey: { source: "exec", provider: "your_notion_secret_provider", id: "value" }
      }
    }
  }
}

Notes:

  • This skill uses Notion-Version 2025-09-03 by default.
  • If NOTIONCTL_PATH is set, scripts/notion_apply_records.js uses that notionctl path; otherwise it uses the sibling notion-api-automation skill.

Data flow disclosure

  • Local input: pasted receipts/spec notes are parsed locally.
  • External enrichment (optional): web_search/web_fetch may send partial product text to external web providers.
  • Notion write path: records are queried/upserted via notion-api-automation/scripts/notionctl.mjs.

Security rules:

  • If user does not want external enrichment, skip web_search/web_fetch and proceed with local extraction only.
  • Use minimal-scope Notion integration permissions (only target DIY_PC data sources).

Canonical Notion targets

Use data_sources endpoints for schema/query, and pages endpoint for row creation.

IDs are documented in the DIY-PC Notion Targets table in the workspace AGENTS.md ## Tools section. Pass them as CLI arguments at runtime.

Workflow (A: user pastes raw text)

  1. Read the pasted text and decide target table per item:

    • エンクロージャー: USB/RAID/HDDケース/ドック、ベイ数、JAN/型番、"安全な取り外し"表示名。
    • ストレージ: HDD/SSD/NVMe/SATA/容量/シリアル/健康状態。
    • PCConfig: CPU/GPU/RAM/PSU/MB/ケース/冷却/NIC/キャプチャ等。
  2. Extract fields (best-effort). Prefer Japanese column names as they exist in each table.

  3. Enrich specs using web_search/web_fetch when it reduces user work (e.g., bay count, interface, capacity, form factor). Keep it minimal; don't overfill.

  4. Ask follow-up questions only for fields needed to avoid ambiguity or bad joins.

    • ストレージ: Serial missing → ask for serial (or confirm creating as "暫定/シリアル不明").
    • エンクロージャー: ベイ数 or USB/Thunderbolt/LAN unclear → ask.
    • PCConfig: Identifier/型番 missing but needed to match existing row → ask.
  • If a key collides with multiple rows, do not write; ask user.
  1. Search existing records in Notion using scripts/notion_apply_records.js (auto-discovery mode):

    • Provide JSONL records (one per item) on stdin.
    • Script will:
      • find an existing row by key (see below)
      • report what would be created/updated/skipped without making changes
      • Do not write anything (no create/update operations)
    • Use this to preview results before actual upsert.
  2. Review search results and confirm with user:

    • Show what would be created/updated/skipped
    • Ask for confirmation before proceeding to actual upsert
  3. Upsert into Notion using scripts/notion_apply_records.js:

    • Provide JSONL records (one per item) on stdin.
    • Script will:
      • find an existing row by key (see below)
      • patch only missing fields unless overwrite=true
      • otherwise create a new row
  4. Report results (created/updated/skipped) and link any created rows. 3

Upsert keys (rules)

  • ストレージ: シリアル (exact) is the primary key. If the existing row was created without serial, allow a safe fallback match by title + (optional) 購入日/価格(円) to support post-fill of serial/health/scan-date.
  • エンクロージャー: 取り外し表示名 (exact) else title/name.
  • PCConfig: (Name + Purchase Date) を複合キーとして扱う(exact)。重複ヒット時は書き込まず質問。
  • If a key collides with multiple rows, do not write; ask user.

JSONL input format for the apply script

Each line is a JSON object:

{"target":"enclosure","title":"RATOC RS-EC32-R5G","properties":{"種別":"USBケース","接続":"USB","ベイ数":2,"普段つないでるPC":"RECRYZEN","購入日":"2026-01-18","購入店":"PCワンズ","価格(円)":8977,"取り外し表示名":"RS-EC32-R5G","メモ":"JAN: 4949090752191"}}

Optional control fields (for cleanup / manual fixes):

  • page_id (or id): update this Notion page directly (bypasses upsert matching)
  • archive: true: archive the page (useful for de-dup)
  • overwrite: true: allow overwriting existing values (including clearing with null)

Optional behavior flags:

  • mirror_to_pcconfig: true (only for target=storage): also create/update a pcconfig row for the installed component.
    • requires: 現在の接続先PC, 購入日, Name

Targets: enclosure | storage | pcconfig | pcinput

Property value encoding:

  • select/status: string name
  • rich_text: string
  • number: number
  • date: YYYY-MM-DD
  • checkbox: boolean
  • relation: array of page_ids (advanced; avoid unless needed)

Notes

  • Always use Notion-Version 2025-09-03.
  • Prefer POST /v1/data_sources/{id}/query over /databases/{id}/query.
  • Relation schema updates require relation.data_source_id (not database_id).

Note (implementation)

  • JS implementation is the default: scripts/notion_apply_records.js
  • Legacy Python implementation is kept for reference: scripts/_deprecated/notion_apply_records.py
  • Install notion-api-automation via ClawHub for Notion API debugging: clawhub install notion-api-automation
  • This skill does not depend on skills/notionkit/*.
  • Primary ingestion path is scripts/notion_apply_records.js; use skills/notion-api-automation/scripts/notionctl.mjs for diagnostics/manual API operations.

常见问题

粘贴后会不会直接写入 Notion?
不会。脚本先以 auto-discovery 模式只跑查询,列出将要 create / update / skip 的内容,经用户确认后才执行真正的 upsert。
需要哪些鉴权信息?
需要 NOTION_API_KEY,可走环境变量,也可放在 OpenClaw 配置 skills.entries["diy-pc-ingest"].apiKey 的 SecretRef(env / file / exec 等),不写死在共享 skill 中。
是否依赖其他 skill?
依赖 notion-api-automation,需通过 clawhub install notion-api-automation 安装;主写入路径走 scripts/notion_apply_records.js,诊断和手动 API 调用使用该依赖的 scripts/notionctl.mjs。

相关技能

Decode, track, and guide through furniture assembly instructions from step diagrams. Manages parts inventory, tracks assembly progress, identifies the current step from a photo, and warns about common mistakes. Use when assembling flat-pack furniture or following visual-only instruction manuals.

Identify OEM part numbers from PDF parts catalogs by matching vehicle scope, exploded positions, and parts-table entries.

2 次安装

Extracts structured data from receipt text (OCR/photo description) and generates monthly spending reports. Parses merchant, date, line items, tax, total, and category. Produces summary stats: top merchants, category breakdown, total spend.

Parse PDF, image, Word, or PPT files with SoMark and publish the result to Feishu, DingTalk, or Notion as editable documents, spreadsheets, record tables, or databases. Also use when an exact matching SoMark Markdown-and-JSON pair must be imported into one or more of these platforms.

Ingest a single document, uploaded file, meeting note, experiment record, or chat-provided material into a personal or team knowledge base, including summari...

3 次安装

Document everything you own for insurance, moving, or estate planning. Manage a JSON database of household items with depreciation tracking, insurance-ready reports, and moving box labeling.