Loading...
Loading...
Share to the Starchild community in two independent ways — publish a running preview to a public URL, or open-source any project's code to the community GitHub repo. Also handles fork/install/browse.
npx skill4agent add starchild-ai-agent/official-skills community-publish| Action | What "share" means here | Audience can | Applies to |
|---|---|---|---|
| Make a running preview visitable at | Open the URL in a browser | type=preview only |
| Push project source to the community GitHub repo | Fork the code and run their own copy | Any type (task, preview, service, script) |
Preview lifecycle (start / stop / health check) lives in thetool. This skill only handles the share side.preview
| User says | Action | Why |
|---|---|---|
| "publish" / "share" / "make public" / "公开" / "发布" (no qualifier) | | Default user intent for "publish" is public URL access, not source code |
| "publish the URL" / "share the link" / "let people visit" / "公开访问" | | Same |
| "open source" / "open-source the code" / "share the code" / "let others fork" / "开源代码" | | Explicit code-sharing intent |
| Ambiguous after rereading | Ask one question, don't guess | "Do you want a public URL people can visit, or do you want the code on GitHub for others to fork?" |
| "fork" / "install someone's project" | | Pull from catalog |
| "browse" / "see what others published" | | Catalog query |
| "unpublish the URL" / "take down the link" | | Inverse of publish_preview |
| "remove the open source" / "delete from GitHub" | | Inverse of open_source |
| "list my public URLs" | | User's own preview side |
publish_preview()Public URL is up. Want to open-source the code as well, so others can fork and run their own copy?
open_source()previewCode is open-sourced. The preview is still running — want to publish the live URL too, so visitors can try it without forking?
taskscriptservice community.iamstarchild.com (single gateway domain)
│
┌─────────────────┴─────────────────┐
│ │
┌────────▼─────────┐ ┌────────▼─────────┐
│ /api/register │ │/api/code-projects│
│ /api/unregister │ │ /publish, /list, │
│ /api/list │ │ /unpublish, ... │
└────────┬─────────┘ └────────┬─────────┘
│ │
┌────────▼─────────┐ ┌────────▼─────────┐
│ In-memory route │ │ GitHub repo: │
│ table (preview-> │ │ Starchild-ai- │
│ machine:port) │ │ agent/community- │
│ │ │ projects │
│ Lives only while │ │ │
│ container is up. │ │ Permanent. │
└──────────────────┘ └──────────────────┘
publish_preview() open_source(){user_id}-{slug}publish_preview()publish_preview(preview_id, slug="", title="")https://community.iamstarchild.com/{user_id}-{slug}preview_idpreview(action='serve')status=runningslug'my-app''1463-my-app'title{"ok": True, "url": "https://community.iamstarchild.com/{user_id}-{slug}", ...}FLY_MACHINE_IDunpublish_preview(slug){user_id}-{suffix}list_published_previews()open_source()open_source(project_dir, version_bump="patch")community-projects/projects/{type}s/{user_id}/{slug}/{version}/project_diroutput/projects/my-taskversion_bumppatchminormajornone{"ok": True, "github_url": ..., "version": ..., "commit_sha": ...}fork(source, dest_dir=None)source"user_id/slug""user_id/slug@version"tasknext_steppreviewlist_open_source(type=None, tag=None, user=None, q=None)get_open_source(source)remove_open_source(slug)validate_open_source(project_dir)output/projects/{slug}/project.yaml # metadata (name, version, type, env_required, sc_proxy)
PROJECT.md # required sections: What / Required env / How to start / Outputs / Troubleshooting
.env.example # all env vars with placeholder values
.gitignore # secrets blacklist
src/
├── run.py # for type=task (must start: # -*- task-system: v3 -*-)
├── index.html # for type=preview (or app.py + frontend)
├── server.py # for type=service
└── main.py # for type=script| type | What it is | Auto-install behavior on fork | Eligible for |
|---|---|---|---|
| Scheduled cron/interval job | Registered as paused; user activates manually | No |
| Web dashboard / app | | Yes |
| Long-running background process | Show command, ask user to confirm | No |
| One-shot script | Show command for user to run | No |
Onlytype has a live URL to expose. The other types are open-source-only.preview
list_published_previews()list_open_source()python3 - <<'EOF'
import sys
sys.path.insert(0, "/data/workspace/skills/community-publish")
from exports import (
# Public URL (preview type only)
publish_preview, unpublish_preview, list_published_previews,
# Open source code (any project type)
open_source, remove_open_source, fork,
list_open_source, get_open_source, validate_open_source,
)
# Publish a running preview to a public URL
print(publish_preview(preview_id="price-dashboard-a3f1", slug="price-dashboard"))
# Open-source a task (no preview involved)
print(open_source("output/projects/my-daily-digest", version_bump="patch"))
EOFopen_source()validate_open_sourceenv_requiredworkspace/.envrequest_env_input{user_id}-open_sourceopen_sourcetaskpreview| Symptom | Cause | Fix |
|---|---|---|
| Wrong preview_id, or preview was stopped | Check |
| Hit 20-per-user gateway cap | |
| Running locally, not in Starchild container | URL publish only works in the production container |
| Listed | Add the missing key to |
| Secret scanner found a real-looking API key | Move to env var; |
| Same-version republish or downgrade | Bump in |
| Trying to remove someone else's project | Only the owner can remove |
| Forked task doesn't run | Auto-registered as paused | Tell user: |
lib/manifest.pylib/validate.pylib/install.pylib/gateway.py/api/register/api/code-projects/*