Wiggly / Format Lab /

rim-portrait-filter

agent-ready
v1.0.0

Rim Portrait Filter

Turn one portrait into a centered, sculptural silhouette with a white-to-gray halo and fine rim light catching the hair.

One source image in. 1 inspected image out.

Download runnable kit

Gathered source proof

Judge identity preservation, centered portrait geometry, a clean white-to-gray halo, deep sculptural shadow, fine hair rim light, and photographic realism.

Proof the halo can preserve identity
Wiggly built-in proof

Proof the halo can preserve identity

  • The fixture identity and distinctive hair remain recognizable
  • Backlight separates every strand from the gray halo
  • The face and shirt fall into one controlled sculptural shadow
Let the curls carry the rim
Nano Banana Pro · SKAI source

Let the curls carry the rim

  • The dense curls create an immediate luminous outline
  • The centered crop stays monumental
  • The face remains visible without weakening the silhouette
Keep every braid legible
Nano Banana Pro · SKAI source

Keep every braid legible

  • Individual braids retain crisp texture against white
  • The shoulders anchor the centered geometry
  • Minimal fill preserves a mysterious expression
Make an unusual silhouette feel iconic
Nano Banana Pro · SKAI source

Make an unusual silhouette feel iconic

  • The tall hood stays readable in one simple outline
  • The white tank creates a restrained second value
  • Symmetry turns the costume into a sculptural portrait
Let profile texture break the symmetry
Nano Banana Pro · SKAI source

Let profile texture break the symmetry

  • The three-quarter profile proves the lighting recipe can flex
  • Loose locs catch isolated points of rim light
  • The jacket collar remains tactile inside deep shadow
Use the hat as the whole outline
Nano Banana Pro · SKAI source

Use the hat as the whole outline

  • The brim produces a clean graphic silhouette
  • The centered chest-up crop holds the original recipe
  • A narrow rim keeps the hat and curls separated
Hold detail inside an almost black hood
Nano Banana Pro · SKAI source

Hold detail inside an almost black hood

  • The hood stays distinct from both hair and background
  • Sunglasses remain barely readable without adding excess fill
  • The tonal restraint keeps the frame cinematic

Exact gathered prompt

Front-facing chest-up portrait of the subject from the reference image, maintaining exact identity. The pose is relaxed yet upright with a slight head tilt, centered in perfect symmetry. The background features a clean white-to-gray gradient creating a subtle halo glow. Lighting is minimal and high-contrast, with a strong backlight forming a deep silhouette. Fine hair strands catch soft rim light, adding texture, while clothing remains barely visible. The look is cinematic, sculptural, and mysterious.

Source: @skaigenerated · model shown: Nano Banana Pro

The official run

Prepare -> Validate -> Transform -> Inspect

  1. 1. prepare
    free

    One run pinned to the portrait, exact gathered prompt, and selected model route.

  2. 2. validate
    free

    The portrait and prompt contract checked locally.

  3. 3. transform
    paid

    One rim-lit portrait from one approved prediction.

    Explicit approval required

  4. 4. inspect
    free

    Automatic file checks plus an actual visual review.

    Explicit approval required

Model routes

  • economy: Nano Banana 2 Lite · 3:4
  • default: Nano Banana 2 · 3:4
  • premium and source: Nano Banana Pro · 3:4

What prevents waste

  • The complete contract validates locally before spending.
  • Paid generation needs an explicit approval flag.
  • The prediction ID is saved before polling.
  • Interrupted jobs resume instead of duplicating.
  • Three attempts is the hard cap.

Repo files

Agent instructions SKILL.md
---
name: wiggly-rim-portrait-filter
description: Turn one portrait into a centered sculptural silhouette using the exact gathered SKAI rim-light prompt.
---

# Rim Portrait Filter

Use the packaged runner and exact prompt. Do not call Replicate separately or
create another render path.

Ask one short question:

> Which portrait should I turn into a Rim Portrait?

Then run:

```bash
npm run format:skai-image -- init --format=rim-portrait-filter --run=<id> --input=<absolute-image-path>
npm run format:skai-image -- validate --format=rim-portrait-filter --run=<id>
npm run format:skai-image -- estimate --format=rim-portrait-filter --run=<id>
npm run format:skai-image -- render --format=rim-portrait-filter --run=<id> --approve-paid
npm run format:skai-image -- inspect --format=rim-portrait-filter --run=<id>
npm run format:skai-image -- inspect --format=rim-portrait-filter --run=<id> --visual-pass --review-notes="<specific observations>"
npm run format:skai-image -- finalize --format=rim-portrait-filter --run=<id> --approve-final
```

Hard rules:

- Preserve the source identity.
- Keep the exact gathered prompt unless the user explicitly requests a change.
- Use Nano Banana 2 by default, Lite for economy, or Pro for premium and the creator's source route.
- Validate before spending and never render without `--approve-paid`.
- Persist and resume the prediction id.
- Never exceed three attempts.
- View the output and record specific visual-review notes before finalizing.
- Never print, store, or commit `REPLICATE_API_TOKEN`.
Replicate BYOK requirements requirements.json
{
  "runtime": {
    "node": ">=22",
    "commands": ["npm"]
  },
  "providers": [
    {
      "name": "Replicate",
      "models": [
        "google/nano-banana-2-lite",
        "google/nano-banana-2",
        "google/nano-banana-pro"
      ]
    }
  ],
  "environment": [
    {
      "name": "REPLICATE_API_TOKEN",
      "secret": true,
      "requiredFor": ["render", "resume"]
    }
  ],
  "notes": [
    "All smoke and validation commands are local.",
    "No Replicate proof call was made for this package.",
    "One render attempt is one paid prediction.",
    "Paid generation requires explicit approval and is capped at three attempts."
  ]
}
Input contract and model routing inputs.json
{
  "required": [
    {
      "id": "portrait",
      "type": "image",
      "formats": ["jpg", "png", "webp"],
      "minimumWidth": 512,
      "minimumHeight": 512,
      "maximumBytes": 26214400
    }
  ],
  "question": "Which portrait should I turn into a Rim Portrait?",
  "defaults": {
    "model": "nano-banana-2",
    "aspectRatio": "3:4",
    "outputCount": 1
  },
  "modelRoutes": {
    "economy": "google/nano-banana-2-lite",
    "default": "google/nano-banana-2",
    "premium": "google/nano-banana-pro",
    "source": "google/nano-banana-pro"
  }
}
Paid-call and resume contract pipeline.json
{
  "progress": "Prepare -> Validate -> Transform -> Inspect",
  "attemptCap": 3,
  "stages": [
    {
      "id": "prepare",
      "output": "One run pinned to the portrait, exact gathered prompt, and selected model route.",
      "paid": false,
      "approvalRequired": false
    },
    {
      "id": "validate",
      "output": "The portrait and prompt contract checked locally.",
      "paid": false,
      "approvalRequired": false
    },
    {
      "id": "transform",
      "output": "One rim-lit portrait from one approved prediction.",
      "paid": true,
      "approvalRequired": true
    },
    {
      "id": "inspect",
      "output": "Automatic file checks plus an actual visual review.",
      "paid": false,
      "approvalRequired": true
    }
  ]
}
Exact gathered prompt prompts/transform.txt
Front-facing chest-up portrait of the subject from the reference image, maintaining exact identity. The pose is relaxed yet upright with a slight head tilt, centered in perfect symmetry. The background features a clean white-to-gray gradient creating a subtle halo glow. Lighting is minimal and high-contrast, with a strong backlight forming a deep silhouette. Fine hair strands catch soft rim light, adding texture, while clothing remains barely visible. The look is cinematic, sculptural, and mysterious.
Automatic and visual gates quality.json
{
  "automatic": [
    "Exactly 1 decodable JPG, JPEG, PNG, or WebP output",
    "At least 640x800 pixels",
    "Aspect ratio matches the selected route within 0.02",
    "At least 50 KB"
  ],
  "visual": [
    "The source identity remains recognizable",
    "The portrait is front-facing, chest-up, centered, and nearly symmetrical",
    "A clean white-to-gray gradient creates a controlled halo",
    "Strong backlight leaves the face and clothing in deep silhouette",
    "Fine hair strands catch a visible but restrained rim light",
    "The result looks cinematic and photographic rather than illustrated"
  ],
  "finalization": {
    "automaticPassRequired": true,
    "visualPassRequired": true,
    "reviewNotesRequired": true,
    "explicitApprovalFlag": "--approve-final"
  }
}