SuperAPI AI Directory

byted-skillhub-upload

General & other

View repository

Updated 10-15 17:30

About this skill

byted-skillhub-upload

Purpose

  • Upload a local Skill (folder or zip package) to SkillHub and create a new Skill and version.
  • On successful upload, output Id and SkillVersionId。

When to invoke

  • Triggered when the user's request involves uploading/publishing a local skill to enterprise SkillHub or private skill space . Common semantics include:
    1. Explicitly requesting "upload to SkillHub / publish to SkillHub".
    2. Mentioning "enterprise-exclusive skill space / private skill space / internal skill".
    3. Needing to package a local directory and upload it as a Skill.

Environment description (Agent must read)

  • No need to ask the user for environment variables: the following variables are automatically injected in the current environment:
    • ARK_SKILL_API_BASE: SkillHub API service address
    • ARK_SKILL_API_KEY: enterprise SkillHub access key
    • SKILLHUB_SKILL_SPACE_ID: enterprise-exclusive skill space ID
  • Strictly forbidden to ask the user for parameter values: when the Agent triggers this skill, it should read these variables directly from the environment and execute the script, and must not interrupt the flow to confirm this information with the user.

Upload steps

  1. Determine the upload target
    • The target must be a directory, or a file ending with .zip file at the end
    • If the target is a directory, the script will first compress its contents into a zip package before uploading
  2. Execute the script (path relative to the directory where this SKILL.md is located)
    • Upload directory:python ./scripts/upload_to_skillhub.py --path "./my-skill" --name "my-skill" --description "demo"
    • Upload zip:python ./scripts/upload_to_skillhub.py --path "./my-skill.zip" --name "my-skill" --description "demo"
  3. Observe the output
    • On success, two lines will be printed:
      • Id: <skill_id>
      • SkillVersionId: <skill_version_id>

Example

  • Upload ./skills/my-private-skill/ to SkillHub:
    • python ./scripts/upload_to_skillhub.py --path "./skills/my-private-skill" --name "my-private-skill" --description "internal"

Troubleshooting

  • If it reports missing environment variables, please confirm you are running in the environment or contact the administrator
  • Parameter error: confirm that --path points to a directory or .zip file
  • Network or authentication error: check network connectivity and whether the API Key is valid