visual-device-inventory
Skill0 starsChanged 4 months agoISCView on GitHub
Inventory every visible device, motif, control, decoration, and composite subpart in raster mockups before CSS implementation. Use for screenshot-to-code, mockup-to-code, design-comp decomposition, pre-CSS visual audits, ROI evidence sheets, and hash-bound detail-inventory/v1 specialist reports, especially when source-specific details could otherwise be omitted or flattened.
In this repository11 other files it gives its agents.
- mockup-to-codeSkill
- design-copy-structureSkill
- design-motion-sequencingSkill
- design-whitespaceSkill
- lp-interaction-qaSkill
- photo-art-directionSkill
- raster-texture-reconstructionSkill
- responsive-image-deliverySkill
- seamless-section-wavesSkill
- typographySkill
- visual-qa-pixel-polishSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 4 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 8
Create an exhaustive, hash-bound detail-inventory/v1 report before writing CSS.
- Very specific: line 10
Use the pack runtime wrapper so commands run with the interpreter selected at installation.
- Very specific: line 18
Add one inventory row per independently reproducible device.
- Very specific: line 19
Use kind: composite only when the device must be reproduced as a coordinated unit.
- Distinctive: line 52
Stop before CSS when validation fails.
- Very specific: line 56
Read schemas/detail-inventory-v1.schema.json when creating or transforming a report.
- Very specific: line 57
Start from templates/detail-inventory.blocked.json only when inventory cannot honestly proceed.
- Very specific: line 58
Run blocked validation explicitly with --allow-blocked.
- Distinctive: line 59
Keep ids lowercase and stable.
- Very specific: line 61
Use relative, traversal-free paths rooted at --root.
- Distinctive: line 66
Run the skill self-check after changes:
- Distinctive: line 74
Do not hand-edit generated hashes.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Visual Device Inventory
Create an exhaustive, hash-bound detail-inventory/v1 report before writing CSS. Treat every visible source device as an implementation obligation; do not infer completion from a prose summary.
Use the pack runtime wrapper so commands run with the interpreter selected at
installation. Set SKILL_ROOT when the pack uses a non-default destination.
Workflow
- Identify the source medium and record the source path before interpreting the design.
- Partition the entire source into ordered, non-empty sections. Include seams or transition bands as sections when they carry visible devices.
- Sweep each section at high zoom in a fixed order: background, edges/corners, focal object, typography, controls, overlays, decorations, and seams.
- Add one inventory row per independently reproducible device. Mark a distinctive source motif
sourceSpecific: trueand assign itcriticalorhighpriority. - Use
kind: compositeonly when the device must be reproduced as a coordinated unit. Inventory at least two atomiccompositeParts, each with its own globally unique id, ROI, specificity, and priority. - Draw every ROI in source-image pixel coordinates as
{x,y,width,height}. Keep device ROIs inside their section ROI and composite-part ROIs inside their parent device ROI. Generate crops and the contact sheet before implementation:
SKILL_ROOT="${SKILL_ROOT:-${CODEX_HOME:-$HOME/.codex}/skills}" "$SKILL_ROOT/mockup-to-code/scripts/skill-pack-python" \ "$SKILL_ROOT/visual-device-inventory/scripts/generate_roi_contact_sheet.py" \ work/detail-inventory.json \ --root . --output-dir work/device-inventory-evidenceValidate the report and every referenced image byte, bound, dimension, and SHA-256:
SKILL_ROOT="${SKILL_ROOT:-${CODEX_HOME:-$HOME/.codex}/skills}" "$SKILL_ROOT/mockup-to-code/scripts/skill-pack-python" \ "$SKILL_ROOT/visual-device-inventory/scripts/validate_inventory.py" \ work/detail-inventory.json --root .Emit the exact receipt object for
mockup-to-code:SKILL_ROOT="${SKILL_ROOT:-${CODEX_HOME:-$HOME/.codex}/skills}" "$SKILL_ROOT/mockup-to-code/scripts/skill-pack-python" \ "$SKILL_ROOT/visual-device-inventory/scripts/validate_inventory.py" \ work/detail-inventory.json \ --root . --receiptStore that object at
specialistReports.deviceInventory. It has the stable shape{contract:"detail-inventory/v1", path, sha256}. The hash covers the report file bytes; changing the report invalidates the receipt.- Stop before CSS when validation fails. Fix missing rows, bounds, specificity, composite decomposition, or unreadable evidence first.
Contract
- Read schemas/detail-inventory-v1.schema.json when creating or transforming a report.
- Start from templates/detail-inventory.blocked.json only when inventory cannot honestly proceed. Replace every placeholder and blocker when work resumes.
- Run blocked validation explicitly with
--allow-blocked; blocked reports never emit a receipt and normal validation exits nonzero. - Keep ids lowercase and stable. Ids are globally unique across sections, devices, and composite parts.
- Cover every declared section with at least one device. Never use one giant row to stand in for several independently reproducible details.
- Use relative, traversal-free paths rooted at
--root. Evidence must be real readable PNG, JPEG, or WebP files with matching hashes and pixel dimensions. - Preserve report order. The generator sorts by section order and inventory order and writes deterministic PNG output for identical inputs and Pillow version.
Validation
Run the skill self-check after changes:
SKILL_ROOT="${SKILL_ROOT:-${CODEX_HOME:-$HOME/.codex}/skills}"
"$SKILL_ROOT/mockup-to-code/scripts/skill-pack-python" \
"$SKILL_ROOT/visual-device-inventory/scripts/quick_validate.py"Do not hand-edit generated hashes. Regenerate evidence, validate, then copy the emitted receipt into the consuming manifest.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

