Skip to content
Back to skills

Sampling And Generation

ASecurity

"Validate pix2code trained artifacts and generate DSL from

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
toolspythonbash

Security analysis

A100/100

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

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill sampling-and-generation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sampling And Generation?

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

Security grade badge for Sampling And Generation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-sampling-and-generation/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-sampling-and-generation)

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: sampling-and-generation
description: "Validate pix2code trained artifacts and generate DSL from
  screenshots using greedy or beam search workflows."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# Sampling and Generation

Use this sub-skill when the user wants to turn one screenshot or a directory of screenshots into pix2code DSL output, or when they need to check that a trained artifact directory is complete before sampling.

## Read first

- [references/artifact-contract.md](references/artifact-contract.md) for the required files inside a trained model directory.
- [references/inference-workflows.md](references/inference-workflows.md) for greedy versus beam search usage and the single-image versus batch scripts.
- [references/troubleshooting.md](references/troubleshooting.md) for missing weights, mismatched metadata, OpenCV preprocessing issues, and stale wrapper problems.
- [scripts/check_pix2code_artifacts.py](scripts/check_pix2code_artifacts.py) to validate a trained-artifact directory before any sampling command.

## Quick workflow

1. Verify the artifact directory first:

```bash
python sub-skills/sampling-and-generation/scripts/check_pix2code_artifacts.py --artifacts bin
```

2. Sample a single screenshot when the artifacts are complete by adapting the legacy argument order described in `inference-workflows.md`.

3. Sample a directory of screenshots when you want a batch of `.gui` outputs by using the same artifact-directory and search-mode conventions.

4. If the task is only to diagnose missing files or stale artifacts, use the bundled checker and stop there.

## Boundaries

This sub-skill owns artifact validation and screenshot-to-DSL generation guidance. It does not own dataset preparation; route that to [../data-and-training/SKILL.md](../data-and-training/SKILL.md). It does not own DSL compilation; route that to [../dsl-compilation/SKILL.md](../dsl-compilation/SKILL.md).

## Validation checklist

- The artifact directory contains `pix2code.json`, `pix2code.h5`, `meta_dataset.npy`, and `words.vocab`.
- `meta_dataset.npy` holds the input shape and output size expected by the sampler.
- The screenshot input exists and is readable by OpenCV.
- Greedy search is the default path; beam search is selected by passing an integer beam width.
- The generated DSL output is a `.gui` file with the original tokens stripped of `<START>` and `<END>`.

Files in this skill

  • SKILL.md2.4 KB
  • references/artifact-contract.md1.2 KB
  • references/inference-workflows.md1.3 KB
  • references/troubleshooting.md1.5 KB
  • scripts/check_pix2code_artifacts.py2.3 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.