partdb

Search, inspect, and safely update Part-DB inventory through approval-gated API helpers.

5|1|Updated May 5, 2026
One-click install
npx skills add https://github.com/cbusillo/codex-skills --skill partdb-cbusillo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: partdb
Source: https://github.com/cbusillo/codex-skills/tree/main/skills/partdb
Command: npx skills add https://github.com/cbusillo/codex-skills --skill partdb-cbusillo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Managing physical inventory in a Part-DB instance requires careful API work: discovering the installed schema, locating parts and storage locations, and making stock changes without accidental or unreviewed mutations. This Skill provides a structured, safety-tiered workflow for read-only lookups and preview-gated quantity updates while keeping credentials and inventory data out of public artifacts. ## Core Features & Use Cases - Read-only inventory access: Validate private context, probe the instance's OpenAPI schema, search parts by name, and list storage locations and stock amounts via scripts/partdb-read.py. - Approval-gated mutations: Generate a digest-signed plan for a single part-lot quantity change, require explicit typed approval of that exact digest, then apply with drift detection, read-back verification, and single-use receipts via scripts/partdb-write.py. - Private context separation: Resolve instance endpoints and credentials from a private operations repository defined in references/private-context.md, never exposing URLs, tokens, or inventory details in public output. - Use Case: A user asks where a specific resistor is stored and how many remain; the Skill runs a context check and schema probe, searches the part, and reports locations and quantities without leaking instance details. ## Quick Start Ask the assistant to find a part and check its stock in your Part-DB instance, and it will validate the private context before running any read-only query.

Frequently Asked Questions about partdb

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search for parts in a Part-DB instance?

Run the read helper with the search command after a successful context check and schema probe. It queries the instance's /api/parts endpoint with a name filter and returns matching part IDs and names without exposing credentials or URLs.

How do I update a part's quantity in Part-DB safely?

Create an intent file with op, lot_id, and amount, then run the write helper's plan, approve, and apply commands in order. The plan is digest-signed, approval must match that exact digest, and apply re-reads the lot, refuses drift, patches, and verifies the result.

Does the Part-DB skill support creating or deleting parts?

No. The bundled mutation helper only sets the quantity of one existing part lot. Creating, deleting, moving, or attaching records is listed as future work requiring its own schema-driven proposal workflow.

Where are Part-DB credentials and instance URLs stored?

They live in a private operations repository referenced by a local-context.toml pointer, never in the public skill. Helpers resolve environment-variable names from that private context and redact endpoints, tokens, and response bodies from all output.

Why does a Part-DB write fail with 'changed after planning'?

The apply step re-reads the lot before writing and aborts if the current amount no longer matches the plan's prior_amount, preventing lost updates. It records a needs-reconciliation receipt, and you must create a new plan from fresh state.

When should I not use the Part-DB inventory skill?

Do not use it for Part-DB container, proxy, backup, migration, or host operations; those belong to an infrastructure-operations skill. It also should not be forced onto project plans, warranties, receipts, or other non-inventory records.