/install diy-pc-ingest
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
- Read the "DIY-PC Notion Targets" table in TOOLS.md 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
- Provide Notion auth for
notion-api-automation(notionctl):
- env:
NOTION_API_KEY(recommended)
Notes:
- This skill uses Notion-Version
2025-09-03by default.
Data flow disclosure
- Local input: pasted receipts/spec notes are parsed locally.
- External enrichment (optional):
web_search/web_fetchmay 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_fetchand 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 TOOLS.md. Pass them as CLI arguments at runtime.
Workflow (A: user pastes raw text)
-
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/キャプチャ等。
-
Extract fields (best-effort). Prefer Japanese column names as they exist in each table.
-
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.
-
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.
-
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.
-
Review search results and confirm with user:
- Show what would be created/updated/skipped
- Ask for confirmation before proceeding to actual upsert
-
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
-
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(orid): 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 fortarget=storage): also create/update apcconfigrow for the installed component.- requires:
現在の接続先PC,購入日,Name
- requires:
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}/queryover/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
Notion tooling (recommended)
- Install
notion-api-automationvia 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; useskills/notion-api-automation/scripts/notionctl.mjsfor diagnostics/manual API operations.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install diy-pc-ingest - 安装完成后,直接呼叫该 Skill 的名称或使用
/diy-pc-ingest触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Diy Pc Ingest 是什么?
Ingest pasted PC parts purchase/config text (Discord message receipts, bullet lists) into Notion DIY_PC tables (PCConfig, ストレージ, エンクロージャー, PCInput). Use when... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 878 次。
如何安装 Diy Pc Ingest?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install diy-pc-ingest」即可一键安装,无需额外配置。
Diy Pc Ingest 是免费的吗?
是的,Diy Pc Ingest 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Diy Pc Ingest 支持哪些平台?
Diy Pc Ingest 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Diy Pc Ingest?
由 Altair(@nextaltair)开发并维护,当前版本 v2.0.4。