skill-card-generator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGenerate 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.
- is installed before running
jinja2.render_card.py - The target path is a skill directory containing or
SKILL.md.skill.md - The agent can write a temporary context JSON file and the rendered card output.
- Runtime permissions allow reads from plus this skill's
target_skill_directoryandreferences/, writes only to the target skill directory orscripts/, and shell execution only for the three scripts listed below./tmp/
- 已安装Python 3。
- 运行前已安装
render_card.py。jinja2 - 目标路径为包含或
SKILL.md的技能目录。skill.md - Agent可写入临时上下文JSON文件和生成的卡片输出。
- 运行时权限允许读取以及本技能的
target_skill_directory和references/目录,仅允许写入目标技能目录或scripts/,仅允许执行以下三个脚本。/tmp/
Instructions
操作步骤
- First, read this completely before running any script.
SKILL.md - Resolve the target skill directory from ; if omitted, use the current working directory.
$ARGUMENTS - Stay within the declared permission scope. Do not read , credential files, hidden auth folders, or unrelated repo files; do not write outside the target skill directory or
.env./tmp/ - Run against the target. Use the structured signal summary first; if output is truncated, read only targeted files or small excerpts.
scripts/discover_assets.py - Build a context JSON file from the structured signal summary first, then from extracted file contents only when needed.
- Follow for every context field. Use
references/style-guide.mdonly when no source supports a truthful value.HUMAN-REQUIRED - Render the card with and fix any schema errors before proceeding.
scripts/render_card.py - Review the card manually, remove resolved VERIFY and SELECT markers, then run .
scripts/validate_submission.py - Before finishing, confirm the rendered card has no unrendered or
{{ ... }}template fragments.{% ... %}
- 运行任何脚本前,先完整阅读本文件。
SKILL.md - 从解析目标技能目录;若未指定,则使用当前工作目录。
$ARGUMENTS - 严格遵守声明的权限范围。不得读取、凭证文件、隐藏认证文件夹或无关仓库文件;不得写入目标技能目录或
.env以外的路径。/tmp/ - 对目标目录运行。优先使用结构化信号摘要;若输出被截断,仅读取目标文件或小片段内容。
scripts/discover_assets.py - 优先基于结构化信号摘要构建上下文JSON文件,仅在必要时从提取的文件内容补充。
- 每个上下文字段均需遵循规范。仅当无数据源支持真实值时,使用
references/style-guide.md标记。HUMAN-REQUIRED - 使用生成卡片,修复所有 schema 错误后再继续。
scripts/render_card.py - 手动审查卡片,移除已解决的VERIFY和SELECT标记,然后运行。
scripts/validate_submission.py - 完成前,确认生成的卡片中没有未渲染的或
{{ ... }}模板片段。{% ... %}
Available Scripts
可用脚本
| Script | Purpose | Arguments |
|---|---|---|
| Extracts skill files, repo signals, style guide, and template into one discovery report. | |
| Validates context JSON and renders the skill card from the Jinja template. | |
| Fails if the rendered card still contains VERIFY or SELECT review markers. | |
| 脚本 | 用途 | 参数 |
|---|---|---|
| 将技能文件、仓库信号、风格指南和模板提取为一份发现报告。 | |
| 验证上下文JSON并从Jinja模板生成技能卡片。 | |
| 若生成的卡片仍包含VERIFY或SELECT审查标记,则验证失败。 | |
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
故障排除
| Error | Cause | Solution |
|---|---|---|
| The target path is wrong or not mounted in the workspace. | Re-run discovery with the absolute path to the skill directory. |
| The renderer dependency is missing. | Install |
| Required fields are missing or typed incorrectly. | Fix the context JSON using |
| Unresolved marker failure | VERIFY or SELECT markers remain after review. | Confirm each marked field, prune catalog entries, then re-run |
| 错误 | 原因 | 解决方案 |
|---|---|---|
| 目标路径错误或未挂载到工作区。 | 使用技能目录的绝对路径重新运行发现脚本。 |
| 缺少渲染器依赖。 | 安装 |
| 必填字段缺失或类型错误。 | 使用 |
| Unresolved marker failure | 审查后仍存在VERIFY或SELECT标记。 | 确认每个标记字段,删减目录条目后重新运行 |
Files in this skill
本技能包含的文件
- - this file (orchestration)
SKILL.md - - per-context-field guidance
references/style-guide.md - - exact card layout
references/skill-card.md.j2 - - license text for this skill package
references/Skill Card Generator License.txt - - canned technical-limitations catalog
references/catalog/limitations.json - - canned risk-management catalog
references/catalog/risks.json - - discovery and signal extraction
scripts/discover_assets.py - - Jinja renderer with context validation
scripts/render_card.py - - pre-submission marker validator
scripts/validate_submission.py
- - 本文件(编排逻辑)
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 - - 带上下文验证的Jinja渲染器脚本
scripts/render_card.py - - 提交前标记验证脚本
scripts/validate_submission.py