Agent instructions SKILL.md
---
name: wiggly-ccd-jpeg-filter
description: Give one existing photo an authentic noisy, compressed late-2000s consumer-camera rendering while preserving its composition, subject, lighting, and colors using the exact gathered SKAI prompt.
---
# CCD JPEG Filter
Use the packaged runner and prompt. Do not call Replicate separately or create
another render path.
Ask one short question first:
> Which photo should I give the CCD JPEG look?
Use Nano Banana 2 by default, Nano Banana 2 Lite for economy, or Nano Banana
Pro for the premium route. Use GPT Image 2 for the source-model route.
```bash
npm run format:skai-image -- check --format=ccd-jpeg-filter
npm run format:skai-image -- init --format=ccd-jpeg-filter --run=<id> --input=<absolute-image-path>
npm run format:skai-image -- validate --format=ccd-jpeg-filter --run=<id>
npm run format:skai-image -- estimate --format=ccd-jpeg-filter --run=<id>
npm run format:skai-image -- render --format=ccd-jpeg-filter --run=<id> --approve-paid
npm run format:skai-image -- inspect --format=ccd-jpeg-filter --run=<id>
npm run format:skai-image -- inspect --format=ccd-jpeg-filter --run=<id> --visual-pass --review-notes="<specific observations>"
npm run format:skai-image -- finalize --format=ccd-jpeg-filter --run=<id> --approve-final
```
Hard rules:
- Preserve the original composition, framing, perspective, lighting, subject, and colors.
- Change only the photographic rendering; do not add, remove, or restage scene content.
- Require dense electronic sensor noise, realistic JPEG artifacts, reduced micro-detail, weak sharpening, and low dynamic range.
- Keep the result accidental and consumer-digital, never cinematic film grain or an obvious retro overlay.
- Validate before spending.
- Never generate without `--approve-paid`.
- Persist and resume the same prediction ID.
- Never exceed three attempts.
- View the actual output and record notes before `--approve-final`.
- 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",
"openai/gpt-image-2"
]
}
],
"environment": [
{
"name": "REPLICATE_API_TOKEN",
"secret": true,
"requiredFor": ["render", "resume"]
}
],
"notes": [
"All smoke and validation commands are local.",
"No Replicate proof generation was purchased for this package.",
"The gathered source examples are the visual proof.",
"Paid generation requires explicit approval and is capped at three attempts."
]
}
Input contract and model routing inputs.json
{
"required": [
{
"id": "photo",
"type": "image",
"formats": ["jpg", "png", "webp"],
"minimumWidth": 512,
"minimumHeight": 512,
"maximumBytes": 26214400
}
],
"question": "Which photo should I give the CCD JPEG look?",
"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",
"sourceModel": "openai/gpt-image-2"
}
}
Paid-call and resume contract pipeline.json
{
"progress": "Prepare -> Validate -> Transform -> Inspect",
"attemptCap": 3,
"stages": [
{
"id": "prepare",
"output": "A run pinned to the source photo, exact gathered prompt, and chosen model route.",
"paid": false,
"approvalRequired": false
},
{
"id": "validate",
"output": "The image and complete provider contract checked locally.",
"paid": false,
"approvalRequired": false
},
{
"id": "transform",
"output": "One scene-preserving CCD JPEG-style image from the selected Replicate model.",
"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
Transform the image into an authentic low-quality digital photograph captured on an inexpensive late-2000s consumer camera. Preserve the original composition, framing, perspective, lighting, subject, and colors while changing only the photographic rendering. The image should look naturally imperfect, not intentionally stylized.
Apply an extremely dense layer of fine digital sens or noise across the entire frame, including the sky, walls, shadows, and all smooth surfaces. The grain must be tight, uniform, and electronic rather than cinematic film grain, with subtle chroma noise visible in darker regions.
Simulate heavy JPEG compression with realistic compression artifacts, slight blockiness, texture smearing, and reduced micro-detail. Fine textures such as leaves, grass, clouds, distant objects, and walls should lose crispness while remaining recognizable.
Lower the overall dynamic range. Introduce slightly crushed blacks, noisy shadows, softly clipped highlights, and imperfect automatic exposure. Midtones should feel slightly underexposed while bright areas retain a soft glow without looking HDR.
Reduce local contrast and optical sharpness to mimic inexpensive consumer camera optics. Edges should appear naturally soft with weak digital sharpening, never crisp or modern.
Preserve natural color saturation while allowing the heavy digital noise and compression to subtly contaminate colors. Reds remain vibrant, blues slightly cyan, greens lean slightly olive, and white balance should feel imperfect, as if determined by an old automatic camera.
The final image should resemble a heavily compressed social media screenshot of an old digital photograph, as if it had been captured on a cheap camera, uploaded, downloaded, and re-shared multiple times. The imperfections should feel authentic and accidental rather than applied as an obvious retro filter.
Visual Characteristics
Dense fine digital sensor noise
Uniform electronic grain
High ISO appearance
Heavy JPEG compression artifacts
Slight pixel smearing
Weak sharpening
Reduced micro-detail
Slightly underexposed midtones
Soft highlight clipping
Crushed noisy shadows
Low dynamic range
Slight automatic white balance inconsistency
Soft inexpensive optics
Natural colors with subtle digital contamination
Archived internet photo aesthetic
Early social media compression
Authentic consumer digital camera rendering
Negative Prompt
Modern smartphone photo, DSLR, mirrorless camera, cinematic lighting, HDR, ultra sharp, crystal clear, computational photography, AI hyper-detail, clean noise reduction, glossy finish, film grain, analog film, Polaroid, disposable camera, Fujifilm simulation, Kodak Portra, Leica rendering, professional photography, perfect optics, vibrant HDR colors, oversharpening, modern image processing, unrealistically clean textures.
Automatic and visual gates quality.json
{
"automatic": [
"Exactly 1 decodable JPG, PNG, or WebP output",
"At least 640x800 pixels",
"Aspect ratio within 0.02 of the selected route",
"At least 50 KB"
],
"visual": [
"The original composition, framing, perspective, lighting, subject, and colors remain recognizable",
"Dense fine electronic noise covers smooth surfaces and shadows without reading as cinematic film grain",
"JPEG blockiness, smearing, reduced micro-detail, and weak sharpening feel naturally accumulated",
"Crushed noisy shadows, softly clipped highlights, and imperfect automatic exposure lower the dynamic range",
"The result feels like a cheap late-2000s camera file repeatedly uploaded and reshared, not a clean modern image with a retro overlay"
],
"finalization": {
"automaticPassRequired": true,
"visualPassRequired": true,
"reviewNotesRequired": true,
"explicitApprovalFlag": "--approve-final"
}
}