SuperAPI AI Directory

photocraft-restore-old-photo

Design & creation

View repository

Updated 11-01 02:01

About this skill

Old Photo Restoration

Task Starting Point

First read the material and confirm the delivery purpose, target size or duration, modification scope, and required format. Directly adopt reasonable defaults for details that can be determined from the task and material; only ask about missing conditions that would change the result.

When a visible editor is needed, hand off to the photocraft-editor skill. Standalone installation:npx skills add full-aigc-skills/photocraft-skills --skill photocraft-editor. The currently added skill is a local candidate; use the local companion plugin before release, and do not treat this installation command as proof of publication.

Before execution, use the Restoration Operations Manual to determine damage, processing order, and degradation boundaries.

Execution Steps

  1. Mark by zone: scratches, mildew spots, fading, and missing areas; protect faces, text, and photo edges separately.
  2. First correct rotation and check the overall grayscale; after local restoration checks pass, use editable adjustment layers to recover midtones, and do not sharpen noise first.
  3. Duplicate the restoration layer, and in a small area of the background try the healing brush or clone; sample along the same texture and avoid facial feature boundaries.
  4. Restore zone by zone with short strokes, frequently toggling the original for comparison; when large missing areas have no reliable reference, keep the damage and explain.
  5. Finally apply light noise reduction and output-size sharpening; colorization is performed only when explicitly needed and the corresponding capability is available.

Specific Operation Plan

Usephased methods and parametersandstandalone operation plan. First complete local retouching and review the checkpoint, then perform optional noise reduction and overall levels; the specific CLI, MCP calls, and save-reopen methods are all within this skill. It improves the existing workflow and does not add scenario counts.

Generate a local plan based on actual pixels

First fill in input sampleusing the current document's actual width and height, confirmed damage strokes, and same-texture sampling points, then execute python3 <本技能目录>/scripts/repair_plan.py --input actual-input.json --output local-plan.json. Coordinate units are pixels; do not reuse sample positions.protected is a rectangular protection zone for faces, text, etc. declared after material inspection, not an automatic recognition result.

The script only generates duplicate working layers and local restoration commands; it does not call CLI/MCP, does not modify images, and does not perform overall color grading. It checks brush radius, the conservative bounding box between adjacent points, and the sampling range of the healing brush as it moves with the stroke; touching a protection zone or crossing the canvas is rejected. Conservative rectangles may falsely reject safe diagonal lines; after viewing the image, split them into shorter strokes, but do not delete protection zones to bypass. Undeclared areas are not protected by this check; the algorithm's actual affected range and final image quality still must be verified in the exported image.

After reading the output steps, first duplicate the working layer on the confirmed active pixel layer, read back the current layer, then call command_run one by one according to the current tool schema; do not send a group of steps and assume all succeeded. The CLI's run/--cmd format follows this skill's specific operations manual. Save the local stage as a new project and PNG; after checking damage and protection zones, only then decide whether to execute the original overall tone stage. The script refuses to overwrite when the output file already exists.

Tool Implementation

Use doc_open/doc_new to open or create, doc_inspect to view layers; command_list to query actual commands, command_run to execute; doc_save to save .pcraft, doc_export to export.

Read the actual tool schema first, then fill in the parameters; use returned values for object or document IDs. Queried commands must be available in the current backend. Before saving, choose a new output path and preserve the input. When a required algorithm, format, or command does not exist, state the gap; do not pass off a similar name as the real thing.

Result check

  • At 100% view, check whether the eyes, mouth corners, and nostrils are distorted; check the edges for repeated texture and blur patches.
  • Zoom out to check whether the tonality looks natural; untouched areas should retain their original texture.
  • Deliver the layered project, the retouched image, and a same-size before/after comparison; mark speculated reconstructed areas separately.

Check the actual content against the user's goal, not just the process exit code. For local edits, inspect local details; for layout tasks, inspect the full page; for time-based media, inspect the start, end, and key segments. If results are abnormal, check the current project first to avoid repeating irreversible operations.

Delivery

Return the editable project, the actual derived files, and a brief explanation: what changes were made, which steps were not executed due to current capabilities, and what needs the user's judgment. List only files that actually exist and have been checked. If the user later requests rework, read this session's source project and make local modifications, preserving the content already accepted.