SuperAPI AI Directory

photocraft-cli-masks

Design & creation

View repository

Updated 10-15 21:47

About this skill

PhotoCraft Masks and Clipping

This skill is responsible for creating layer masks, vector masks, and clipping composites. It hands off to skills in the same package by name, can be used when installed alone, and does not read sibling directories. It calls the fixed maintenance-version photocraft-cli and preserves the native editing project.

Inputs and Deliverables

The inputs are the user-confirmed task, assets, project or object, output directory, and modification scope; when an existing project is needed, verify the summary first. Return the actual CLI results, the saved native project, the required derived outputs, and the verification records. Installation success, existence of the command directory, and completion of the creative task are reported separately.

First-Time Use and Public Entry Point

Execution implementation is 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 of that skill (absolute path); this skill's SKILL_DIR is only used to read its own examples/ and references/。

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

Set SKILL_DIR to the directory (absolute path) where the currently loaded SKILL.md is located in the host. A user-level installation may be located at ~/.agents/skills/photocraft-cli-masks, a project-level one may be located at .agents/skills/photocraft-cli-masks, and a plugin may be located in its skills/photocraft-cli-masks or the host cache directory; the actual load path prevails, 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

In CLI argv, after -- , the native subcommand must come first. Installation parameters go before the separator;--runtime-home can isolate the cache. Stop when locking the artifact digest 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 the startup parameters.

Scenario Operations

Verify this scenario's inputs, native project, target object, version, and output boundaries. According to the scenario guide , select the current command, 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 maintain a single session.

Check mask inversion, coordinates, and non-target pixels; keep the cutout result and the original image independently.

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; the native project and dependency assets are retained; for derived format loss, read the exchange report。

Verification and Recovery

A non-zero command exit does not count as completion; the actual saved project, export, dimensions, and media decoding need to be inspected. Mark timeout results as unknown; check the original task/project first, and do not automatically replay the edit. 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, disabled items are not executed.
  • Workflow contract: composite operations, native saving, dependency collection, and revision.
  • When installation/diagnostics require it, hand off to photocraft-cli-setup, hand off full task routing to photocraft-use; when skills are missing, use npx skills add full-aigc-skills/photocraft-skills --skill <skill-name>. Do not load other skills through adjacent file paths.

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

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

Full native command usage

The current skill includes the complete catalog's parameter descriptions and same-session entry points, and is not restricted by the creative template whitelist. Read Full usage guide, 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 real registry and current executable status, retain return value references and step-by-step receipts; do not pass off semantic errors or timeouts as success. Catalog coverage and direct native usage do not equal acceptance of all instructions, GUI, delivery, or Art orchestration.

For the full workflow command gateway, see Usage instructions. For fixed CLI version and artifact digests, rely on the built-in photocraft-harness skill's scripts/runtime.lock.json ; for skill package versions, rely on the corresponding release tag. Independent installation re-verification and full command-by-command acceptance are recorded separately; do not substitute release for 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.

Full attribution commands are listed by command family in Categorized usage list, and each item's parameters can be viewed through this skill's commands.py describe ; the general CLI list also retains all commands not assigned to specialized skills.

Business tasks start from Scenario operation manual and are executed through input checks, template adaptation, native delivery, local rework, and result verification.

When installation fails, read First-time use diagnosticsand use the receipt to locate the current skill's own setup entry point; handle installation failure and native call 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.

Same-target execution protection

Before calling a public workflow, read this skill's Execution registration and interruption handling. For competing or unknown states, do not delete registrations, automatically replay, or switch targets to bypass verification.

Before delivery, moving packages, or source project rework, verify all files and exchange identities according to the Delivery integrity checklist; read-only checks do not require installing a runtime.

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. Explicit intent can 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 explicit required properties; observed loss/degradation and unknown required items will prevent success. When the user explicitly accepts, record it according to the same source version and actual observation summary, and do not accept automatically; see this skill'sPSD Exchange and Acceptance Gate。

When flat export requires explicit color/ICC/transparency requirements or preserving 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 continuously checking, editing, saving, reopening, and reworking the same user task, use this skill's task-level session and 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 substitute instance to replay.