agentleFS
mocchaleramocchalera/mockup-to-code-skill/skills/raster-texture-reconstruction/SKILL.md

raster-texture-reconstruction

Skill0 starsChanged 4 months agoISCView on GitHub

Reconstruct source-specific raster texture such as grain, halftone, scanlines, RGB offset, chromatic aberration, edge erosion, distress, and banded glitch while keeping structural text and UI live. Use when a mockup-to-code manifest explicitly sets rasterTexture.required=true, or when a user explicitly asks to reproduce identity-bearing raster texture without shipping source pixels or rasterizing structural copy.

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. About 0 are common, 12 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read the parent manifest and normalize rasterTexture into a four-key raster-texture-contract/v1 snapshot: schemaVersion, required, reason, …

    line 20
  2. Very specific:

    Create one target row per manifest id.

    line 25
  3. Distinctive:

    Read the actual desktop/mobile QA viewports from the parent workflow.

    line 34
  4. Distinctive:

    Keep CSS-owned surfaces and image-owned assets separate.

    line 61
  5. Distinctive:

    Use the parent workflow's render/capture commands at the declared widths and heights.

    line 75
  6. Distinctive:

    Never ship pixels copied, cropped, masked, blurred, recolored, or downscaled from the source mockup.

    line 97
  7. Distinctive:

    Never rasterize structural text to obtain texture fidelity.

    line 99
  8. Very specific:

    Prefer filters, masks, and pseudo-elements over duplicated text.

    line 100
  9. Distinctive:

    Treat generated masks and procedural rasters as content-free: no readable words, logos, UI, faces, products, or source-identifying …

    line 103
  10. Distinctive:

    Keep effect ownership local to the declared target.

    line 105
  11. Distinctive:

    Keep desktop/mobile tuning explicit.

    line 109
  12. Distinctive:

    Keep animation separate from static texture fidelity.

    line 111
  13. Distinctive:

    Do not turn helper metrics into one synthetic pass score.

    line 114
  14. Distinctive:

    Keep source/build crops and measurement evidence under the work root's report area.

    line 118
  15. Very specific:

    Read schemas/raster-texture-report-v1.schema.json before creating or transforming a report.

    line 124
  16. Very specific:

    Start blocked work from templates/raster-texture-report.blocked.json.

    line 126
  17. Very specific:

    Use relative, traversal-free paths rooted at --root.

    line 128
  18. Very specific:

    Use raster-texture-report/v1 for the specialist report and raster-texture-metrics/v1 for helper measurements.

    line 129
  19. Distinctive:

    Run the focused tests and structural skill validation after changes:

    line 136

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Raster Texture Reconstruction

Rebuild raster-specific visual character as a Web-owned effect layer. Preserve semantic HTML, responsive behavior, and accessibility; use source crops only as measurement and comparison evidence.

This first version is explicit-only. Start only when the parent manifest sets rasterTexture.required: true. If the user explicitly requests the skill, record that decision first with reason: "user-request" and exact existing target ids. Block when no parent manifest or resolvable target exists. Do not auto-detect a requirement from weak background noise.

Workflow

  1. Read the parent manifest and normalize rasterTexture into a four-key raster-texture-contract/v1 snapshot: schemaVersion, required, reason, and targetIds. Bind that snapshot in the report and copy targetIds exactly. The report receipt can then be added to the parent manifest without creating a circular whole-manifest hash.
  2. Create one target row per manifest id. Bind a real source crop and classify every effect separately with its own coordinateSpace, methods, and ownership. Use glyph-local, element-local, or section-field; one target may legitimately combine spaces.
  3. Record only source-observed effect types. Give each effect a stable target-local id. Read references/reconstruction-methods.md before selecting CSS, SVG filter, content-free mask, or procedural-raster methods.
  4. Read the actual desktop/mobile QA viewports from the parent workflow. Define each state's width, height, intensity scale, and spatial scale. Keep motion static unless the parent manifest separately requires motion.
  5. Set the report safety assertions exactly:

    {
      "sourcePixelsShipped": false,
      "contentFreeAsset": true,
      "structuralTextRemainsLive": true
    }
  6. Validate the plan before implementation:

    SKILL_ROOT="${SKILL_ROOT:-${CODEX_HOME:-$HOME/.codex}/skills}"
    "$SKILL_ROOT/mockup-to-code/scripts/skill-pack-python" \
      "$SKILL_ROOT/raster-texture-reconstruction/scripts/validate_raster_texture_report.py" \
      reports/raster-texture-report.json --root . --phase pre-css --receipt

    A pre-CSS report uses status: "ready" and target implementation.status: "planned". A fully passing completion report is also valid at this phase.

  7. Implement the effect outside the source pixels. Structural headings, labels, CTA copy, navigation, body, and legal text remain selectable live DOM text. Keep CSS-owned surfaces and image-owned assets separate.
  8. Measure matched source/build crops with the supplied helper. Treat the result as diagnostic evidence, not a universal quality score:

    SKILL_ROOT="${SKILL_ROOT:-${CODEX_HOME:-$HOME/.codex}/skills}"
    "$SKILL_ROOT/mockup-to-code/scripts/skill-pack-python" \
      "$SKILL_ROOT/raster-texture-reconstruction/scripts/texture_metrics.py" \
      --target-id hero.heading \
      --source reports/crops/hero-heading-source.png \
      --build reports/crops/hero-heading-build.png \
      --out reports/texture-metrics-hero-heading.json
  9. Use the parent workflow's render/capture commands at the declared widths and heights. Capture readable desktop and mobile crop pairs and record the dimensions. Bind current hashes for implementation files, any content-free assets, the metrics report, and both crop pairs. Set each target verdict and the report status to pass.
  10. Validate completion and copy the emitted receipt into specialistReports.rasterTexture:

    SKILL_ROOT="${SKILL_ROOT:-${CODEX_HOME:-$HOME/.codex}/skills}"
    "$SKILL_ROOT/mockup-to-code/scripts/skill-pack-python" \
      "$SKILL_ROOT/raster-texture-reconstruction/scripts/validate_raster_texture_report.py" \
      reports/raster-texture-report.json --root . --phase completion --receipt
  11. Return the crop pairs to the parent workflow's existing independent visual reviewer. Do not create a second reviewer system inside this skill. A specialist pass means the evidence contract is complete; it does not override a parent reviewer rejection.

Hard Rules

  • Never ship pixels copied, cropped, masked, blurred, recolored, or downscaled from the source mockup.
  • Never rasterize structural text to obtain texture fidelity.
  • Prefer filters, masks, and pseudo-elements over duplicated text. If a decorative DOM copy is unavoidable, it must be aria-hidden="true", must not own the semantic target id, and must not replace the accessible live node.
  • Treat generated masks and procedural rasters as content-free: no readable words, logos, UI, faces, products, or source-identifying composition.
  • Keep effect ownership local to the declared target. A glyph-local effect may not become an unbounded section overlay.
  • Preserve legibility and contrast. Texture may erode edges; it may not destroy the parent workflow's content, accessibility, or CTA requirements.
  • Keep desktop/mobile tuning explicit. Do not reuse desktop grain size, scanline pitch, glitch-band width, or RGB displacement blindly on mobile.
  • Keep animation separate from static texture fidelity. If motion is requested, follow the parent motion contract and prove a settled static state plus reduced-motion behavior.
  • Do not turn helper metrics into one synthetic pass score. Use crop pairs and the parent independent review for final visual judgment.
  • Emit blocked or needs_work when evidence is unavailable. Do not fill receipts with placeholders or retrospective hashes.
  • Keep source/build crops and measurement evidence under the work root's report area. They may not be referenced by site code, copied into deploy assets, or included in the production bundle.

Contract

  • Read schemas/raster-texture-report-v1.schema.json before creating or transforming a report.
  • Start blocked work from templates/raster-texture-report.blocked.json.
  • Use relative, traversal-free paths rooted at --root.
  • Use raster-texture-report/v1 for the specialist report and raster-texture-metrics/v1 for helper measurements.
  • The stable parent receipt shape is {contract:"raster-texture-report/v1",path,sha256}.

Validation

Run the focused tests and structural skill validation after changes:

SKILL_ROOT="${SKILL_ROOT:-${CODEX_HOME:-$HOME/.codex}/skills}"
"$SKILL_ROOT/mockup-to-code/scripts/skill-pack-python" \
  "$SKILL_ROOT/raster-texture-reconstruction/scripts/quick_validate.py"

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.