← 返回 Skills 市场
nextaltair

Diy Pc Ingest

作者 Altair · GitHub ↗ · v2.0.4 · MIT-0
cross-platform ⚠ suspicious
878
总下载
0
收藏
2
当前安装
7
版本数
在 OpenClaw 中安装
/install diy-pc-ingest
功能描述
Ingest pasted PC parts purchase/config text (Discord message receipts, bullet lists) into Notion DIY_PC tables (PCConfig, ストレージ, エンクロージャー, PCInput). Use when...
使用说明 (SKILL.md)

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 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
  1. Provide Notion auth for notion-api-automation (notionctl):
  • env: NOTION_API_KEY (recommended)

Notes:

  • This skill uses Notion-Version 2025-09-03 by default.

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 TOOLS.md. 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

Notion tooling (recommended)

  • 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.
安全使用建议
This skill appears to do what it says: parse pasted PC part notes and upsert into your Notion databases. Before installing, confirm you are comfortable granting a Notion integration token (NOTION_API_KEY) limited to the specific databases, and do not give broader privileges than needed. Note two practical items to review: (1) the skill optionally uses web_search/web_fetch for enrichment and that may send product text outside your environment — disable that if you don't want external queries, and (2) the JS script spawns notion-api-automation/scripts/notionctl.mjs; review or install that dependency from a trusted source because the skill delegates API calls to it. Finally, keep tokens/IDs out of the repo (the README already warns this) and store them in environment variables or a local-only config file as instructed.
功能分析
Type: OpenClaw Skill Name: diy-pc-ingest Version: 2.0.4 The diy-pc-ingest skill is designed to parse PC hardware specifications from raw text and upsert the data into specific Notion databases. The bundle contains a Python script (scripts/_deprecated/notion_apply_records.py) and a Node.js script (scripts/notion_apply_records.js) that handle the logic for matching existing records and patching Notion pages. The skill uses standard environment variables (NOTION_API_KEY) and local configuration files for authentication, and its behavior is consistent with the stated purpose. There is no evidence of data exfiltration, malicious command execution, or harmful prompt injection instructions in SKILL.md.
能力标签
cryptocan-make-purchases
能力评估
Purpose & Capability
Name/description align with implementation: the skill parses pasted purchase/spec text and upserts rows into Notion. Required binary (node) and required env (NOTION_API_KEY) are appropriate and expected for interacting with the Notion API and running the included JS script.
Instruction Scope
SKILL.md and the scripts only reference parsing local input, reading config under ~/.config/diy-pc-ingest, and calling the Notion API. There is an explicit optional enrichment step (web_search/web_fetch) which may send product text to external web providers; the skill documents this and gives an opt-out. The JS script spawns notion-api-automation/scripts/notionctl.mjs (via execFileSync) to make Notion API calls — so the behaviour also depends on that dependency's code.
Install Mechanism
No remote download/install spec is present (instruction-only with included scripts). The code in the repo is plain JS/Python; nothing in the manifest pulls arbitrary bytes from unknown URLs. The skill does depend on a sibling ClawHub skill (notion-api-automation) for notionctl.mjs, which the README instructs the user to install via ClawHub.
Credentials
Only Notion-related secrets are required: NOTION_API_KEY (primary), with optional NOTION_TOKEN / NOTION_API_KEY_FILE and NOTION_VERSION. Those map directly to Notion integration usage. The scripts read local config paths (~/.config/diy-pc-ingest/config.json and optionally a NOTION_API_KEY_FILE) — this is reasonable for a tool that stores Notion IDs and tokens locally.
Persistence & Privilege
always:false and user-invocable; the skill writes its own config under ~/.config/diy-pc-ingest if you run the bootstrap, which is normal. It does not request global platform privileges or modify other skills' configs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install diy-pc-ingest
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /diy-pc-ingest 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.4
- Added explicit ClawHub install instructions for the required dependency: notion-api-automation. - Clarified setup section to improve step-by-step guidance for new users. - No functional or API changes. Documentation update only.
v2.0.3
refactor: migrate user config to TOOLS.md (#3)
v2.0.2
**Major update: Adds data flow/security notes, Notion CLI integration, and discovery/confirmation step before Notion writes.** - Added metadata block detailing required/optional environment variables, dependencies, and local reads/writes. - Introduced data flow and security disclosure, including the option to skip external product enrichment. - Integration with `notion-api-automation` skill and `notionctl` CLI tool is now explicit and recommended for diagnostics. - New discovery step: search and preview would-be Notion DB changes before upsert, requiring user confirmation before write. - Improved configuration/setup docs, including safe use of auto-bootstrap. - README and implementation notes updated for clarity and alignment with canonical workflow.
v1.0.3
- Added metadata block to SKILL.md, explicitly documenting required environment variables, file access, and dependencies. - Improved security: bootstrap script now only writes config when DIY_PC_INGEST_BOOTSTRAP=1 is set; auto-bootstrap is disabled by default. - Enhanced data flow and privacy documentation, including explicit disclosure of when external enrichment is triggered and local file access patterns. - Minor wording and formatting updates to SKILL.md for clarity.
v1.0.2
Version 1.0.2 of diy-pc-ingest — No file changes detected. - No changes were made to files in this release. - No updates to features, documentation, or workflow.
v1.0.1
- Added a "dry-run" (auto-discovery) mode to `notion_apply_records.js` that previews what would be created/updated/skipped before making changes. - Updated setup and README to clarify Notion API auth requirements for `notion-api-automation`. - Improved workflow to recommend previewing upserts and confirming with the user before writing to Notion. - Made small documentation clarifications and fixes for configuration and process steps.
v0.1.0
Initial release of diy-pc-ingest skill. - Ingests raw PC parts purchase/config text (e.g., Discord message receipts, bullet lists) into Notion DIY_PC tables (PCConfig, ストレージ, エンクロージャー, PCInput). - Classifies, enriches (via web search), prompts for missing details, and upserts items into Notion using the 2025-09-03 data_sources API. - Supports precise field extraction, upsert-key logic, and minimizes user intervention by asking for essential unknowns only. - Detailed setup instructions for integration with user’s own Notion targets and credential storage. - Provides robust JSONL input structure and control flags for flexible ingestion and updates.
元数据
Slug diy-pc-ingest
版本 2.0.4
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 7
常见问题

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。

💬 留言讨论