SuperAPI AI Directory

longbridge-lbti

General & other

View repository

Updated 10-15 23:23

About this skill

Longbridge LBTI Investment Style Test

The user answers 5 questions, their investor personality is determined (1 of 8), and a专属 result card is returned.All in Traditional Chinese, completed within the chat window.

Resources

  • questions.json: 5 questions (use the hk field), each option's letter, scoring rules,meta.codeToPersona(code→personality) mapping.
  • personas.json: copy for the 8 personalities (hk name,en English name,quote_hk quote,desc_hk description,image image name).
  • share.json: sharing copy for the 8 personalities.
  • assets/{persona}.png: 8 finished result cards.
  • assets/qr/{persona}.png: 8 QR codes (scan to directly open the large image of that personality's result card, public CDN, no login required, long-press on mobile to save/share). The QR code encodes the direct link to the card image in CDN_BASE below (with release tag, stable and cache-resistant).
  • CDN_BASE(public base URL for result cards and QR codes, used for embedded display in the widget):
    https://cdn.jsdelivr.net/gh/longbridge/extras-skills@main/skills/longbridge-lbti/assets/
    
    Card = {CDN_BASE}{persona}.png, QR code = {CDN_BASE}qr/{persona}.png. This domain is in the widget sandbox CSP whitelist and can load normally.

    Note:@main follows the latest commit of the branch; jsDelivr caches branch URLs for ~12 hours, so image changes do not take effect immediately. For launch, it is recommended to tag (e.g. @v1) and switch to the tag URL; the cache is stable and versions can be rolled back.

Flow

  1. Opening: output one line — "🧭 Longbridge Investment Style Test · LBTI, 5 questions in about 30 seconds, answer by intuition, there are no standard answers."
  2. Ask question by question: in the order of questions.json , ask each question using the hk copy; each question has 2 options labeled A / B. Wait for the user's reply before asking the next question; also accept the user replying with all 5 letters at once (e.g. ABABA)。
  3. Scoring(rules see questions.json.scoring):
    • Take the letterof the options chosen for questions 1, 2, and 3, and combine them into the three-letter code(e.g.:F+S+C = FSC)。
    • persona = questions.json.meta.codeToPersona[code](e.g. FSC → earnings-sniper)。
    • Question 4 → suffix: choose A = "Mild version", choose B = "Aggressive version".
    • Question 5 → suffix: choose A = "Disciplined type", choose B = "Emotional type".
  4. Return result: divided into "normal" and "fallback" cases, see below.

Return result

Normal case (can embed and display the image)

Goal: the image renders directly in the chat stream, not merely returning a downloadable file card. Use show_widget(HTML) to embed <img>,src pointing directly to the public URL of CDN_BASE (original image with zero compression, almost no token cost). Replace the {persona} below with the resulting personality:

<div style="display:flex; gap:20px; align-items:flex-start; flex-wrap:wrap; padding:1rem 0;">
  <img src="{CDN_BASE}{persona}.png" alt="{hk} 投資人格卡"
       style="width:280px; max-width:100%; border-radius:12px; border:0.5px solid var(--border); display:block;" />
  <div style="flex:1 1 180px; min-width:160px;">
    <p style="font-size:13px; color:var(--text-secondary); margin:0 0 6px;">掃碼睇高清大圖 · 可存相簿分享</p>
    <img src="{CDN_BASE}qr/{persona}.png" alt="二維碼"
         style="width:120px; height:120px; border-radius:8px; border:0.5px solid var(--border); background:var(--surface-2); padding:6px; display:block;" />
  </div>
</div>

Then output a paragraph of text (visible to the user, written outside the widget):

🎴 你嘅投資人格係:【{hk}】{en} {後綴:溫和/激進版 · 紀律/情緒型}
「{quote_hk}」
{desc_hk}
📲 掃二維碼 / 開連結,就可以存到手機同分享。

(You may also attach the share.json corresponding copy, making it easy for the user to forward.)

No show_widget(Claude Code CLI / Cowork / IDE, etc.)

Many environments (Claude Code CLI, Claude desktop Cowork, IDE-embedded agent)do not have show_widget tool, usually you have to rely on the "read image file" tool to render images in the conversation stream. But in practice there are two pitfalls, and if you don't avoid them the "image will disappear":

  1. Don't read multiple images in one batch: reading 2 or more images consecutively in the same reply (for example, reading Read several files at once / shown as "Read N files"), the client oftenonly renders one of them, or even shows none at all。
  2. Thereforedon't try to embed both the "result card + QR code" images in the same reply—in practice they will be dropped.

The safe approach (both of the following must be done):

  • ① Always give text links (most reliable, works in any environment): in the result text, directly give the two public web links, so the user can click/scan and use them immediately:
    • Result card:{CDN_BASE}{persona}.png
    • QR code:{CDN_BASE}qr/{persona}.png
  • ② Optionally embed one image: if you want the image to render directly,embed at most one image per reply(prefer the result card), use the image-reading toolto read that single file(don't batch-read it together with the QR code). For the QR code, deliver it via the link in ① above, or prompt "if you want to see the QR code, say so and I'll send it separately."

Then still attach the "normal case" user-visible text as usual (persona name / quote / description /share.json phrasing).

Key point: as long as the two links in ① are always given in full, even if the embedded rendering fails, the user will definitely get the card and QR code—there will no longer be the screenshot situation of "both images missing" or "the QR code is omitted."show_widget does not exist ≠ image cannot be produced; only when even the text links cannot be given should you fall back to the plain-text fallback below.

Fallback situation (even images cannot be displayed)

If the clientcannot render even images(neither show_widget, nor can the image-reading tool paste it out, a very rare case),do not send any images(the QR code is also an image, and likewise cannot be displayed) → switch toplain text + landing page text link. Do not report an error, do not leave it blank. Format:

🎴 你嘅投資人格係
【{hk}】{en} {後綴}
「{quote_hk}」
{desc_hk}

⚠️ 你而家用嘅助手暫時顯示唔到圖片——你張專屬人格卡喺下面條連結度,可以睇同儲存 👇
📲 {CDN_BASE}{persona}.png
(手機打開 → 長按卡圖存相簿 / 分享;此鏈公網免登錄,任何人可開)

This is the same public web card image direct link that the QR code scans out to; it can be opened on any device / without login, so the fallback should always use it, and do not use claude.ai/... or similar internal links that require login to open.

Landing target (where the QR code scans out to)

Current default: QR code = public web card image direct link (no login required, anyone can open).

  • The 8 assets/qr/{persona}.png encodings are exactly the result card direct links for the corresponding personas:
    https://cdn.jsdelivr.net/gh/longbridge/extras-skills@longbridge-lbti-v1.0.1/skills/longbridge-lbti/assets/{persona}.png
    
    Use release tag (@longbridge-lbti-v1.0.1) instead of @main, in order to make the printed/distributed QR codestable, resistant to jsDelivr branch caching, and version-rollback-capable. The card design is finalized and will not change, and the tag link remains valid long-term.
  • Scanning experience: the mobile browser directly opens the card image → long-press to save to album / share. No login required, no app required.
  • ⚠️ Never use https://claude.ai/code/artifact/... or similar links— Those require login/permissions to open; for the vast majority of users, scanning them results in a blank screen. Older versions of the QR code once mistakenly pointed to this address, which has now been corrected.

Optional upgrade (not done): If in the future you want a formal landing page with branded styling, share buttons, and campaign CTAs, have operations/development build a public web page (e.g., a short link https://lb.com/lbti, with Type 8 using #{persona} for direct access), then regenerate the 8 QR codes to point to it. Before that is done, do not change the QR codes, to avoid pointing to a page that is not yet live.

Important constraints

  • Use Traditional Chinese.
  • Result images are only "fetched", never "generated": Fetch the corresponding file from CDN_BASE(i.e., the repository's assets/)and return it as-is, never regenerate, redraw, or alter the card text, ensuring every user receives the same result as the design mockup.
  • Inline display is preferred, but it depends on the environment: If show_widgetis available (claude.ai / desktop regular conversation), always use a widget to reference the CDN_BASE URL so the image renders directly in the conversation stream; do not just use present_files to produce a download card.In environments without show_widget (CLI / Cowork / IDE), see the "No show_widget" section above: Do not fall back to plain text just because there is no widget, but also do not batch-read multiple images in a single reply (some will be missed).
  • The result card and the QR code are a set; the QR code must not be omitted: Whichever path is taken, the result card and the QR code must be delivered together—either inline or as a CDN text link(when there is no widget, the QR code can be delivered as a link; it does not have to be inline). At most one image may be embedded per reply. Only when even a text link cannot be provided should you fall back to plain text.
  • Scoring and mapping are always based on questions.json shall prevail, do not change the judgment on your own.
  • This versiondoes not do a closing CTA for now(installation/campaign guidance).
  • Mapping of the 8 personality codes: FLC Deep-Dive Hunter / FLD Ark Captain / FSC Financial Report Sniper / FSD Sector Rotation Trader / MLC Track Believer / MLD Tailwind Voyager / MSC Lightning Trader / MSD Sentiment Ranger.