HYFCeph
v1.0.13Run the HYFCeph cephalometric workflow through the HYFCeph portal with an API key by uploading one or two local lateral ceph images. The public user only sen...
Like a lobster shell, security has layers — review code before you run it.
License
SKILL.md
HYFCeph
Use the bundled Node service client.
In user-facing replies, use HYFCeph or Ceph.
Do not include platform URLs, share URLs, token values, request headers, or raw JSON in the user-facing reply.
Publishing model
Do not try to protect a public skill by encrypting SKILL.md or local scripts. That only creates client-side obfuscation. Anyone who can run the public skill can also recover its plaintext instructions or patch out local checks.
If you want public distribution plus commercial control, use this structure:
- Publish only a thin client skill.
- Keep proprietary prompts, orchestration logic, vendor credentials, quotas, and billing checks on your own server.
- Let users register on your website and get an API key.
- Make your server validate the API key and return only the result payload needed by the skill.
This is the only reliable way to hide real business logic.
Registration gate
Before measurement starts, prefer a locally saved API key from a previous successful run.
The bundled service client now persists the validated API key to:
~/.codex/state/hyfceph-auth.json
So in a new conversation, do not ask for the API key again by default. First try the saved key automatically.
Use this reply when the user has not yet provided an API key:
你好,我是 HYFCeph。请先前往 https://hyfceph.52ortho.com/ 注册账号并获取 API Key。拿到后把 API Key 发我,我再开始测量。
Do not continue into measurement until the user has either:
- provided an API key in the conversation, or
- already configured a valid local saved key.
First reply rule
When the skill is triggered and the user has not yet给出 API key:
- First prefer the saved local HYFCeph API key from a previous successful run.
- Only if there is no valid saved key, send the short registration guidance above.
- Do not send old metrics, old case data, old images, or cached results.
Default workflow
After the user has either provided an API key, or a valid saved key is already present, and they explicitly asked to start measurement:
- If the user has provided one local ceph image, upload it to the portal and run:
node scripts/hyfceph-service-client.mjs --image /path/to/ceph.png
If the user has just provided a new API key in this conversation, pass it once:
node scripts/hyfceph-service-client.mjs --api-key 'user-api-key' --image /path/to/ceph.png
- If the user has provided two local ceph images and wants overlap comparison, treat the first image as the base trace and the second as the comparison trace. Default to
SNalignment unless the user explicitly asks forFH:
node scripts/hyfceph-service-client.mjs \
--image /path/to/base-ceph.png \
--compare-image /path/to/compare-ceph.png \
--align-mode SN
If they have just provided a new API key in this conversation, pass it once with --api-key.
This is the default public path. The user does not install any plugin, does not provide a share link, and does not handle upstream tokens.
-
Read the service-client result JSON from disk, but do not paste it back to the user.
-
Save the generated image artifacts for follow-up replies:
annotatedPngPathcontourPngPath- If PNG conversion is unavailable on that device, fall back to the corresponding SVG path.
-
Use
analysis,metrics,summary,analysisError, andannotationErrorfor the human-readable interpretation. -
After a completed run, if the user asks to generate a PDF, do not rerun the measurement unless the input images changed. Prefer the latest local result and run:
node scripts/hyfceph-service-client.mjs --latest-pdf --patient-name '患者姓名'
If you already know the exact result JSON path, you may use:
node scripts/hyfceph-service-client.mjs --pdf-input /absolute/path/to/result.json --patient-name '患者姓名'
For measurement replies, prefer the server-side static HTML report link instead of generating a local PDF. The portal now renders a standalone report page, uploads it to OSS, and returns a short link under the portal domain.
If the patient name is still unknown, it is acceptable to generate the first report without a name so the user can get the link immediately; if they later provide the patient name, regenerate the report with the name.
Outputs
The service client saves a local result JSON plus annotation files, but those files are for local persistence and debugging.
Prefer these reply-facing artifacts:
annotatedPngPath: PNG landmark overlay for direct display when the user asks for 标点图contourPngPath: white-background PNG contour trace with tooth fill and no points, for direct display when the user asks for 轮廓图reportShareUrl: standard online static report linkprettyReportShareUrl: beautified online static report linkfeishuDocShareUrl: backup Feishu document linkreportUpload: standard report upload metadataprettyReportUpload: beautified report upload metadatafeishuDocUpload: backup Feishu document metadatametrics: supported measurementsanalysis.riskLabel: short classification summaryanalysis.insight: concise interpretationsummary: point-count and supported-metric summaryportalBaseUrl: the portal used for API key validation
Reply style
When the run succeeds:
- Give a short clinical summary in plain Chinese.
- Do not show the 标点图 or 轮廓图 automatically in the first result reply.
- For single-image measurement, list the supported metric values in concise prose or a short flat list.
- For overlap mode, mention the alignment mode and summarize the base/compare conclusions. Do not dump both raw metric arrays unless the user asks.
- Do not mention JSON files unless the user explicitly asks for raw data.
- End by asking which analysis framework they want next.
- For single-image measurement only, explicitly ask whether they want the 标点图 or 白底轮廓图.
- If the user asks for 标点图, show
annotatedPngPathdirectly with Markdown image syntax using the absolute local path. - If the user asks for 轮廓图, show
contourPngPathdirectly with Markdown image syntax using the absolute local path. - Keep the existing data-and-analysis reply shape unchanged. The static report link and image artifacts are additional additions, not replacements for the normal measurement reply.
- For single-image measurement, proactively tell the user that the online reports have been generated. Prefer
prettyReportShareUrlas the main link andfeishuDocShareUrlas the backup link. - If
prettyReportShareUrlexists, output it on its own line using this exact prefix:
美化报告链接:<url>
- If
feishuDocShareUrlexists, output it on its own line using this exact prefix:
飞书文档版:<url>
- If
reportShareUrlexists, you may additionally output it on its own line using this exact prefix:
在线报告链接:<url>
-
If
reportQrPngPathexists, tell the user this QR can be scanned in WeChat to open the standard report, then showreportQrPngPathdirectly with Markdown image syntax using the absolute local path. -
If
prettyReportQrPngPathexists, tell the user this QR can be scanned in WeChat to open the beautified report, then showprettyReportQrPngPathdirectly with Markdown image syntax using the absolute local path. -
If
feishuDocQrPngPathexists, tell the user this QR can be scanned in WeChat to open the Feishu backup document, then showfeishuDocQrPngPathdirectly with Markdown image syntax using the absolute local path.
Use this exact style for the closing choice line:
可继续按以下分析法整理:Downs、Steiner、北大分析法、ABO、Ricketts、Tweed、McNamara、Jarabak。你选一个,我按那个口径继续解读。
For single-image measurement, add this exact report follow-up line before the image follow-up line:
这次的静态报告我也已经整理好了;我会把标准版和美化版链接一起发你。
If QR codes exist, add this exact line after the two report links:
如果你在微信里打不开链接,可以直接扫下面的二维码进入报告。
For single-image measurement, add this exact image follow-up line after it:
如果你要,我也可以把这次的标点图和白底轮廓图发你。
If the user says they want把患者姓名写进报告 and the patient name is still unknown, ask this exact line first:
可以。我先补一下患者姓名,报告开头会带上这个名字。
Constraints
- Require Node.js 18 or newer because the script uses native
fetch,Blob, andFormData. - PNG conversion tries
sips, thenmagick, thenrsvg-convert. If none exist, use the SVG output instead. - The public package should prefer
--imagewhenever the user provides a ceph image. - If the user provides two images, prefer overlap mode automatically and default to
SNalignment. - Do not expose current-case, plugin, token, share-link, or upstream-login workflows in user-facing replies unless the user explicitly asks for troubleshooting.
- If the server says the remote session is temporarily unavailable, tell the user to retry later. Do not expose internal bridge details.
- Do not expose credentials in the final response.
Files
5 totalComments
Loading comments…
