Self-improving agent skills: refactor ad-hoc patches into general math solutions for image-to-3D

teortaxesTex · x · 2026-11-27

The author shares a first-hand agent workflow: create a skill, run it through sequential batches of agents that supply feedback, let a main skill-building agent upgrade it, then prompt "these are ad hoc tricks, refactor into a general mathematical solution" — and with Gemini Neon's image-to-3D-scene reproductions of Z-Image diffusion outputs, this trick finally clicked.

Screenshots detail the refactor: 25 scene-specific patches for the inverse-rendering problem (illustration → 3D scene) collapsed into 4 orthogonal mathematical modules. Examples: a linear inverse solver that captures AOV buffers in one browser pass (<1s) and solves all light/material constants via convex optimization in NumPy (0.2s, L-BFGS/alternating NNLS), eliminating exposure ping-pong, warm-multiplier compounding, and low-key metal blackout; and replacing 8 hand-rolled gate metrics with two canonical functionals — Wasserstein-1 quantile distance in CIELab plus 2D power-spectrum loss.

Related event: Developer Shares Multi-Agent Workflow for Self-Evolving Skills(2 posts)→

Original post →

More from coding & agent

coding & agent channel →