sync-inventory

sync-inventory is a skill for Claude Code from dryvist/claude-code-plugins. It costs 28 tokens per session (756 once invoked), scanned A, original, Apache-2.0.

A procedure for checking the inventory that connects OpenTofu infrastructure to Ansible configuration. The inventory is published to RustFS object storage after a successful infrastructure apply and then fetched by Ansible.

In plain words
What is it for?
Use it to check when the published inventory was last updated and verify that Ansible can use the correct inventory source.
Why use it?
It helps detect stale or missing inventory data and avoids unmanaged manual copies that can cause infrastructure and configuration to describe different machines.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the infra-orchestration plugin — 3 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/dryvist/claude-code-plugins/sync-inventory
Any agent
npx skills add dryvist/claude-code-plugins --skill sync-inventory
Clone the repo
git clone --depth 1 https://github.com/dryvist/claude-code-plugins

Made for: Claude Code.

Or install infra-orchestration, the plugin that ships this one along with the rest of its 3 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sync-inventory

README.md
[![agentmods](https://agentmods.dev/badge/skills/dryvist/claude-code-plugins/sync-inventory.svg)](https://agentmods.dev/skills/dryvist/claude-code-plugins/sync-inventory)
Your own site
<a href="https://agentmods.dev/skills/dryvist/claude-code-plugins/sync-inventory"><img src="https://agentmods.dev/badge/skills/dryvist/claude-code-plugins/sync-inventory.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 756 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00028 $0.00756
Opus 5 $0.00014 $0.00378
Sonnet 5 $0.00006 $0.00151
Haiku 4.5 $0.00003 $0.00076

Measured 2d ago against content hash a407b9e0d314, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

sync-inventory scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

infra-orchestration/skills/sync-inventory/SKILL.md · 81 lines

How it starts

The opening of the file, as written. The whole thing — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Infrastructure Sync Inventory

The inventory pipeline is automatic: every successful tofu-proxmox Terrakube apply validates ansible_inventory in the OpenTofu graph and publishes it to the homelab RustFS object store with aws_s3_object. There is no post-apply hook or manual mirror step.

Consumers (ansible-proxmox, ansible-proxmox-apps, ansible-splunk) resolve identically via their load_tofu.yml:

  1. TOFU_INVENTORY_PATH — explicit pin (tests/overrides)
  2. RustFS artifact — native amazon.aws fetch over the homelab network; scoped credentials come from OpenBao, with no IaC checkout or toolchain
  3. Local cache — offline fallback only

There is no manual export/transform/copy flow. Never run tofu output -json ansible_inventory > <consumer>/inventory/... by hand — hand-injected inventories bypass the schema gate and create unmanaged drift.

When invoked, do this

1. Verify the published artifact is current

aws s3api head-object \
  --endpoint-url "$RUSTFS_ENDPOINT" \
  --bucket "$TOFU_INVENTORY_BUCKET" \
  --key "$TOFU_INVENTORY_KEY" \
  --query LastModified

If it predates the last intended infrastructure change, the publish boundary was not crossed — run a real apply (next step). Reference docs: tofu-proxmox/docs/INVENTORY_PUBLISHING.md.

2. Refresh = apply

The only way to republish is the publish boundary itself:

cd $GIT_HOME_PUBLIC/homelab/tofu-proxmox/main
tofu apply

The command submits a remote Terrakube run. The workspace lock serializes changes, Terrakube obtains its OpenBao credentials natively, and the apply updates the RustFS object only when content changed.

3. Validate consumers resolve

In any consumer repo (no creds needed if the cache exists):

ansible-playbook <load_tofu path> -i inventory/hosts.yml -c local
  • ansible-proxmox: playbooks/load_tofu.yml
  • ansible-proxmox-apps / ansible-splunk: inventory/load_tofu.yml

Watch which resolution step wins ("Resolve inventory from …" task output).

Read the full file on GitHub · 81 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 81 lines · 28 tokens per session scan A a407b9e0d314

Subscribe to this mod's changes

sync-inventory is a skill published in the GitHub repository dryvist/claude-code-plugins (3 stars, last pushed yesterday), licensed Apache-2.0. It adds 28 tokens to every session and 756 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.