Publish license products with an AI Agent

v1.0.0

This document has not been translated into your language yet, so the English version is shown below.

Publish license products with an AI Agent

For: developers who need to publish multiple license-enabled software products on PowerSoftware (powersoftware.app / 幂栈网) and repeat the "register → apply as partner → upload assets → submit" flow.

1. What this is

We packaged the whole publish workflow as an Agent Skill (a Markdown playbook + dependency-free Node scripts) in a public repo:

The skill teaches Qoder / Claude Code / any compatible agent how to call the platform HTTP endpoints in the right order — and stops hard at every step that must be human.

2. Install in one line

macOS / Linux / WSL:

bash <(curl -sL https://raw.githubusercontent.com/mizhanchengxi/powersoftware-agent-skills/main/install.sh)

Windows PowerShell:

iwr -useb https://raw.githubusercontent.com/mizhanchengxi/powersoftware-agent-skills/main/install.ps1 | iex

Claude Code Plugin Marketplace (recommended for Claude users):

/plugin marketplace add mizhanchengxi/powersoftware-agent-skills
/plugin install publish-license-product@powersoftware-agent-skills

Then just tell your AI assistant "help me publish a TRIAL_FIRST product on PowerSoftware" and the skill activates.

3. What the skill automates

Phase What happens Who does it
1. Register user POST /user/register + email verification code Fully AI-driven
2. Login obtain SESSION_ID cookie Fully AI-driven
3. Apply as partner POST /developer/save submits onboarding profile Fully AI-driven
4. Manual review by platform operators auditStatus transitions to PASS ⛔ Human only — AI stops here
5. Re-login required because the DEVELOPER role is injected only at login Fully AI-driven
6. Upload assets cover / 3–20 detail images / installer, via checkFileExists → getPreSignedUrl → PUT Fully AI-driven
7. Submit product POST /product/submit with the assembled payload Fully AI-driven

4. Why step 4 cannot be automated

The DEVELOPER role is injected only at login, based on developer.auditStatus === PASS:

  • Even if you submitted the application, without approval your session has no DEVELOPER.
  • /product/submit checks session.role.includes(DEVELOPER) first and returns need_developer_role otherwise.

The skill encodes this as a hard pause: apply-partner.mjs prints ⛔ HUMAN GATE and exits. You re-run login.mjs after the operator approves, then publish.mjs succeeds. Do not and cannot bypass this.

5. Why the asset-upload order is non-negotiable

Cover / detail images / installer slots in the payload all store an objectName (a relative URI). Each file must go through three steps:

  1. POST /file/upload/checkFileExists (md5 content-addressed dedupe / instant upload)
  2. POST /file/upload/getPreSignedUrl (returns an R2 pre-signed PUT URL)
  3. PUT the bytes to signedUrl

businessType must be one of the enum values product_cover_picture / product_detail_picture / product_file; the literal string FILE is rejected by backend zod validation. publish.mjs already handles all of this — you only point it at local file paths.

6. Key fields on a license product (quick reference)

templates/product.license.example.json shows a complete TRIAL_FIRST payload:

  • With salesModel = TRIAL_FIRST, productPrice must be 0 / null, and trialDays is required
  • licenseEditions (BASIC / PRO / ULTIMATE) prices must be strictly ascending
  • softwareVersion follows x.y.z semver
  • introduce.images count must be between 3 and 20

7. Next steps


This guide is kept in sync with the publish-license-product skill; skill and docs are single-source.