Skip to content
Back to skills

Artifact Verification

ASecurity

Re-open a produced file and assert it parses and matches the request. Run before answering.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 12, 2026
developmentpython

Security analysis

A100/100

Scanned October 12, 2026

npx -y skills add RorroRojas3/enterprise-gpt --skill artifact-verification --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Artifact Verification?

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

Security grade badge for Artifact Verification
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/rorrorojas3-artifact-verification/badge)](https://www.skillsdirectory.com/skills/rorrorojas3-artifact-verification)

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: artifact-verification
description: Re-open a produced file and assert it parses and matches the request. Run before answering.
---

# Verifying what you produced

Deterministic checks only. No judgement — open the file, measure it, print the result.

```python
import json
import os


def verify(path, kind):
    result = {"path": path, "bytes": os.path.getsize(path)}
    if result["bytes"] == 0:
        result["ok"] = False
        return result

    if kind == "docx":
        from docx import Document
        doc = Document(path)
        result.update(paragraphs=len(doc.paragraphs), tables=len(doc.tables))
    elif kind == "xlsx":
        from openpyxl import load_workbook
        wb = load_workbook(path)
        result.update(sheets=len(wb.sheetnames), names=wb.sheetnames)
    elif kind == "pptx":
        from pptx import Presentation
        result.update(slides=len(Presentation(path).slides))
    elif kind == "pdf":
        import fitz
        with fitz.open(path) as pdf:
            result.update(pages=pdf.page_count)
    elif kind == "csv":
        import pandas as pd
        frame = pd.read_csv(path)
        result.update(rows=len(frame), columns=list(frame.columns))
    else:
        result.update(characters=len(open(path, encoding="utf-8").read()))

    result["ok"] = True
    return result


print(json.dumps(verify("/mnt/data/<file>", "<kind>")))
```

## What counts as passing

- The file opens with the library that owns its format.
- It is not zero bytes.
- Its shape matches what was asked for: sheet count, slide count, page count, or a parseable header row.

## When it fails

Fix the generating code and run it again. Never answer with a file that did not verify, and never describe a file you could not re-open.

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.