Skip to content
Back to skills

Inventory File Digests

ASecurity

Build a bounded, exact SHA-256 inventory of files in an authorized directory before comparing, transferring or reviewing a package.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 26, 2026
ai-agentspython

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned September 26, 2026

npx -y skills add alisonjieli-png/loop-engine --skill inventory-file-digests --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Inventory File Digests?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Inventory File Digests
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alisonjieli-png-inventory-file-digests/badge)](https://www.skillsdirectory.com/skills/alisonjieli-png-inventory-file-digests)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: inventory-file-digests
description: Build a bounded, exact SHA-256 inventory of files in an authorized directory before comparing, transferring or reviewing a package.
---

# Inventory file digests

Use this skill when a task needs to name the exact bytes of a local package or source set. It reports relative paths, byte counts, SHA-256 digests and groups of paths with the same digest. A matching digest is evidence of equal bytes; it is not proof of source rights or safety.

## Input and command

The owning runtime must supply an exact approved absolute materials root. Run `python3 -B scripts/inventory_file_digests.py --approved-root /approved/materials` from this skill directory. Select a subtree with `--tree-relative package` when needed; the default `.` scans the approved root. The fixed ceilings are 1,000 files, 50,000,000 file bytes, 32 nested directory levels and 5,000 directory entries. `--max-files` and `--max-total-bytes` may lower their ceilings. Symbolic links, traversal and special files cause refusal.

## Output and effects

The script reads file bytes and writes one `file_digest_inventory/v1` JSON object to standard output. It writes no files, sends no network requests and reads no credentials. Status `pass` exits 0; `refused` exits 2. The output may reveal names and digests of private files, so keep it under the same access policy as the input. The script requires POSIX no-follow descriptor operations, opens candidate files nonblocking before checking their type, and checks file metadata for change while hashing. A pass is an inventory observation, not an approval of package content or a consistent snapshot of a concurrently changing tree.

The owning Loop decides whether the inventory is useful and whether any later comparison or installation is authorized. The command-line root is an input selector, not permission to read it; the owning runtime must enforce the exact authority separately.

Files in this skill

  • SKILL.md1.9 KB
  • scripts/confined_input.py3.5 KB
  • scripts/inventory_file_digests.py6.3 KB
  • tests/test_inventory_file_digests.py6.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.