asset-validation-debug
Diagnose and repair asset-generation failures.
Skill by MohamedAbdallah-14
Chalk Labs
Need help deploying asset-validation-debug?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/mohamedabdallah-14-asset-validation-debug
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: finance
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/asset-validation-debug
What's inside
- Skill name
asset-validation-debug- Description
- Diagnose and repair asset-generation failures. Maps tier-0/1/2 validation codes (checkerboard, missing alpha, safe-zone violation, palette drift, garbled wordmark, low contrast) to concrete repair primitives (matte, inpaint, route change, seed sweep, composite). Applies a retry budget so Claude does not loop on hopeless regenerations.
- License
- MIT
- Instructions
- 144 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Asset validation + repair
Triggered when `asset_validate()`, `asset_generate_*`, or `asset_save_inline_svg` returns warnings or errors. Do NOT loop on the same failure; follow the tree and respect the retry budget.
## Failure code → repair table
| Code | Origin | Repair primitive | Retry budget |
|---|---|---|---|
| `T0_CHECKERBOARD` | Imagen/Gemini rendering fake transparency | **Route change** → `gpt-image-1` (`background:"transparent"`), Ideogram v3 (`style:"transparent"`), Recraft V3 | 2 |
| `T0_ALPHA_MISSING` | RGB-only output on transparency-required asset | **Matte** via `asset_remove_background` (BiRefNet preferred, RMBG fallback) | 1 |
| `T0_DIMENSIONS` | wrong `width`/`height` API params | Fix params, regenerate | 1 |
| `T0_SAFE_ZONE` | subject bleeds outside platform center | Regenerate with explicit `"centered with 20% padding on all sides"` | 1 |
| `T0_FILE_SIZE` (SVG) | path count blows budget | `asset_save_inline_svg` → SVGO → K-means color reduction → vtracer | 1 |
| `T0_DCT_ENTROPY` | solid-color / NSFW-filter hit | Regenerate same params once; if repeats, change prompt | 1 |
| `T1_PALETTE_DRIFT` | model ignored hex constraint | Recraft with `controls.colors` **or** recolor post-process (K-means remap in LAB) | 1 |
| `T1_TEXT_MISSPELL` | diffusion garbled wordmark | **Drop text, composite SVG type** (retry Ideogram 3 if text-only asset) | 0 in-diffusion / 1 on Ideogram |
| `T1_LOW_CONTRAST` | pale palette at 16×16 or over background | Regenerate with explicit contrast instruction; else post-boost luminance | 2 |
| `T1_VQASCORE` | prompt-image alignment weak | Defect area <15% → **inpaint**; else full regenerate | 2 |
| `T2_BRAND_DRIFT` | style diverges from brand refs | Seed sweep (N=4, rank by CLIPScore + HPSv2); augment brand bundle | 1 |
| `T2_COMPOSITION` | off-center, cluttered, poor whitespace | **img2img** at low denoise (0.35) — preserves layout, fixes style | 1 |
When a budget exhausts: **stop retrying, report to user with diagnostic payload**. Do not loop.
## Diagnosis tree
```
asset_validate() returns warnings[]
└─ for each warning:
├─ read code + affected tier
├─ classify failure class:
│ local (<15% image area) → inpaint / post-process
│ global (style/palette-wide) → route change / regenerate
│ compositional (safe-zone/framing) → regenerate with centering prompt
└─ select repair primitive (table above)
├─ apply
├─ re-validate
└─ if same code fires again:
├─ retry_count < budget → try next primitive in fallback chain
└─ retry_count ≥ budget → escalate to user
```
## Repair primitives — cost / ROI
| Primitive | Cost relative to 1× generation | When to choose |
|---|---|---|
| SVGO / palette remap / recolor | 0.01–0.05× | Deterministic fix, no model call |
| Matte (BiRefNet / RMBG) | 0.05× | alpha missing, no regeneration needed |
| Inpaint (masked edit) | 0.3× | defect area <15%, composition is right |
| img2img low-denoise | 1× | global style drift, preserve layout |
| ControlNet tile reinjection | 1.5× | preserve structure, regen detail |
| Full regenerate | 4× | architectural failure (checkerboard, wrong model) |
| Seed sweep (N=4) | 4× + selection | brand drift, pick best |
Prefer cheaper primitives first when they apply.
## Route-change rules for architectural failures
| Symptom | Current route | Change to |
|---|---|---|
| Checkerboard | Imagen / Gemini | `gpt-image-1` (first), Ideogram v3, Recraft V3 |
| Wordmark garbled | any diffusion | Ideogram 3 Turbo (first), `gpt-image-1` (second), composite SVG (always works) |
| Palette drift after 2 tries | any | Recraft (hard palette lock via `controls.colors`) |
| Subject misrendered | SDXL | Flux.1 [dev], `gpt-image-1` |
| Path count >200 on SVG | Recraft SVG | inline_svg mode + strict path budget |
## Proactive (pre-generation) checks
Prevent 70% of failures by validating the brief before calling `asset_generate_*`:
```
BRIEF:
☐ asset_type in closed enum (logo|app_icon|favicon|og_image|splash_screen|
illustration|icon_pack|sticker|hero|transparent_mark)
☐ subject noun concrete (not just adjectives)
☐ prompt ≥ 10 words OR brand_bundle provides style refs
TEXT-IN-IMAGE:
☐ quoted string ≤ 12 chars? else composite SVG type
☐ string > 5 words? force composite, skip diffusion-text path
PALETTE:
☐ brand.palette provided?
☐ hex codes ≤ 4 (over-constraint degrades Flux/SDXL)
TRANSPARENCY:
☐ transparency required + model in [Imagen, Gemini]? → reroute
☐ transparency required + gpt-image-1? → set API `background:"transparent"`
☐ transparency required + Flux/SDXL? → plan post-matte
ROUTING:
☐ text required + model ≠ Ideogram/gpt-image-1? → suggest reroute
☐ native SVG needed + model ≠ Recraft? → suggest Recraft or inline_svg
```
## Where the codes come from
`asset_validate` (and every generator that runs a tier-0 pass before returning) emits the codes as a structured array:
```json
{
"pass": false,
"warnings": [...],
"failures": [
{ "code": "T0_CHECKERBOARD", "tier": 0, "detail": "checkerboard pattern detected in 42.7% of analyzed pixels; reject and route to native-RGBA provider", "data": { "ratio": 0.427 } },
{ "code": "T1_PALETTE_DRIFT", "tier": 1, "detail": "...", "data": { "avg_delta_e2000": 14.2, "threshold": 10 } }
],
"tier0": { "width": 1024, "height": 1024, "has_alpha": false, ... }
}
```
Read `validations.failures` (when consuming an `AssetBundle`) or the top-level `failures` (when calling `asset_validate` directly). The `data` field on each failure carries enough context (bbox coords, ΔE value, Levenshtein distance) to pick a repair primitive without re-running the check. Source: `packages/mcp-server/src/pipeline/validate.ts`, `ValidationFailure` type in `types.ts`.
## Integration with systematic debugging
Four-phase loop per failure:
1. **Gather evidence** — read `validate` output; log model, seed, guidance, prompt_hash.
2. **Pattern analysis** — match to failure code; classify local/global/compositional.
3. **Hypothesis** — pick cheapest repair primitive from the matrix.From MohamedAbdallah-14/prompt-to-asset, MIT.
More from MohamedAbdallah-14/prompt-to-asset
- 0.539score
ui-mockup-prompt
MohamedAbdallah-14
Translate a UI brief (a page, a screen, a single component, a feature) into a paste-ready prompt for Nano Banana Pro / gpt-image-2 / Ideogram / Flux 2 /…
SkillCFreshness: C★ 24Claude Code +9 - 0.528score
Prompt To Asset
MohamedAbdallah-14
Generate app icons, favicons, OG images, and logos by routing across 30+ image models.
ConnectorCFreshness: CLocal★ 24Claude Code +5 - 0.472score
brand-consistency
MohamedAbdallah-14
Maintain visual coherence across a multi-asset brand set (logo + app icon + favicon + illustrations).
SkillDFreshness: D★ 24Claude Code +9 - 0.472score
asset-enhancer
MohamedAbdallah-14
Classify a software-asset brief (logo, app icon, favicon, OG image, illustration, splash, icon pack, transparent mark), route to the right image model…
SkillDFreshness: D★ 24Claude Code +9 - 0.472score
svg-authoring
MohamedAbdallah-14
Author production-grade inline SVG (logos, favicons, icon packs, stickers, transparent marks) when the P2A `inline_svg` execution mode is selected.
SkillDFreshness: D★ 24Claude Code +9 - 0.472score
t2i-prompt-dialect
MohamedAbdallah-14
Rewrite an asset brief into the exact prompt dialect of the target image model (OpenAI gpt-image-1, Google Imagen/Gemini, SDXL, Flux.1/Flux.2, Midjourney…
SkillDFreshness: D★ 24Claude Code +9 - 0.469score
favicon
MohamedAbdallah-14
Generate a full favicon bundle — favicon.ico (16/32/48 multi-res), icon.svg with prefers-color-scheme dark support, apple-touch-icon.png 180×180 opaque, and…
SkillDFreshness: D★ 24Claude Code +9 - 0.469score
vectorize
MohamedAbdallah-14
Convert a raster image to SVG.
SkillDFreshness: D★ 24Claude Code +9 - 0.469score
app-icon
MohamedAbdallah-14
Generate an app icon from a single 1024² master and fan out to iOS (AppIcon.appiconset with squircle-ready 1024 opaque), Android (adaptive foreground +…
SkillDFreshness: D★ 24Claude Code +9 - 0.469score
illustration
MohamedAbdallah-14
Generate an in-product illustration (empty state, onboarding, hero, spot art) that obeys a brand bundle.
SkillDFreshness: D★ 24Claude Code +9 - 0.469score
logo
MohamedAbdallah-14
Generate a production-grade logo (primary brand mark).
SkillDFreshness: D★ 24Claude Code +9 - 0.469score
og-image
MohamedAbdallah-14
Generate an Open Graph / Twitter Card social unfurler image — 1200×630 JPEG/PNG, <5MB, with deterministic typography.
SkillDFreshness: D★ 24Claude Code +9
Signals
- Stars
- 24
- Forks
- 3
- Open issues
- 3
- Contributors
- 2
- Last commit (this folder)
- Apr 21, 2026 (6 months ago)
- Last release
- Apr 26, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.283score
asset-validation-debug
MohamedAbdallah-14
Diagnose and repair asset-generation failures.
SkillDFreshness: D★ 24Claude Code +9 - 0.283score
asset-validation-debug
MohamedAbdallah-14
Diagnose and repair asset-generation failures.
SkillDFreshness: D★ 24Claude Code +9 - 0.283score
asset-validation-debug
MohamedAbdallah-14
Diagnose and repair asset-generation failures.
SkillDFreshness: D★ 24Claude Code +9
More from MohamedAbdallah-14
- 0.715score
unslop
MohamedAbdallah-14
Humanize LLM output so it reads like a careful human wrote it.
SkillBFreshness: B★ 161Claude Code +9 - 0.710score
unslop-file
MohamedAbdallah-14
Humanize natural-language memory files (CLAUDE.md, todos, preferences, docs) by removing AI-isms and adding burstiness while preserving every code block, URL…
SkillBFreshness: B★ 161Claude Code +9 - 0.709score
unslop-reasoning
MohamedAbdallah-14
Strip AI-slop patterns from reasoning traces (chain-of-thought, extended thinking, agent decomposition) — not final prose.
SkillBFreshness: B★ 161Claude Code +9 - 0.709score
unslop-commit
MohamedAbdallah-14
Rewrites commit messages so they sound like a careful human engineer wrote them.
SkillBFreshness: B★ 161Claude Code +9 - 0.709score
unslop-review
MohamedAbdallah-14
Rewrites code review comments so they read like a human teammate wrote them.
SkillBFreshness: B★ 161Claude Code +9 - 0.706score
unslop-help
MohamedAbdallah-14
Quick-reference card for unslop modes, sub-skills, and slash commands.
SkillBFreshness: B★ 161Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get asset-validation-debug running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
asset-validation-debug skill. Agent Mart. https://agentmart.dev/skills/mohamedabdallah-14-asset-validation-debug (last updated 2026-10-24)