Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)16k · #10902

publish

Skill này làm gì

Cho phép trợ lý đưa một ứng dụng web đã hoàn thành, trang trạng thái hoặc dashboard lên mạng cho mọi người trong tổ chức. Dành cho nhóm muốn một công cụ nội bộ dùng chung với liên kết ổn định.

Khi nào nên dùng

  • ✓Khi bạn muốn một dashboard hoặc ứng dụng web nội bộ tiếp tục chạy sau khi chat kết thúc.
  • ✓Khi bạn cần một trang trạng thái chung để đồng đội mở trên trình duyệt.
  • ✓Khi bạn muốn khôi phục một phiên bản cũ hơn của ứng dụng nếu có gì đó hỏng.

Liên kết skill

https://github.com/yc-software/qm/blob/main/skills-seed/publish/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/yc-software/qm/blob/main/skills-seed/publish/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Đưa dashboard bán hàng này lên thành một trang nội bộ để đội tôi mở được bằng một liên kết ổn định.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Trợ lý xây và kiểm thử ứng dụng, rồi triển khai nó lên một môi trường chạy được lưu trữ riêng. Mỗi bản phát hành được giữ như một phiên bản, nên có thể khôi phục một phiên bản cũ hơn. Chỉ phạm vi của bạn và những người bạn chia sẻ mới mở được.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Publish (internal apps & dashboards)

Use this skill when the user wants something that outlives the turn and is reachable in a browser — a small web app, an internal API, a status page, a dashboard you generated from a query. Publishing ships your files from the selected sandbox to a separate, long-lived runtime with a stable link.

Publish with the apps tool, action publish. Build the app in the workspace with files actions write / read; install dependencies and test with execute. Keep the same explicit sandbox_id throughout writing, building, testing, previewing, and publishing. Use sandbox only to manage computers, not to run commands. The app must listen on the PORT env var (the runtime sets it).

Match the house style (the default)

Anything browsable you publish should look designed, not defaulted. Before you build the UI, load the design skills and apply your organization's house style unless the user asked for a different look:

  • The deployment's house-style skill — if the Skills index lists a *-design skill, it carries the org's look as ready-to-paste CSS and design tokens. Start there for the look.
  • taste-skill — the design process: reading the brief, layout, hierarchy, verifying the result, avoiding generic AI-design slop.
  • popular-web-designs — when the user wants a specific visual reference (Stripe, Linear, Vercel…).

This is about the page a person sees — skip it for an internal-only API or a script with no UI.

Publishing

First publish, and every later update — same call, same name, a new immutable version:

apps({ action: "publish", dir: "dist", entrypoint: "node server.js", name: "status-board", sandbox_id: "<selected sandbox ID>" })

Roll back to an earlier version (an instant pointer flip):

apps({ action: "publish", name: "status-board", rollbackTo: 3 })

Give an auto-named deployment a friendly link:

apps({ action: "publish", renameFrom: "s-1176-p-5050", name: "status-board" })

apps action publish returns { id, name, version, url, dataDir? } — give the user the full absolute url, whose path is /d/<name>/.

App bar and editing

On a configured app subdomain, signed-in people who can manage the app automatically see a slim top bar. Chat opens a resizable editing conversation beside the app. Normal app links and refreshes keep editing available for the signed-in session; viewers with read-only access see the app alone.

The bar uses a consistent neutral appearance, independent of the app's theme. Its name follows the app document title. The drawer opens directly into an empty composer; the app identity is supplied as conversation context, not pasted into the draft. The conversation survives app reloads after a publish.

Durable data — where app state must live

The app's disk is reset from source on every relaunch, with one exception: when the runtime supports durable app data it sets $DATA_DIR (and the publish result reports dataDir). Everything the app writes under $DATA_DIR survives restarts, redeploys, and platform recycles.

  • Any state the app keeps — write it under $DATA_DIR. Never beside the code, never in /tmp, never in a JSON file in the app dir: all of that silently vanishes on the next relaunch.
  • Database: SQLite at exactly $DATA_DIR/app.db. That specific path gets the strongest durability the runtime offers (continuous replication where enabled — ~seconds of loss window — periodic snapshots otherwise). Other files under $DATA_DIR are snapshotted periodically.
  • Guard the no-persistence case: if $DATA_DIR is unset, the runtime has no durable app storage — don't build an app that quietly accumulates state on disk; say so and bake data in or fetch it live instead.
  • Updating an existing stateful app? If it writes runtime state (a db, uploads, counters) anywhere else, move that state under $DATA_DIR as part of the update — do this on your own initiative; the user should never have to ask. Data deliberately baked into the repo (seed/reference files) stays where it is.

Check your work before you call it done

A published app is a new immutable version the moment the runtime accepts it — that is not the same as the app working. So for anything browsable, sanity-check it locally before you publish:

  1. Run it locally. Start the server in the background on a port — e.g. PORT=8080 node server.js via execute wit
Câu hỏi thường gặp

Bất kỳ ai trên internet có thể xem ứng dụng không?

Không. Liên kết là nội bộ, nên chỉ phạm vi của bạn và những người bạn chia sẻ mới mở được.

Khôi phục nghĩa là gì ở đây?

Mỗi phiên bản đã đưa lên được giữ lại, nên trợ lý có thể đưa ứng dụng về một phiên bản cũ hơn nếu cần.

Ứng dụng có cần một cổng đặc biệt không?

Có. Ứng dụng phải lắng nghe trên cài đặt PORT, do môi trường chạy cung cấp.

Chi tiết

Mô tả gốc của tác giả

Publish a long-lived internal web app, site, or dashboard from the agent computer. Scope-bound (only the owner's scope, plus whoever you share it with, can reach it), immutable versions with rollback, a stable friendly link. No public URL.

repo: yc-software/qm

Độ phổ biến

Sao GitHub
16k
Vị trí xếp hạng
#10902
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự