SuperAPI AI Directory

photocraft-cli-retouch

Design & creation

View repository

Updated 10-15 21:47

About this skill

PhotoCraft Retouching and Painting

This skill is responsible for repair, cloning, brush, and local retouching on authorized images. It hands off to skills in the same package by name, can be used when installed alone, and does not read sibling directories. It invokes the fixed maintenance build photocraft-cli and preserves the native editing project.

Inputs and Deliverables

The inputs are the user-confirmed task, materials, project or object, output directory, and modification scope; when an existing project is needed, verify the summary first. Return the actual CLI result, the saved native project, the required derived outputs, and the verification record. Report installation success, command directory existence, and creative task completion separately.

First-Time Use and Public Entry Point

Execute the implementation converged in the built-in photocraft-harness skill (installed bundled with the plugin; for standalone installation use npx skills add full-aigc-skills/photocraft-skills --skill photocraft-harness). Set HARNESS_DIR to the actual load directory (absolute path) of that skill; this skill's SKILL_DIR is only used to read its own examples/ and references/。

locate the real directory of the current SKILL.md. Currently supports macOS arm64, Python 3.11+; the fixed CLI is installed to the user data directory. When existing task authorization covers the necessary dependencies, directly execute this skill's installer and do not create a separate approval process.

Set SKILL_DIR to the directory (absolute path) of this SKILL.md actually loaded by the host. User-level installation may be located in ~/.agents/skills/photocraft-cli-retouch, project-level may be located in .agents/skills/photocraft-cli-retouch, and plugins may be located in their skills/photocraft-cli-retouch or the host cache directory; use the actual load path as the standard, do not guess based on the current working directory, and do not search and then arbitrarily select a duplicate version. The skill directory and the CLI's user data installation directory are two independent locations.

: "${SKILL_DIR:?请先设置为本 SKILL.md 的实际所在目录}"
python3 -I -B "$HARNESS_DIR/scripts/bootstrap.py"
python3 -I -B "$HARNESS_DIR/scripts/cli.py" -- --version
python3 -I -B "$HARNESS_DIR/scripts/cli.py" -- commands --json

CLI argv follows -- , and the native subcommand must come first. Installation parameters go before the separator;--runtime-home can isolate the cache. Stop when locked artifact digest verification fails, the installation is corrupted, or the platform is unsupported; do not modify PATH and do not perform floating upgrades. The native help entry point is help; the launcher's own --help only explains startup parameters.

Scenario Operations

Verify this scenario's inputs, native project, target object, version, and output boundaries. Select the current command according to the scenario guide , save an independent checkpoint, and then execute; after completion, reopen the native project and check the actual output and non-target content.

Read params from commands --json --filter <关键词> ;run <工程> --cmd <id> --params <JSON> ... --out <新工程.pcraft>, each --params belongs to the preceding --cmd; serve/MCP can remain in a single session.

Brush stroke coordinates and sampling sources must be explicitly specified; local retouching preserves unmodified areas, and algorithmic outputs require visual inspection.

Native composition and source project revisions use the built-in photocraft-harness skill's scripts/workflow.py; read the workflow contract, and the templates are in this skill's examples. Modify only authorized objects, preserve the native project and dependent materials, and for derived format loss read the exchange report。

Verification and Recovery

A non-zero command exit does not count as completion; it is necessary to inspect the actually saved project, exports, dimensions, and media decoding. Timeout results are marked unknown; check the original task/project first, and do not automatically replay edits. Existing native workflows support save-as revisions; refuse to overwrite when the corresponding project summary does not match.

On-Demand Reference and Handoff

  • Actual command evidence: Fixed-version observation, for routing and parameter reference only; real-time results take precedence, and disabled items are not executed.
  • Workflow Contract: Composite operations, native saving, dependency collection, and revisions.
  • When installation/diagnostics are needed, hand off to photocraft-cli-setup; hand off full task routing to photocraft-use; when a skill is missing, use npx skills add full-aigc-skills/photocraft-skills --skill <skill-name>. Do not load other skills via adjacent file paths.

This skill does not provide a fictional login interface; local headless does not require a cloud account. The PhotoCraft bridge's control-token is local application access control, which differs from cloud login. Full GUI, cross-editor fidelity, and creative quality are stated based on actual evidence.

Local modifications to the source project may declare protectedRegions; before release and delivery, check pixels in non-target areas; see this skill'sProtected Region Contract. When no region is declared, do not automatically infer the protection scope.

Full native command usage

The current skill includes complete catalog parameter descriptions and same-session entry points, and is not restricted by the creative template allowlist. Read Complete Usage Guide, and query as needed Command Reference; each instruction has a skill route, prior observation, and acceptance status.

python3 -I -B "$HARNESS_DIR/scripts/commands.py" list --filter QUERY
python3 -I -B "$HARNESS_DIR/scripts/commands.py" describe COMMAND_ID
python3 -I -B "$HARNESS_DIR/scripts/commands.py" run "$SKILL_DIR/examples/commands-advanced.json" --output /absolute/new-command-result

Before executing a new entry point, check the actual registry and current executable status, and retain return-value references and step-by-step receipts; do not pass off semantic errors or timeouts as success. Catalog coverage and direct native use do not mean that all commands, GUI, delivery, or Art orchestration have been accepted.

For the full workflow command gateway, see Usage Instructions. For the fixed CLI's version and artifact digest, refer to the built-in photocraft-harness skill's scripts/runtime.lock.json ; the skill package version is based on the corresponding release tag. Independent installation re-verification and full command-by-command acceptance are recorded separately; release does not replace acceptance.

For editable local adjustments and source rework, see Mask Adjustment Usage Instructions; paired plans are in this skill's examples, with source candidates and fixed installation evidence kept separate.

For GUI tasks, you may first use this skill's built-in Fixed Desktop Installation; installation, startup, and actual GUI editing are verified separately.

Complete attribution commands are listed by command family in Categorized Usage List; each item can be viewed via this skill's commands.py describe to see parameters; the general CLI list also retains all commands not assigned to specialized skills.

For business tasks, start from Scenario Operation Manual , and execute according to input checks, template adaptation, native delivery, local rework, and result verification.

When installation fails, read First-Time Use Diagnostics, and use the receipt to locate the current skill's own setup entry point; handle installation failure and native invocation failure separately.

For product local filter, background blur, and output sharpening tasks, read Filter Scenarios, distinguish editable filters from baked pixels, and verify selections, layers, and non-target content.

Brush presets and layer view scenarios: see Usage Guide and Complete Plan. First verify names and layer context, and clarify the impact of deleting presets within a group.

Same-target execution protection

Before invoking a public workflow, read this skill's Execution Logging and Interruption HandlingCompetition or unknown status must not delete registrations, automatically replay, or bypass verification by changing targets.

Before delivery, moving packages, or reworking the source project, follow Delivery Integrity to verify all files and exchange identities in the checklist; read-only checks require no runtime installation.

Scenario contracts and routing

According to Scenario Contract , verify inputs, targets and protection scope, recovery, and acceptance. For complete tasks, select the shortest skill chain by name; when the known result is unclear, first verify the original task and do not replay. For explicit intent, you may use the built-in photocraft-harness skill's scripts/route.py INTENT query entry point; this is a contract query and does not prove that host model dispatch has passed.

PSD delivery requires clearly defined necessary features; observed loss/degradation and unknown necessary items will prevent success. When the user explicitly accepts, record it under the same source version and actual observation summary; do not accept automatically; see this skill'sPSD Exchange and Acceptance Gating。

When flat export requires explicit color/ICC/transparency requirements or retention of the source of externally generated assets, read this skill's Flat Export and Provenance Contract。

For runtime/backend identity and capability drift issues, read this skill's Capability Snapshot and Rejection Contract。

Continuous tasks and instance reuse

When the same user task is continuously checked, edited, saved, reopened, and reworked, use this skill's Task-Level Session with the built-in photocraft-harness skill's scripts/task_session.py, keeping the same foreground process and input handle. After failure/unknown, first verify the original receipt and project, and do not start a replacement instance for replay.