Skip to content
Back to skills

Pix2code

ASecurity

"Operate the pix2code research repository for GUI screenshot-to-DSL

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 8, 2026
datapythonbash

Security analysis

A100/100

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

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill pix2code --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pix2code?

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

Security grade badge for Pix2code
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-pix2code/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-pix2code)

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: pix2code
description: "Operate the pix2code research repository for GUI screenshot-to-DSL
  experiments, legacy Keras/TensorFlow training, model sampling, and DSL
  compilation to web, Android, or iOS code."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# pix2code Repo Skill

Use this skill when a task involves the pix2code research codebase: turning GUI screenshot datasets into training examples, training or inspecting the legacy Keras/TensorFlow model, generating the pix2code DSL from screenshots, or compiling `.gui` DSL files into web, Android, or iOS scaffold code.

pix2code is an educational 2017 research prototype. Treat it as historical ML code, not a production UI generator. Prefer small, deterministic checks and explicit artifact validation before attempting model training or inference.

## Start here

1. Read [references/repo-provenance.md](references/repo-provenance.md) before deciding whether this skill matches a checkout or needs a refresh.
2. Read [references/package-overview.md](references/package-overview.md) for repository layout, dependency constraints, and source facts shared across workflows.
3. Run or adapt [scripts/check_pix2code_environment.py](scripts/check_pix2code_environment.py) when the task starts with setup, dependency diagnosis, or legacy TensorFlow/Keras compatibility.
4. Route to the focused sub-skill below; do not reopen original repo scripts unless the user is explicitly maintaining the checkout.

## Install and inspection baseline

The original README listed Python 2 or 3 and these historical pins:

```text
Keras==2.1.2
numpy==1.13.3
opencv-python==3.3.0.10
h5py==2.7.1
tensorflow==1.4.0
```

For modern hosts, expect to use an isolated legacy Python environment. The old OpenCV pin may no longer be available from current package indexes; use the troubleshooting reference before changing versions. A minimal inspection check is:

```bash
python scripts/check_pix2code_environment.py --include-ml
```

The repository is not a packaged Python distribution with console entry points. Its scripts rely on working from either the `model/` or `compiler/` source directories. This generated skill therefore bundles safer helpers that are self-contained and runnable from arbitrary directories.

## Route map

| Task intent | Read this |
| --- | --- |
| Prepare pix2code datasets, validate `.gui`/image pairs, split train/eval sets, convert screenshots to `.npz`, or plan legacy training commands. | [sub-skills/data-and-training/SKILL.md](sub-skills/data-and-training/SKILL.md) |
| Validate trained artifacts, choose greedy versus beam search, diagnose missing `pix2code.json` / `.h5` / `meta_dataset.npy` / `words.vocab`, or explain batch versus single-image generation. | [sub-skills/sampling-and-generation/SKILL.md](sub-skills/sampling-and-generation/SKILL.md) |
| Compile a `.gui` DSL file to web Bootstrap HTML, Android XML, or iOS Storyboard, inspect DSL tokens, or debug malformed DSL nesting. | [sub-skills/dsl-compilation/SKILL.md](sub-skills/dsl-compilation/SKILL.md) |
| Diagnose install/import failures, stale helper behavior, unavailable pretrained results, or research-prototype limitations shared by multiple workflows. | [references/troubleshooting.md](references/troubleshooting.md) |

## Operating rules

- Keep user-facing instructions self-contained. Use bundled scripts and references in this skill rather than relying on original checkout scripts.
- Avoid full training unless the user explicitly accepts a long-running legacy TensorFlow/Keras job and has the data unpacked.
- Treat GPU acceleration as optional for this skill. CPU validates dataset handling and DSL compilers; paper-scale training speed or model quality is not verified by CPU checks.
- Validate generated or user-supplied `.gui` files before compiling them. Unknown tokens raise `KeyError` in the original compiler; use the bundled compiler's clearer diagnostics.
- Verify trained artifact directories before sampling. pix2code inference requires the JSON architecture, HDF5 weights, NumPy metadata, and vocabulary files to agree.
- Record any dependency substitutions separately from model-quality claims. A successful import of modern or substituted packages does not prove the 2017 paper result.

## Common deliverables

- A cleaned or validated pix2code dataset layout with paired `.gui` and `.png`/`.npz` files.
- A command plan for legacy model training that distinguishes in-memory versus generator mode.
- A trained-artifact validation report before sampling screenshots.
- A compiled HTML/XML/Storyboard scaffold from a DSL fixture using bundled compiler logic.
- A troubleshooting note that names whether the blocker is dependency compatibility, missing data, missing trained weights, malformed DSL, or a research-code limitation.

Files in this skill

  • SKILL.md4.7 KB
  • references/package-overview.md3.8 KB
  • references/repo-provenance.md2.2 KB
  • references/repo-routing-metadata.json324 B
  • references/troubleshooting.md2.8 KB
  • scripts/check_pix2code_environment.py2.2 KB
  • sub-skills/data-and-training/SKILL.md2.6 KB
  • sub-skills/data-and-training/references/data-formats.md1.8 KB
  • sub-skills/data-and-training/references/training-workflows.md1.4 KB
  • sub-skills/data-and-training/references/troubleshooting.md1.2 KB
  • sub-skills/data-and-training/scripts/prepare_pix2code_dataset.py6.4 KB
  • sub-skills/dsl-compilation/SKILL.md3.4 KB
  • sub-skills/dsl-compilation/references/dsl-reference.md2 KB
  • sub-skills/dsl-compilation/references/platform-compilation.md1.4 KB
  • sub-skills/dsl-compilation/references/troubleshooting.md947 B
  • sub-skills/dsl-compilation/scripts/compile_gui.py12.9 KB
  • sub-skills/sampling-and-generation/SKILL.md2.4 KB
  • sub-skills/sampling-and-generation/references/artifact-contract.md1.2 KB
  • sub-skills/sampling-and-generation/references/inference-workflows.md1.3 KB
  • sub-skills/sampling-and-generation/references/troubleshooting.md1.5 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.