directives
Add Formatting and Translations to json-render
JSON-driven interfaces need consistent formatting, calculations, and translated labels. This skill guides directive setup, nested expressions, and custom resolvers for json-render.
使用我的智慧代理安裝
將此請求複製給你的智慧代理,其中包含權威 Skill 頁面和清單。
Review the Skillstore skill "directives" from https://skillstore.io/skills/vercel-labs-directives.md and its manifest at https://skillstore.io/api/skills/vercel-labs-directives/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.你的智慧代理仍應顯示其計畫,並依安全政策請求必要確認。
Agent 可讀資源
當 AI Agent、爬蟲或腳本需要乾淨脈絡、而不是讀取完整頁面時,請使用這些連結。
測試它
正在使用「directives」。 Explain the displayed total when price is 12.50, quantity is 3, currency is USD, and locale is en-US.
預期結果:
- State resolution supplies the price and quantity.
- Multiplication produces 37.5.
- Currency formatting displays $37.50.
正在使用「directives」。 Show pluralized item labels for counts 0, 1, and 3, with the zero label set to no items.
預期結果:
- 0: no items
- 1: 1 item
- 3: 3 items
正在使用「directives」。 Explain the checkout.submit translation using the documented English and Spanish messages.
預期結果:
- English: Place Order
- Spanish: Realizar Pedido
安全審計
安全All 69 static findings are false positives caused by Markdown backticks around API names and fenced examples. No evidence found of shell execution, credential access, exfiltration, or prompt injection in SKILL.md. This review covers the skill documentation, not the referenced package implementations.
風險因素
⚙️ 外部命令 (50)
分享與引用此報告
分享版本化評估報告、中性徽章、嵌入卡片與引用。Skillstore 只報告證據,不判斷該 Skill 是否安全。
複製報告連結
https://skillstore.io/skills/vercel-labs-directives/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/vercel-labs-directives?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/vercel-labs-directives?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/vercel-labs-directives/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/vercel-labs-directives.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>學術引用 (APA · BibTeX · CFF)
APA 引用
vercel-labs. (2026). directives security audit report (audit version 1) [Author version unspecified]. Skillstore. https://skillstore.io/skills/vercel-labs-directives/audits/1BibTeX 引用
@techreport{vercel-labs-vercel-labs-directives-2026,
author = {vercel-labs},
title = {directives security audit report (audit version 1)},
institution = {Skillstore},
year = {2026},
number = {1},
url = {https://skillstore.io/skills/vercel-labs-directives/audits/1},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "directives security audit report (audit version 1)"
version: "unspecified"
type: report
authors:
- name: "vercel-labs"
date-released: "2026-09-29"
url: "https://skillstore.io/skills/vercel-labs-directives/audits/1"
identifiers:
- type: other
value: "skillstore:vercel-labs-directives:audit:1"
description: "Skillstore immutable audit report identifier"
Skillstore 評分
評分依據 證據置信度: 中你可以打造什麼
Build formatted cart displays
Compose state values, arithmetic, currency formatting, and item counts for shopping cart interfaces.
Configure translated interface labels
Define translation messages, interpolation parameters, and a fallback locale for json-render specifications.
Extend a shared rendering catalog
Create custom directives and register them consistently across prompt generation and rendering.
試試這些提示
Show a $format expression for /cart/total using USD and the en-US locale. Explain the required fields.
Combine /price and /qty using $math, then format the result as USD. Explain the inside-out resolution order.
Configure createI18nDirective with English and Spanish checkout labels, English fallback, and a greeting with a name parameter. Include standardDirectives registration.
Define a $double directive with a Zod schema and resolvePropValue. Register it alongside standardDirectives in catalog.prompt and a React provider.
最佳實務
- Pass the same directive array to catalog.prompt and the renderer.
- Use resolvePropValue on nested inputs so custom directives support expression composition.
- Choose custom names beginning with $ and avoid reserved built-in expression keys.
避免
- Registering directives for prompt generation while omitting them from the renderer.
- Treating standardDirectives as including configured translation support without adding createI18nDirective.
- Assuming division by zero raises an error when the documented $math behavior returns 0.
常見問題
What does standardDirectives include?
How do I enable translations?
Can directives use other directives as inputs?
Which renderers are covered?
Does this skill install the required packages?
Did the audit identify shell execution?
開發者詳細資訊
作者
vercel-labs授權
MIT
Skillstore 修訂
r1
版本提示
作者未聲明版本。
引用
bad9dafc37d1638cd29cb9bab06d5f8dbcd0f6c2
維護新鮮度
2026/9/30
使用量
0 次下載 · 0 次瀏覽
檔案結構
📄 SKILL.md