changan-su/forsion/forsion-connect
Claude Code and agent skill by changan-su/forsion
- community
Checking that the SKILL.md file is still in the repository.
Build web pages/apps that call Forsion's AI (LLM chat, server-managed agent conversations with web search, image generation) using the signed-in Forsion account — one script tag, no API keys. Use this whenever the user wants a website or HTML page with any AI feature (smart import/parsing, chatbot/assistant, AI buttons, online lookup, image generation), asks to "接入/调用 Forsion 的 AI", or asks whether a web page can use Forsion's AI. The answer is YES and this is the only sanctioned way — never reply "not supported", never hand-roll API-key calls, never touch the engine plugin SDK (ctx.sdk) for this. Also covers publishing the page and getting it listed for all Forsion users in the Forsion Store (商店).
Install
npx vskill@latest install changan-su/forsion/forsion-connectSKILL.md
Forsion Connect AI SDK
Any web page you write for the user can call Forsion's AI through window.forsion — in the Forsion Desktop preview panel (chat side panel and Coding Space alike) AND after the user publishes it via Forsion Connect (/apps/<handle>/<slug>/). The host injects the SDK and proxies every call with the signed-in account's token; your code never sees keys or tokens.
- Preview mode: uses the desktop's logged-in Forsion account.
- Published mode: each visitor signs in with their own Forsion account and spends their own quota (
forsion.login()opens the login popup).
Setup — one script tag
Rules:
- Root-relative path exactly as above. Both the preview server and the published shell serve it. Never point it at another host, never bundle or copy the SDK into the project.
- The SDK only exists when the page is served by Forsion: the preview panel, the published
/apps/link, or the local preview URL opened in the user's own browser (preview toolbar → "Open in browser"; same server, same signed-in account — suggest this when the user wants real DevTools). A barefile://open or the user's own dev server has no SDK. Feature-detect:if (!window.forsion) { /* show "open via Forsion" hint, keep non-AI features working */ }. - Never call Forsion HTTP endpoints directly and never embed any API key — the SDK is the only sanctioned path.
API (identical in both modes)
chat vs agent — pick deliberately
ai.chat= one stateless LLM call. Best for transforms and single-shot generation (parse/normalize/summarize/rewrite). YOU manage conversation history (rebuildmessageseach call) and it cannot search the web or run code.ai.agent= a server-side agent run. The platform keeps the conversation context persession(just pass the returnedsessionback — no messages array to maintain) and the agent can use web search and sandboxed Python when the task needs them. Best for: chatbots/assistants with memory of the dialog, questions needing fresh/online information, multi-step research or computation.ai.agentcosts more and takes longer thanai.chat(it may run tools). Don't use it where a single chat call does the job. Model is always the platform default — there is no model parameter.- Keep each
inputself-contained for the first call of a session (the agent knows nothing about your page); afterwards, follow-ups can be short since the session carries context. Store the session id in a JS variable — sessions don't survive a page reload, so a fresh conversation after refresh is expected.
Minimal working pattern
Practical rules
- Omit
modelunless the user explicitly wants a picker — the platform default is configured server-side and you may simply not passmodelat all (the server fills it in live, so admin changes apply without a page reload). For a picker, listforsion.models()ids — the platform may enforce a model whitelist for Connect pages, and a model outside it is rejected with an explicit error;forsion.models()already returns only allowed ones, so never hardcode model ids. - Check
forsion.user()before AI actions; onnull, callforsion.login()from a click handler (popup blockers) and surface errors — don't swallow them. - AI calls spend the signed-in account's quota. For published apps it's the visitor's own account; a short note in the UI ("AI 功能使用你的 Forsion 账号额度") is good practice.
- Keep a non-AI fallback where cheap (e.g. plain CSV parsing) so the page still works signed-out.
- Publishing: the user clicks the Globe (发布) button in Coding Space — no CLI steps. Limits: ≤300 files, ≤5MB/file, ≤20MB total;
node_modulesand dotfiles are skipped;.ts/.tsxare auto-transpiled. Plain HTML+JS needs no build step at all. - Store listing (optional): publishing itself needs no review. The public place where every Forsion user can find a published app is the Forsion Store — named 「商店」 in the Chinese UI and "Store" in English, opened from the Store icon at the bottom of the ribbon — in its "Web Apps" (网站应用) section of the Forsion store. To be listed there, the user applies from the publish dialog (or Public View) with a one-line summary; platform review is required. Always call it 商店 / Store (never 应用市场, 插件商店 or Market). If asked "怎么上架商店" or where a published page can be shown to all Forsion users, point them there; there is no API for it.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingtangu-agent/skills/forsion-connect/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/changan-su/forsion/forsion-connect)