This skill handles first-time installation, digest verification, version checking, and missing runtime troubleshooting. 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 version photocraft-cli and preserves native editing projects.
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 digest first. Return the actual CLI results, the saved native project, the required derived outputs, and the verification records. Report installation success, command directory existence, and creation task completion separately.
First Use and Public Entry Point
The execution implementation is consolidated 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 loading directory of that skill (absolute path); 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 and Python 3.11+; the fixed CLI is installed to the user data directory. When an existing task authorization covers the necessary dependencies, run this skill's installer directly and do not create a separate approval process.
Set SKILL_DIR to the directory (absolute path) where this SKILL.md actually loaded by the host resides. User-level installations may be located at ~/.agents/skills/photocraft-cli-setup, project-level ones may be located at .agents/skills/photocraft-cli-setup, and plugins may be located in their skills/photocraft-cli-setup or the host cache directory; use the actual loading path, do not guess based on the current working directory, and do not search and then arbitrarily pick 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 the CLI argv, after -- , 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 launch parameters.
Scenario Operations
First read the system/architecture, Python version, and the user's existing authorization; run this skill's bootstrap.py. Verify the executable path, digest, and version in the JSON receipt; do not rely on shell PATH. Repeated invocations reuse the fixed installation; on failure, stop and record the specific error.
Read params from commands --json --filter <关键词> ;run <工程> --cmd <id> --params <JSON> ... --out <新工程.pcraft>, each --params belongs to the preceding --cmd; serve/MCP can remain a single session.
Do not modify PATH and do not use sudo; keep corrupted versions and report an error, without automatic upgrades.
For native composition and source project revisions, use the built-in photocraft-harness skill's scripts/workflow.py; read workflow contract, and templates are in this skill's examples. Modify only authorized objects; preserve native projects and dependent assets, and for derived format loss read exchange report。
Verification and Recovery
A non-zero command exit does not count as completion; the actual saved project, exports, dimensions, and media decoding need to be inspected. Mark timeout results as unknown, check the original task/project first, and do not automatically replay edits. Existing native workflows support Save As revision; refuse to overwrite when the corresponding project digest does not match.
On-Demand Reference and Handoff
- Actual command evidence: Fixed-version observations, for routing and parameter reference only; real-time results take priority, and disabled items are not executed.
- Workflow Contract: Combined operations, native saving, dependency collection, and revisions.
- Hand off to photocraft-cli-setupwhen installation/diagnostics require it, and 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 fictitious login interface; local headless does not require a cloud account. The PhotoCraft bridge's control-token is local application access control, which is different from cloud login. Full GUI, cross-editor fidelity, and creative quality are stated according to actual evidence.
Full Native Command Usage
This skill comes with parameter documentation for the complete catalog and an in-session entry point, and is not subject to the creative template whitelist restrictions. Read Full Usage Guide, and consult as needed Command Reference; each instruction has skill routing, prerequisite observations, 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 use do not mean that all instructions, 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, and release is not a substitute for acceptance.
For editable local adjustments and source rework, see Mask Adjustment Usage Instructions; the paired plans are in this skill's examples, with source candidates and fixed installation evidence kept separate.
For GUI tasks, you can first use this skill's built-in Fixed Desktop Installation; installation, startup, and actual GUI editing are verified separately.
For business tasks, start from Scenario Operation Manual and execute according to input inspection, template adaptation, native delivery, local rework, and result verification.
If installation fails, read First-Use Diagnosticsand use the receipt to locate this skill's own setup entry point; handle installation failures and native invocation failures separately.
For product partial filters, 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 invoking a public workflow, read this skill's Execution Registration and Interruption Handling. In cases of contention or unknown status, do not delete the registration, 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 Contract and Routing
According to Scenario Contract , verify inputs, target and protection scope, recovery, and acceptance. For full tasks, select the shortest skill chain by name; when a known result is unclear, first verify the original task and do not replay. For explicit intent, you 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 clearly defined necessary features; observed loss/degradation and unknown necessary items will prevent success. When the user explicitly accepts, record according to the same source version and actual observation summary, and do not automatically accept; see this skillPSD exchange and acceptance gate。
When flat export requires clearly defined color/ICC/transparency requirements or retaining the source of externally generated assets, read this skill Flat export and source contract。
For runtime/backend identity and capability drift issues, read this skill 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 Task-level session with the built-in photocraft-harness skill's scripts/task_session.py, keep the same foreground process and input handles. After failure/unknown, first verify the original receipt and project, and do not start a replacement instance to replay.