skill-card-generator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Generate Skill Card

生成技能卡片

Skill directory to analyze: $ARGUMENTS
待分析的技能目录:$ARGUMENTS

Purpose

用途

Create a draft NVIDIA governance skill card for an existing agent skill. The skill gathers source signals, guides the agent to build a grounded JSON context, renders a deterministic markdown card, and checks that human-review markers were removed before submission.
Use this when:
  • A skill directory already exists and needs a new governance card.
  • A changed skill needs its existing card refreshed.
  • A skill owner is preparing NVCARPS or legal/safety review material.
Do NOT use for:
  • Explaining, listing, comparing, or discussing skills or skill capabilities.
  • Creating or rewriting the source skill itself.
  • Generating cards for non-skill assets such as models, datasets, containers, or full systems.
  • Signing, publishing, or approving a skill card.
  • Replacing required human legal, safety, or owner review.
为现有Agent技能创建一份NVIDIA治理技能卡片草稿。该技能收集源信号,引导Agent构建基于事实的JSON上下文,生成确定性的Markdown卡片,并在提交前检查是否已移除人工审查标记。
适用场景:
  • 已有技能目录,需要新增治理卡片时。
  • 技能更新后,需要刷新现有卡片时。
  • 技能所有者准备NVCARPS或法律/安全审查材料时。
禁止场景:
  • 解释、列举、比较或讨论技能及技能功能。
  • 创建或重写源技能本身。
  • 为非技能资产(如模型、数据集、容器或完整系统)生成卡片。
  • 签署、发布或批准技能卡片。
  • 替代必要的人工法律、安全或所有者审查。

Prerequisites

前提条件

  • Python 3 is available.
  • jinja2
    is installed before running
    render_card.py
    .
  • The target path is a skill directory containing
    SKILL.md
    or
    skill.md
    .
  • The agent can write a temporary context JSON file and the rendered card output.
  • Runtime permissions allow reads from
    target_skill_directory
    plus this skill's
    references/
    and
    scripts/
    , writes only to the target skill directory or
    /tmp/
    , and shell execution only for the three scripts listed below.
  • 已安装Python 3。
  • 运行
    render_card.py
    前已安装
    jinja2
  • 目标路径为包含
    SKILL.md
    skill.md
    的技能目录。
  • Agent可写入临时上下文JSON文件和生成的卡片输出。
  • 运行时权限允许读取
    target_skill_directory
    以及本技能的
    references/
    scripts/
    目录,仅允许写入目标技能目录或
    /tmp/
    ,仅允许执行以下三个脚本。

Instructions

操作步骤

  1. First, read this
    SKILL.md
    completely before running any script.
  2. Resolve the target skill directory from
    $ARGUMENTS
    ; if omitted, use the current working directory.
  3. Stay within the declared permission scope. Do not read
    .env
    , credential files, hidden auth folders, or unrelated repo files; do not write outside the target skill directory or
    /tmp/
    .
  4. Run
    scripts/discover_assets.py
    against the target. Use the structured signal summary first; if output is truncated, read only targeted files or small excerpts.
  5. Build a context JSON file from the structured signal summary first, then from extracted file contents only when needed.
  6. Follow
    references/style-guide.md
    for every context field. Use
    HUMAN-REQUIRED
    only when no source supports a truthful value.
  7. Render the card with
    scripts/render_card.py
    and fix any schema errors before proceeding.
  8. Review the card manually, remove resolved VERIFY and SELECT markers, then run
    scripts/validate_submission.py
    .
  9. Before finishing, confirm the rendered card has no unrendered
    {{ ... }}
    or
    {% ... %}
    template fragments.
  1. 运行任何脚本前,先完整阅读本
    SKILL.md
    文件。
  2. $ARGUMENTS
    解析目标技能目录;若未指定,则使用当前工作目录。
  3. 严格遵守声明的权限范围。不得读取
    .env
    、凭证文件、隐藏认证文件夹或无关仓库文件;不得写入目标技能目录或
    /tmp/
    以外的路径。
  4. 对目标目录运行
    scripts/discover_assets.py
    。优先使用结构化信号摘要;若输出被截断,仅读取目标文件或小片段内容。
  5. 优先基于结构化信号摘要构建上下文JSON文件,仅在必要时从提取的文件内容补充。
  6. 每个上下文字段均需遵循
    references/style-guide.md
    规范。仅当无数据源支持真实值时,使用
    HUMAN-REQUIRED
    标记。
  7. 使用
    scripts/render_card.py
    生成卡片,修复所有 schema 错误后再继续。
  8. 手动审查卡片,移除已解决的VERIFY和SELECT标记,然后运行
    scripts/validate_submission.py
  9. 完成前,确认生成的卡片中没有未渲染的
    {{ ... }}
    {% ... %}
    模板片段。

Available Scripts

可用脚本

ScriptPurposeArguments
scripts/discover_assets.py
Extracts skill files, repo signals, style guide, and template into one discovery report.
<skill_directory>
scripts/render_card.py
Validates context JSON and renders the skill card from the Jinja template.
--context <context.json> --template <skill-card.md.j2> --out <output.md>
scripts/validate_submission.py
Fails if the rendered card still contains VERIFY or SELECT review markers.
<rendered-card.md>
脚本用途参数
scripts/discover_assets.py
将技能文件、仓库信号、风格指南和模板提取为一份发现报告。
<skill_directory>
scripts/render_card.py
验证上下文JSON并从Jinja模板生成技能卡片。
--context <context.json> --template <skill-card.md.j2> --out <output.md>
scripts/validate_submission.py
若生成的卡片仍包含VERIFY或SELECT审查标记,则验证失败。
<rendered-card.md>

Examples

示例

Discover signals for a target skill:
text
run_script("scripts/discover_assets.py", args=["/path/to/target-skill"])
Render a card from the completed context:
text
run_script(
  "scripts/render_card.py",
  args=[
    "--context", "/tmp/target-skill-context.json",
    "--template", "references/skill-card.md.j2",
    "--out", "/path/to/target-skill/target-skill-card.md"
  ]
)
Validate the reviewed card before submission:
text
run_script("scripts/validate_submission.py", args=["/path/to/target-skill/target-skill-card.md"])
为目标技能发现信号:
text
run_script("scripts/discover_assets.py", args=["/path/to/target-skill"])
基于已完成的上下文生成卡片:
text
run_script(
  "scripts/render_card.py",
  args=[
    "--context", "/tmp/target-skill-context.json",
    "--template", "references/skill-card.md.j2",
    "--out", "/path/to/target-skill/target-skill-card.md"
  ]
)
提交前验证已审查的卡片:
text
run_script("scripts/validate_submission.py", args=["/path/to/target-skill/target-skill-card.md"])

Limitations

局限性

  • The generated card is a draft and must be reviewed by a human owner.
  • Discovery is limited to local files and repo metadata visible from the target path.
  • The renderer validates required context shape, not the legal or safety correctness of field values.
  • Canned limitation and risk catalogs are starting points; remove entries that do not apply.
  • 生成的卡片为草稿,必须经人工所有者审查。
  • 发现范围仅限于目标路径可见的本地文件和仓库元数据。
  • 渲染器仅验证上下文的必填格式,不验证字段值的法律或安全性正确性。
  • 预设的局限性和风险目录仅为起点,需移除不适用的条目。

Troubleshooting

故障排除

ErrorCauseSolution
directory not found
The target path is wrong or not mounted in the workspace.Re-run discovery with the absolute path to the skill directory.
jinja2 not installed
The renderer dependency is missing.Install
jinja2
, then re-run
render_card.py
.
Context validation failed
Required fields are missing or typed incorrectly.Fix the context JSON using
references/style-guide.md
.
Unresolved marker failureVERIFY or SELECT markers remain after review.Confirm each marked field, prune catalog entries, then re-run
validate_submission.py
.
错误原因解决方案
directory not found
目标路径错误或未挂载到工作区。使用技能目录的绝对路径重新运行发现脚本。
jinja2 not installed
缺少渲染器依赖。安装
jinja2
后重新运行
render_card.py
Context validation failed
必填字段缺失或类型错误。使用
references/style-guide.md
修复上下文JSON。
Unresolved marker failure审查后仍存在VERIFY或SELECT标记。确认每个标记字段,删减目录条目后重新运行
validate_submission.py

Files in this skill

本技能包含的文件

  • SKILL.md
    - this file (orchestration)
  • references/style-guide.md
    - per-context-field guidance
  • references/skill-card.md.j2
    - exact card layout
  • references/Skill Card Generator License.txt
    - license text for this skill package
  • references/catalog/limitations.json
    - canned technical-limitations catalog
  • references/catalog/risks.json
    - canned risk-management catalog
  • scripts/discover_assets.py
    - discovery and signal extraction
  • scripts/render_card.py
    - Jinja renderer with context validation
  • scripts/validate_submission.py
    - pre-submission marker validator
  • SKILL.md
    - 本文件(编排逻辑)
  • references/style-guide.md
    - 各上下文字段的指导规范
  • references/skill-card.md.j2
    - 卡片精确布局模板
  • references/Skill Card Generator License.txt
    - 本技能包的许可证文本
  • references/catalog/limitations.json
    - 预设技术局限性目录
  • references/catalog/risks.json
    - 预设风险管理目录
  • scripts/discover_assets.py
    - 发现与信号提取脚本
  • scripts/render_card.py
    - 带上下文验证的Jinja渲染器脚本
  • scripts/validate_submission.py
    - 提交前标记验证脚本