AI Art Engine 中文
Menu

Developers · v9.0.0 · Skill Marketplace & Workflow SDK

Skill Marketplace Developer Docs

For developers publishing content to the skill marketplace or integrating Claude Code skills: what the marketplace contains, what the content looks like, how it is validated and distributed, and what the client does with it after install. The author-side, field-by-field writing rules live in the content repository (see “Content repository” below); what follows is the client contract, Claude Code skill specification support, and the delivery pipeline — the part you can only see on the app side.

For the user-facing side of the marketplace, see the manual §5.7 Skill marketplace.

Related client implementations: src/main/agent/ (v9.0 in-process Pi Agent runtime, native skill tool, load_toolset lazy MCP engine, and piSessionStore.ts lock-free JSON session store), src/shared/claudeSkill.ts (Claude Code skill specification & frontmatter parser), src/main/services/claudeSkillRuntime.ts (variable substitution, !`cmd` preprocessing, hooks / fork subagent / allowed-tools governance), src/main/services/githubSkillInstaller.ts (direct GitHub skill installer), src/shared/graph/nodeCapabilities.ts (native canvas node capabilities), src/shared/skillMarket.ts (contract and parsing), src/main/services/marketPipeline.ts (download / cache / atomic install), src/main/services/skillMarketService.ts (catalog, compatibility, install bookkeeping), src/renderer/src/views/MarketplaceView.vue (the UI).

1. What the marketplace contains

The skill marketplace is a separate window (opened by the “Skill Marketplace” button in the top bar, immediately to the left of “Settings”) with three tabs:

Tab Content Hosted at
All MCP servers and all skills mixed together, with search and a direct GitHub skill install bar —
MCP The built-in aiartengine tool service, the Blender tool surface, and third-party MCP servers the user adds themselves (http / stdio) In-app + the user’s local config
Skills Official / community market skills (may ship a workflow.json canvas template), GitHub-installed skills, project-scoped skills (.claude/skills / .agents/skills), and custom local skills Content repository + any GitHub repo + workspace + <userData>/dsh-harness/skills

Why are there only three tabs, and why are “built-in node skills” no longer listed here?

  • Built-in node prompts are now native canvas node capabilities: earlier releases wrote 40+ canvas node default prompts as flat .md files into <userData>/dsh-harness/skills/. After refactoring, node generation capabilities (defaultSystemPrompt, usage, inputBindings, etc.) live directly on the node capability registry (src/shared/graph/nodeCapabilities.ts) and are exposed to the Agent through MCP graph_node_types rather than polluting the skills directory.
  • Workflows and skills are unified under the “Skills” tab: entries in the remote repository are fundamentally “an operator’s manual for the Agent (SKILL.md) + an optional One-Click Workflow canvas template (workflow.json)”. Once installed, an entry can both materialise its node graph under “New → One-Click Workflow” and drop its skill bundle into <userData>/dsh-harness/skills/<skill.name>/ (discovered and loaded seamlessly by the in-process Pi Agent’s native skill tool), managed as a single unified card in the Skills tab.

Content repository

  • Primary source: https://github.com/Justin-sky/ai-art-engine-skills (raw path /main)
  • Mirror: https://gitee.com/beijing_blue_whale_era_zhangjian/ai-art-engine-skills (raw path /main)

The two repositories must be byte-for-byte identical — any difference produces “same version number, different content”, the hardest class of state to debug. Syncing is described in the repository README.

The author-side field rules, review criteria and per-item rejection reasons live in the content repository’s CONTRIBUTING.md; the directory layout and the meaning of each workflow.json field are in that repository’s README.md. Those rules are not repeated here — this page only covers the client behaviour they don’t.

2. The delivery pipeline: no step can be skipped

Contributor submits workflows/<id>/{workflow.json, cover.png, skill/**}
   ↓  CI validation (validate.mjs + unit tests)
   ↓  build-index.mjs derives index.json from disk (including the skill file list)
Client fetches index.json (primary source first, falls back to the mirror on failure)
   ↓  user clicks “Install”
Downloads workflow.json + cover.png (+ skill files)
   ↓  atomic install (staging → rename; a failure leaves nothing half-installed)
<userData>/workflows/<id>/            the canvas template itself
   ↓  within that same install
<userData>/dsh-harness/skills/<skill.name>/   skill bundle (installed together with the entry)
   ↓
the in-process Pi Agent discovers the skill → injects <available_skills> → loads via native skill tool or /slash

2.0 Single source of truth: lean built-in core + standalone ai-art-engine-skills distribution

Domain workflow presets live outside the desktop client repository in the standalone open-source repository ai-art-engine-skills as the single source of truth (the legacy duplicate preset registry and sync/export scripts inside the main app repo were removed during this migration, eliminating “same name, different graph” drift between client and marketplace):

  • Lean built-in core preset: the desktop app core (src/renderer/src/features/aiWorkflow/presets.ts) ships the minimal offline built-in preset builtin.video-breakdown-remake (the 2-node semantic.analyze → semantic.rebuild forensic video breakdown & 1:1 remake pipeline).
  • Official & community domain skills and workflows: short/comic drama (short-drama), game production, e-commerce posters, audiobooks, 3D pipelines, and community packs all live in ai-art-engine-skills (standard layout skills/<slug>/SKILL.md + workflows/<slug>.aiae-workflow.json, alongside catalog entries under workflows/<id>/{workflow.json, cover.png, skill/**}).
  • End-to-end UI & MCP installation: users and external Agents can browse and install workflows from the top-bar Skill Marketplace window or inspect, install, and materialize them programmatically via the 6 native MCP tools: skill_list, skill_search, skill_inspect_github, skill_install, skill_uninstall, and workflow_use_installed (see MCP Integration Guide).
  • Exporting & publishing a new workflow: build and verify your node graph on the canvas, right-click and choose “Export as marketplace workflow” (or export a PNG recipe carrying an embedded aiae:graph chunk), fill in metadata and cover image to generate a clean bundle (requires.nodeTypes is derived automatically from plan, while transient runtime write-back fields are stripped), and run node scripts/build-index.mjs && node scripts/validate.mjs inside ai-art-engine-skills before opening a PR.

2.1 Derived fields in the index are generated by scripts — never hand-write them

Every one of these fields in index.json is derived from disk by scripts/build-index.mjs:

  • requires.nodeTypes (which node types the workflow uses), requires.appMinVersion
  • nodeCount / edgeCount / sizeBytes
  • skill: the skill bundle’s name, description, whether it contains scripts, its file list, and its total size

The last one matters most, and the reason is worth writing down:

A raw source has no directory-listing API. The client must know every file’s path up front in order to download them one by one, so the skill bundle’s file list can only be derived server-side (by the repository scripts). Having the script generate that list from disk makes “list drifts from disk” impossible — and that drift is exactly the failure a hand-written list is guaranteed to hit.

workflow.json does not carry the skill file list: the only declaration is the fact that skill/SKILL.md exists. CI compares the index against the disk-derived result, and a hand-edited index is rejected.

2.2 Why workflow-bundled skills in the catalog carry the wf- prefix

A skill bundle lands in <userData>/dsh-harness/skills/<name>, sharing the same directory as GitHub-installed Claude Code skills and custom user skills. Therefore, skill bundles distributed alongside a canvas template in ai-art-engine-skills are required to use wf-<workflow id> as their name, preventing collisions with general-purpose Claude Code skills at the source. The repository validator enforces this rule.

2.3 Skill bundle file layout

workflows/<id>/skill/              # or standalone layout skills/<slug>/ + workflows/<slug>.aiae-workflow.json
  SKILL.md          required. frontmatter: name(wf-<id>) / description / workflow: <id>
  references/       optional. port and parameter cheat sheets, long contracts, examples
  scripts/          optional. see §4
  assets/           optional
  examples/         optional (also supported for direct GitHub Claude Code skills)
  templates/        optional (also supported for direct GitHub Claude Code skills)
  • Only the standard subdirectories above are allowed; symbolic links are not.
  • Single file ≤ 128KB, whole bundle ≤ 512KB, file count ≤ 40 (the client downloads file by file, so there has to be a ceiling).
  • description ≤ 500 characters: the skill catalog truncates it, and it is the only thing the Agent can see before deciding whether to load this skill — write “when should this be loaded”, not a feature list.

2.4 Allowed node namespaces in workflow presets & skill bodies (v9.0.0)

The repository validator strictly checks node types in workflow preset plans as well as backtick-wrapped x.y tokens inside a skill’s body. In v9.0.0, the 18 allowed canvas node namespaces are:

input.*     text.*      image.*     video.*     voice.*     audio.*
film.*      game.*      ui.*        novel.*     semantic.*  script.*
stage.*     director.*  model3d.*   world.*     gameplay.*  output.*

Any x.y token whose prefix x belongs to one of the known node namespaces above must resolve to a real node typeId in the client’s graph_node_types registry.

Why it deserves its own rule: a skill is an operator’s manual written for the Agent, and the Agent will follow the typeId values in it when it builds a graph with graph_edit. Invent a type that doesn’t exist (image.pic and the like) and the Agent writes a broken graph. Filtering by namespace ensures file spellings like cover.png / references/ports.md / SKILL.md are not caught by mistake. Write parameter names in their own backticks (for example generateAspectRatio) rather than as the dotted form type.param.

2.5 Claude Code skill specification support & direct GitHub install

In addition to installing from the official ai-art-engine-skills catalog, the client natively supports the full Claude Code Skill (SKILL.md) specification and direct installation from any GitHub URL:

  • Direct GitHub install (githubSkillInstaller.ts): paste owner/repo, https://github.com/owner/repo, https://github.com/owner/repo/tree/<branch>/<subpath>, or .../blob/<branch>/<subpath>/SKILL.md into the GitHub install bar at the top of the marketplace. The installer resolves the file tree via the GitHub Tree API, enforces size and subdirectory limits, prompts for script consent (§4) when scripts/ is present, and writes .source.json with the repository, branch, subpath, and commit SHA so the skill can be updated or uninstalled in one click.
  • Multi-scope discovery: project scope (<workspace>/.claude/skills/<name>/SKILL.md and <workspace>/.agents/skills/<name>/SKILL.md, highest priority) > personal/market scope (<userData>/dsh-harness/skills/<name>/SKILL.md).
  • Full Frontmatter support (claudeSkill.ts): supports name, description, argument-hint, disable-model-invocation, user-invocable, allowed-tools (including Bash(git *) glob patterns), model, context: inline | fork (fork runs the skill in an isolated subagent context), agent, hooks (PreToolUse / PostToolUse / Stop), when_to_use, version, license, author, and workflow.
  • Argument interpolation & dynamic context injection (claudeSkillRuntime.ts): expands $ARGUMENTS, $ARGUMENTS[n], positional $0..$9, ${CLAUDE_SKILL_DIR}, ${CLAUDE_SESSION_ID}, and ${WORKSPACE_ROOT}; preprocesses inline !`command` expressions in the workspace directory (governed by user command approval) before handing the rendered skill body to the model.

3. Client install contract

3.1 Cards and actions

In the Skills (and All) tab, the top bar provides a direct GitHub skill install input alongside local skill actions (open directory / generate an example template / import a custom skill). Remote catalog cards carry Install / Update / Reinstall / Uninstall and Details directly, with no need to open the details page first. Card badges show Includes skill or Includes skill · Includes scripts — so the user knows before installing that the Agent side will receive an extra manual (and the same applies, more so, when scripts are involved).

Installed catalog entries show their “Installed” badge and management buttons directly on the catalog card (without rendering a duplicate card in the list), while GitHub-installed skills, project-scoped skills (.claude/skills), and custom local skills appear as standalone skill cards that can be inspected, updated, or removed.

3.2 Atomicity and rollback

Installation goes through marketPipeline: download into staging first, rename into place only once everything is ready, clean up on failure. A skill bundle and the workflow it belongs to live and die together: if the skill fails to install (or fails validation), the workflow itself is uninstalled as well and the failure reason is returned. The reasoning is direct — a card that says “Includes skill” while the skill never landed means the UI is lying. Install is idempotent, so retrying is all it takes.

3.3 Pre-install validation (otherwise “installed but invisible”)

The Pi Agent runtime skips invalid SKILL.md files during skill discovery (logging a warning without mounting them). So the client validates SKILL.md during the staging phase: does the frontmatter exist, is name valid, is description non-empty, and do all fields conform to the Claude Code skill specification. If it fails, the install fails with a concrete reason and never leaves behind a skill bundle that is installed but does nothing.

3.4 Uninstall

Uninstalling a catalog entry also deletes the skill bundle that entry installed — only the one directory name recorded in the bookkeeping, never a bulk delete by prefix (the user may have created a skill with the same name). Standalone skills installed from GitHub or imported locally can be uninstalled directly from their card.

3.5 Catalog refresh

Opening the marketplace window force-refreshes the catalog (so pushing new content to the repository shows up just by reopening the window, with no need to wait for a cache TTL). When a refresh fails but content is already on hand, the client keeps the previous list and shows a soft hint instead of replacing existing content with an error. The cache is written to disk per source: primary and mirror each get their own copy, so mirror cache is never mistaken for primary data.

5. Executable-code node (script.run) and consent

§4 is about scripts inside a skill bundle (skill/scripts/, files the AI agent runs on the local machine). This section is a separate, independent path: executable code inside the workflow’s own plan.

script.run is a node type whose code (JavaScript) is a parameter written into the plan, run by the app’s graph execution engine in the renderer process — not the Agent’s host shell. It runs in a restricted sandbox (QuickJS WASM, src/shared/graph/execute/scriptSandboxQuickjs.ts): no file system, no network, no require, no host globals. Only three things cross the sandbox boundary — upstream inputs in, port outputs out, and a set of governed capability calls await om.<capability>(...): the <capability> must be declared in the node’s capabilities whitelist, and every om.* forwards to an app-governed capability (provider / key / quota / log), not a back door. Plus a timeout (deadline interrupt) and a memory cap.

5.1 Detection and derivation (repo + client, same rule)

  • The repo build-index.mjs derives hasExecutableCode: true and a per-node script summary (node key / title / declared capabilities / code char count / short hash) into index.json; contributors do not hand-write these fields (same as requires.nodeTypes and the skill manifest).
  • The client parseSkillMarketEntry / parseWorkflowBundle read those fields and re-validate.
  • The validator checks each script.run node’s bounds: code non-empty and < 100000 chars, capabilities only from the whitelist, port ids valid and unique, limits within hard caps (timeout ≤ 120s, mem ≤ 512MB). Empty / oversized code — things that cannot be normalised — reject the whole workflow (the code is part of the workflow and, unlike a bad skill, cannot be dropped to degrade). Out-of- whitelist capabilities and over-cap resources are normalised in place (dropped / clamped) rather than rejecting the whole thing.

5.2 Install time: executable code needs per-install consent; declining means not imported

  • Workflows with a script.run node show a Contains executable code badge (distinct from a skill’s “includes scripts”).
  • Before install a confirm dialog lists each script node’s declared capabilities and code size.
  • OK = install and allow it to run; Cancel = do not install this workflow — this differs from skill scripts’ “Cancel skips only the scripts and installs the rest”, because the code is part of the workflow and without it the workflow doesn’t stand.
  • Asked on every install, never remembered, no “always allow”. The main process only accepts the literal scriptConsent === true.
  • Locally authored is exempt: script nodes you create / edit in the app yourself don’t go through the marketplace consent flow (you wrote them); only importing from the marketplace gates.
Relationship to skill scripts: the two paths consent independently. A workflow can be both “includes skill · includes scripts” and “contains executable code”, in which case the two dialogs ask separately.

6. Compatibility and versions

  • The index schemaVersion is currently 1; an index newer than the client makes the client report plainly “please update the app” rather than half-render a misleading empty marketplace.
  • An entry may declare requires.appMinVersion: when the app version is below it, the card is disabled and the reason is shown.
  • requires.nodeTypes is derived by the script from the plan: when an older app is missing a node type, that is determined up front and surfaced before install, instead of materialising into a broken graph later.
  • The same content must bump its version: content at an existing version must not be changed again.

7. Local debugging

7.1 In the content repository

node scripts/validate.mjs          # format / dependencies / index consistency / all skill bundle rules
node scripts/build-index.mjs       # rebuild index.json (the derived fields)
node scripts/build-index.mjs --check   # what CI runs: is the index consistent with disk?
node --test scripts/validate.test.mjs  # unit tests for the validator itself

validate.mjs and CI run the very same code — passing locally while failing in CI is not something that should happen.

7.2 On the app side

  • Custom sources: the data layer supports setting skillMarket.source to one or more addresses (blank / comma-separated; once set, only what you set is used, with no official source mixed in, so fallback can’t lead your debugging astray). ⚠️ The settings UI does not expose this input yet — it is a data-layer capability.
  • To verify “did the Agent really load the skill”, inspect the built-in Pi Agent’s lock-free atomic JSON session file (<userData>/dsh-harness/pi-sessions/<sessionId>.json, managed by piSessionStore.ts): open the plain JSON file directly (or export the session as a .zip archive) to verify the native skill tool call (name: "skill", arguments {"name": "<skill-name>"}) and the injected skill body that follows. Don’t rely on prose replies alone — the session JSON gives ground-truth proof of tool execution.

8. Common rejection reasons (client-side view)

Beyond the ones listed in the content repository’s CONTRIBUTING.md, these directly produce “installed but not in effect”:

Symptom Cause
The Agent side has no such skill after install The SKILL.md frontmatter is invalid (the Pi Agent skill loader skips invalid entries). The client’s pre-install validation exists to turn this failure into one readable error ahead of time
A catalog workflow skill bundle is rejected by validation A workflow-bundled skill in the catalog repository is missing the wf- prefix on name
The description gets truncated on the Agent side description exceeds 500 characters
Files don’t match after an update index.json was hand-edited; it must be derived by build-index.mjs
A node type written in the skill can’t build a graph The body contains a typeId that doesn’t exist (the repository validator catches it, but re-run it after editing the body)
Features unavailable after the user declines scripts The skill put its critical steps only in scripts/; scripts must be optional