jetson-generate-kb
NVIDIA/skills
BSPのルートおよびソースツリーを走査し、画像のレイアウト、ソースツリーの構造、およびドキュメントの参照情報を記録することで、ターゲットごとに知識ベースのMarkdownファイルを生成します。
...すべて拡張しますターゲットナレッジベースを生成する
概要
このスキルは、各プロファイルごとのMarkdown形式のリファレンスを
target-platform/ (プロファイルのYAMLファイルと同階層)に生成します。このスキルは
以下の3つの要素を1つのファイルにまとめ、将来のClaudeセッションや
ユーザーが、ファイルシステムを再度探索することなく、アクティブなターゲットの構成を
確認できるようにします:
- BSPイメージのレイアウト — 以下のトップレベルディレクトリ
bsp_image.root_path、正規サブツリー(rootfs/,bootloader/,source/、…)、およびアクティブなモジュールSKUに一致する nvpmodelのバリエーション。 - ソースツリーのレイアウト —配下のトップレベルサブツリー、
source.root_path(kernel-jammy-src/,hardware/nvidia/,nvidia-oot/など)およびチップファミリーに一致するデバイスツリーファイル。 - ドキュメント —
documents.*プロファイルに記録された 参照情報。ローカルパスの存在確認と一行の説明が含まれます。
KBはスナップショットであり、ヘッダーに日付が記載されています。基となるデータが変更されるたびに、このスキルを再実行してください。 このスキルは意図的に 再実行可能になっており、実行のたびに以前のKBを上書きします。
呼び出しのタイミング
- 以下の場合に呼び出します。
jetson-init-image新しく作成された プロファイル用にBSPを準備した後。 - BSPアーカイブを再抽出したり、
bsp_image.root_path. - ソースツリーを更新した後
source.root_path. - 編集後
bsp_image.*またはdocuments.*プロファイルのYAMLを編集した後。 - 下流のスキルから「このBSP内のXはどこにあるのか?」と尋ねられた際、 ツリーを再度探索するよりもKBを確認したい場合。
手順
アクティブなターゲットを解決する
契約に従ってアクティブなプロファイルを解決し
../../context/target-platform-contract.md;
メモリにキャッシュする — スキルの残りの部分は、この
プロファイルのみを使用する。記録 (ファイル名から .yaml)
をKB出力ファイル名のステムとして記録する。
入力の妥当性を検証する
| フィールド | KBで必須? | 欠落している場合 |
|---|---|---|
bsp_image.root_path |
はい | 拒否する。スキャン対象の BSP ルートがない KB は単なる YAML の再記述に過ぎない。ユーザーに、 jetson-init-image またはプロファイルを手動で編集するようユーザーに指示する。 |
source.root_path |
いいえ | source-tree セクションをスキップし、KB に「source_root が記録されていない」と注記する。 |
documents.* |
いいえ | 「ドキュメントは記録されていません」という注記を添えて、空の「Documents」テーブルを表示する。 |
もし bsp_image.root_path が設定されているが、ディスク上にそのディレクトリが存在しない場合は、
明確なメッセージを表示して拒否する — 存在しないパスに対して
レイアウトをでっち上げてはならない。
BSP 検出( bsp_image.root_path)
以下の負荷の少ない操作のみを実行する — 再帰的なスキャンや、 ディレクトリ一覧以外のファイル内容の読み取りは行わない:
ls -1(1 階層分)。どのディレクトリが存在するかを記録する。bsp_image.root_path(1レベル深さ)。どの ディレクトリが存在するかを記録する。- 以下の各正規部分木について、存在/非存在をマークする:
rootfs/,bootloader/,kernel/,source/,tools/,nv_tegra/. - アクティブな
flash_configファイルがにアクティブなファイルが存在するかどうかを確認する。そのパスまたは/ (missing). - リスト
rootfs/etc/nvpmodel/し、nvpmodel_に一致するファイル名をフィルタリングします。一致したものをそれぞれ記録します。 小文字のモジュール ID(例:_ *.conf p3767)と、YAML形式で引用符で囲まれた sku文字列(例:0001).
ソースツリーの検出( source.root_path)
以下の場合は、この手順を完全にスキップしてください source.root_path が NA の場合、この手順を完全にスキップしてください。
それ以外の場合は、以下のみを実行してください:
ls -1のsource.root_path(深さ1レベル)。- 以下の各正規部分木について、存在/不在をマークしてください:
kernel-jammy-src/,hardware/nvidia/,nvidia-oot/,nvgpu/,nvethernetrm/,nvdisplay/,hwpm/,kernel-devicetree/. - もし
kernel-devicetree/generic-dts/dts/存在する場合、 一致するtegraここで* はチップファミリの数値 プレフィックスです(以下のチップファミリマップを参照)。最大30件まで記録します。それ以上ある場合は、 件数と「最初の30件を表示」という注記を記録します。
チップファミリ対応表(「BSP検出」および「ソースツリー検出」ステップで使用)
導出 から module.id:
module.id |
チップ・ファミリー | プレフィックス |
|---|---|---|
p3701, p3767 |
T234 — オーリン | 234 |
p3834 |
T264 — トール | 264 |
もし module.id この表にない場合は、チップを
unknown (module.id= として記録し、チッププレフィックス付きのデバイスツリー
フィルタはスキップしてください。
ドキュメントは
読み込まれたプロファイル内の documents.* 読み込まれたプロファイルの各フィールドについて:
- その値をURL(
http://,https://で始まるもの)、 またはftp://)か、ローカルパス(それ以外)として分類します。 - URL の場合:そのまま記録してください。URL を取得しないでください — ナレッジベースの 生成はオフラインのまま行う必要があります。(将来のスキルでは、詳細な インデックス作成に移行する可能性があります。)
- ローカルパスの場合:
os.path.exists。パスをそのまま記録し、 ディスク上に存在しない場合は、末尾に(missing).
各フィールドの1行の説明は、
../../references/platform_template.yaml
— ラッパーを削除し ラッパーを削除し、内部のテキストを使用してください。
プロファイルに documents: ブロックがない場合は、そのセクションを
1行で表示します: _No documents recorded — run jetson-link-docs or hand-edit the profile to add references._
KBのレンダリングと書き込み
以下の構造に従ってマークダウンをレンダリングします。ヘッダーには本日の日付 (YYYY-MM-DD)を使用します。保存先にある既存のKBファイルは常に上書きしてください — 上書き前の確認は行わないでください。再実行が 想定された使用方法です。
保存先: target-platform/.
レンダリング後の構造
# Target knowledge base —
> Generated from `` (BSP version ``).
> Re-run `jetson-generate-kb` after extracting a new BSP, applying
> patches, or editing profile fields. This file is a regenerated
> snapshot — do not hand-edit.
## Profile facts
- **Reference devkit:** ``
- **Module:** `-` (``)
- **Reference carrier:** `-`
- **Custom carrier:** `` (`-`) _← omit this row if Case 1_
- **Active flash conf:** ``
- **BSP path:** ``
- **BSP version:** ``
- **Source root:** `` _← or "_not recorded_" if NA_
## BSP image layout
Top-level directories under ``:
| Directory | Present | Purpose |
|---|---|---|
| `rootfs/` | ✓ / ✗ | userspace rootfs (nvpmodel, nvfan, systemd units, etc.) |
| `bootloader/` | ✓ / ✗ | firmware blobs, BCT, MB1/MB2 dts |
| `kernel/` | ✓ / ✗ | prebuilt kernel + modules |
| `source/` | ✓ / ✗ | BSP source tree (kernel, OOT drivers, DT) |
| `tools/` | ✓ / ✗ | flashing helpers, jetson-io, kernel_flash |
| `nv_tegra/` | ✓ / ✗ | nvidia firmware tarballs, kernel-supplements |
Active flash conf ``: present at
`/` _or_ `(missing — verify before flashing)`.
### nvpmodel files matching the active SKU
Filtered from `rootfs/etc/nvpmodel/` by `nvpmodel__*.conf`:
- ``
The active variant at boot is selected by `nvpower.sh` from
`/proc/device-tree/compatible` plus super / safety state — see
`jetson-customize-nvpmodel` for the resolution rules.
## Source tree layout
(omit this whole section if `source.root_path` is `NA`/missing)
Top-level subtrees under ``:
| Subtree | Present | Purpose |
|---|---|---|
| `kernel-jammy-src/` | ✓ / ✗ | mainline 5.x kernel sources |
| `hardware/nvidia/` | ✓ / ✗ | NVIDIA platform DTs (per chip family) |
| `nvidia-oot/` | ✓ / ✗ | NVIDIA out-of-tree kernel modules |
| `nvgpu/` | ✓ / ✗ | GPU driver |
| `nvethernetrm/` | ✓ / ✗ | ethernet driver |
| `nvdisplay/` | ✓ / ✗ | display driver |
| `hwpm/` | ✓ / ✗ | hardware performance monitor |
| `kernel-devicetree/` | ✓ / ✗ | devicetree sources |
### Devicetree files for chip family ``
(omit if `kernel-devicetree/generic-dts/dts/` is absent)
Files matching `tegra*` under `kernel-devicetree/generic-dts/dts/`:
- ``
## Documents
| Field | Reference |
|---|---|
| Documents root folder | `` _or_ _not recorded_ |
| BSP / Jetson Linux developer guide | `` _or_ _not recorded_ |
| Tegra SoC Technical Reference Manual | `` _or_ _not recorded_ |
| Jetson module data sheet | `` _or_ _not recorded_ |
| Jetson module design guide (PDG) | `` _or_ _not recorded_ |
| Jetson module thermal design guide (TDG) | `` _or_ _not recorded_ |
| Jetson module schematic | `` _or_ _not recorded_ |
| Reference carrier board specification | `` _or_ _not recorded_ |
| Reference carrier schematic | `` _or_ _not recorded_ |
| Custom carrier schematic | `` _or_ _not recorded / N/A (no custom carrier)_ |
| Reference-devkit pinmux spreadsheet | `` _or_ _not recorded_ |
| Custom-carrier pinmux spreadsheet | `` _or_ _not recorded / N/A (no custom carrier)_ |
(Local paths are tagged ` (missing)` if absent on disk. URLs are
recorded verbatim and not fetched. If `doc_root` is set, also tag
` (missing)` on it if the directory itself is gone — that signals
auto-mapping in `jetson-link-docs` won't work on a re-run.)
## How to refresh this file
Re-run `jetson-generate-kb` whenever any of the following changes:
- the BSP at `` is re-extracted, patched, or upgraded,
- the source tree at `` changes,
- the active profile's `bsp_image.*` or `documents.*` fields are edited.
This file is overwritten on every run. Do not hand-edit it — edit the
source data (profile YAML or the BSP tree) and re-run instead.
確認
簡単な要約を表示:
- 出力パス:
target-platform/..md - BSPの最上位ディレクトリ数および、どの正規サブツリーが 存在したか/存在しなかったか。
- アクティブなSKUに対するnvpmodelの一致数。
- ソースツリーセクション:レンダリングされたかスキップされたか(およびその理由)。
- ドキュメント:記録されたフィールドの数、フラグが立てられたローカルパスの数
(missing).
下流のスキルがこの実行をトリガーした場合は、ユーザーに 元のリクエストを再送信するよう指示する。
注意点
- KBはスナップショットであり、リアルタイムのビューではありません。日付が記載されたヘッダーが 基準となります。今日の日付と一致しない場合、BSP/ソース/ドキュメントは 内部で変更されている可能性があります。必要に応じて再実行してください。
- 常に上書きされます。以前のナレッジベースを上書きする前に確認のメッセージは表示されません
。
target-platform/。これは意図的な仕様です — 再実行可能性こそが本機能の目的です。ユーザーには、ファイルを手動で編集せず、 プロファイルのYAMLまたはBSPを編集して再生成するよう伝えてください。.md bsp_image.root_path = NAでは実行を拒否します。BSP パスが指定されていないプロファイルでは コンテンツのない KB が生成されます。そのようなプロファイルを作成せず、代わりに ユーザーにプロファイル YAML を参照して入力するよう指示してください。- URLの取得は行いません。ドキュメントのURLはそのまま記録されます。 詳細なインデックス作成(HTTP HEAD、PDF解析)への拡張は、v0.1の範囲外です。
- 再帰的なスキャンは行いません。ディスカバリはディレクトリごとに1レベルまでで、 対象となるグロブは最大1つ(nvpmodel + devicetree)です。BSP全体を 走査することは絶対に避けてください — 規模が大きく、処理に時間がかかります。
- KBの可読性を保つため、デバイスツリーのリストは30エントリまでに制限する。 切り捨てた場合は「N件中最初の30件」と表示する。
- セットアップスキルからの自動実行は行わない。セットアップの概要では このスキルの実行が提案される場合があるが、実行の可否はユーザーが選択する。自動実行は I/O処理の段階を隠蔽し、BSPやドキュメントのパスが不完全なユーザーを困惑させる。
- ファイル名の競合リスク。KBは
target-platform/隣に.md に配置されています。誤って 読み込まない.yaml .mdファイルを読み込まないようにしてください。jetson-set-target(すでに*.yamlでフィルタリングされていますが、新しいファイルタイプを追加する前に 必ず確認してください)。 - チップファミリのマッピングは簡略化されています。将来、マッピングに
含まれていないモジュールSKUが追加された場合、デバイスツリーのフィルタリングステップはスキップされます。この件については、KB
に注記されます
chip: unknownと記載され、。 新しいチップが導入されたら、このスキルのチップファミリテーブルを更新してください。
前提条件
- アクティブなターゲットプロファイルは、
../../context/target-platform-contract.md. bsp_image:記録されたアクティブなターゲットプロファイル;; これは、ディスク上に必要な唯一のツリーです。/jetson-init-imageによって解決されたアクティブなターゲットプロファイル;これが ディスク上に必要な唯一のツリーです。もしsource.root_pathが欠落している場合は、ソースツリーセクションを除いてKBを レンダリングする。- オプション:
/jetson-init-sourceすでに解決済みsource:ユーザーが ソースツリーの検出を含めることを希望する場合。 - オプションですが推奨されます:
/jetson-link-docsすでにdocuments:ブロックを
制限事項
- BSPおよびソースツリーに対しては読み取り専用であり、プロファイルの YAMLを編集したり、ソースファイルを書き換えたりすることはありません。
- デバイスツリーファイルの列挙は、このスキル内のチップファミリテーブルに依存します。
未知のモジュールSKUは、架空のプレフィックスではなく
chip: unknownとしてKBに登録されます。 - ファイル名の配置は
target-platform/に固定されており、 プロファイルの YAML の隣に配置されます。YAML の名前を変更すると、リンクが無効になります。.md
トラブルシューティング
bsp_image.root_pathが見つからない場合 — 再実行/jetson-init-image。そうすることで BSPが抽出され、KBを再生成する前に パスが記録されます。- ソースツリーの探索で誤ったサブツリーが検出される —
source.root_path上書きが古くなっているため、再実行するか/jetson-init-sourceまたは プロファイルフィールドを修正してください。 documents:KBからブロックが欠落している —/jetson-link-docs実行が 行われていないため、KBはパスを推測するのではなく、 「バインドされたドキュメントなし」の状態にフォールバックする。- デバイスツリーセクションが不完全/空 — チップファミリテーブルが アクティブなSoCをカバーしていない;テーブルを更新して再実行してください。
参照
../../context/target-platform-contract.md— このスキルが従う読み取り順序の規約。../../context/bsp-customization-workflow.md— 正規のBSP/ソースサブツリーリストの出典。../../references/platform_template.yaml— ドキュメント・フィールドの1行説明の出典。../jetson-init-target/SKILL.md— アクティブなターゲットIDを作成する兄弟スキル。../jetson-init-image/SKILL.md— このスキルがスキャンするBSP画像メタデータを作成する兄弟スキル。../jetson-set-target/SKILL.md— このスキルが解決するアクティブなポインタを切り替える兄弟スキル。
---
name: jetson-generate-kb
description: Generates a per-target knowledge-base markdown file by walking the BSP root and source tree, documenting image layout, source tree structure, and document references.
license: Apache-2.0
---
# Generate Target Knowledge Base
## Overview
This skill produces a **per-profile** markdown reference at
`target-platform/<profile-stem>.md` (sibling to the profile YAML). It
bundles three things into one file so a future Claude session — or the
user — can see the shape of the active target without re-walking the
filesystem:
1. **BSP image layout** — top-level directories under
`bsp_image.root_path`, presence of canonical subtrees (`rootfs/`,
`bootloader/`, `source/`, …), and the nvpmodel variants matching
the active module SKU.
2. **Source tree layout** — top-level subtrees under
`source.root_path` (`kernel-jammy-src/`, `hardware/nvidia/`,
`nvidia-oot/`, etc.) and devicetree files matching the chip family.
3. **Documents** — the `documents.*` references recorded in the
profile, with local-path existence checks and one-line descriptions.
The KB is a **snapshot**, dated in its header. Re-run this skill
whenever the underlying data changes — it is intentionally
re-runnable and overwrites the previous KB on each run.
## When to invoke
- After `jetson-init-image` prepares the BSP for a freshly authored
profile.
- After re-extracting a BSP archive or applying patches under
`bsp_image.root_path`.
- After updating the source tree at `source.root_path`.
- After editing `bsp_image.*` or `documents.*` in the profile YAML.
- When a downstream skill asks "where is X in this BSP?" and you'd
rather check the KB than re-walk the tree.
## Procedure
### Resolve the active target
Resolve the active profile per the contract in
[`../../context/target-platform-contract.md`](../../context/target-platform-contract.md);
cache it in memory — the rest of the skill consumes only this
profile. Record `<profile-stem>` (the bare filename minus `.yaml`)
as the KB output filename stem.
### Validate inputs
| Field | Required for KB? | If missing |
|---|---|---|
| `bsp_image.root_path` | **yes** | Refuse. A KB with no BSP root to scan is just a YAML restatement; tell the user to run `jetson-init-image` or hand-edit the profile. |
| `source.root_path` | no | Skip the source-tree section; note "source_root not recorded" in the KB. |
| `documents.*` | no | Render an empty Documents table with a "no documents recorded" note. |
If `bsp_image.root_path` is set but the directory does not exist on disk,
refuse with a clear message — do not fabricate a layout for a path
that isn't there.
### BSP discovery (under `bsp_image.root_path`)
Run **only** the following cheap operations — no recursive scans, no
file content reads beyond directory listings:
1. `ls -1` of `bsp_image.root_path` (one level deep). Record which
directories are present.
2. For each canonical subtree below, mark present/absent:
`rootfs/`, `bootloader/`, `kernel/`, `source/`, `tools/`,
`nv_tegra/`.
3. Verify the active `flash_config` file exists at
`<bsp_image.root_path>/<flash_config>`. Record its path or
`(missing)`.
4. List `rootfs/etc/nvpmodel/` and filter to filenames matching
`nvpmodel_<module.id>_<module.sku>*.conf`. Record each match.
Use the lower-case module id (e.g. `p3767`) and the YAML-quoted
sku string (e.g. `0001`).
### Source tree discovery (under `source.root_path`)
Skip this step entirely if `source.root_path` is `NA` or missing.
Otherwise, run only:
1. `ls -1` of `source.root_path` (one level deep).
2. For each canonical subtree below, mark present/absent:
`kernel-jammy-src/`, `hardware/nvidia/`, `nvidia-oot/`, `nvgpu/`,
`nvethernetrm/`, `nvdisplay/`, `hwpm/`, `kernel-devicetree/`.
3. If `kernel-devicetree/generic-dts/dts/` exists, list filenames
matching `tegra<chip>*` where `<chip>` is the chip-family numeric
prefix (see chip-family map below). Record up to 30 hits; if more,
record the count and a "showing first 30" note.
#### Chip-family map (used in the "BSP discovery" and "Source tree discovery" steps)
Derive `<chip>` from `module.id`:
| `module.id` | Chip family | `<chip>` prefix |
|---|---|---|
| `p3701`, `p3767` | T234 — Orin | `234` |
| `p3834` | T264 — Thor | `264` |
If `module.id` is not in this table, record the chip as
`unknown (module.id=<value>)` and skip the chip-prefixed devicetree
filter.
### Documents pass
For each field in `documents.*` from the loaded profile:
1. Classify the value as **URL** (starts with `http://`, `https://`,
or `ftp://`) or **local path** (anything else).
2. For URLs: record verbatim. **Do not fetch the URL** — KB
generation must remain offline. (A future skill can promote to deep
indexing.)
3. For local paths: check `os.path.exists`. Record the path; if
missing on disk, append ` (missing)`.
The one-line description for each field comes from the marker in
[`../../references/platform_template.yaml`](../../references/platform_template.yaml)
— strip the `<OPTIONAL: …>` wrapper and use the inner text.
If the profile has no `documents:` block, render the section with a
single line: `_No documents recorded — run `jetson-link-docs`
or hand-edit the profile to add references._`
### Render and write the KB
Render the markdown using the structure below. Use today's date
(YYYY-MM-DD) in the header. Always overwrite any existing KB file at
the destination — do not prompt before overwriting; re-runs are the
intended use.
Destination: `target-platform/<profile-stem>.md`.
#### Rendered structure
```markdown
# Target knowledge base — <profile-stem>
> Generated <YYYY-MM-DD> from `<bsp_image.root_path>` (BSP version `<bsp_image.version>`).
> Re-run `jetson-generate-kb` after extracting a new BSP, applying
> patches, or editing profile fields. This file is a regenerated
> snapshot — do not hand-edit.
## Profile facts
- **Reference devkit:** `<reference_devkit.name>`
- **Module:** `<module.id>-<module.sku>` (`<chip family label>`)
- **Reference carrier:** `<carrier.id>-<carrier.sku>`
- **Custom carrier:** `<custom_carrier.name>` (`<custom_carrier.id>-<custom_carrier.sku>`) _← omit this row if Case 1_
- **Active flash conf:** `<flash_config>`
- **BSP path:** `<bsp_image.root_path>`
- **BSP version:** `<bsp_image.version>`
- **Source root:** `<source.root_path>` _← or "_not recorded_" if NA_
## BSP image layout
Top-level directories under `<bsp_image.root_path>`:
| Directory | Present | Purpose |
|---|---|---|
| `rootfs/` | ✓ / ✗ | userspace rootfs (nvpmodel, nvfan, systemd units, etc.) |
| `bootloader/` | ✓ / ✗ | firmware blobs, BCT, MB1/MB2 dts |
| `kernel/` | ✓ / ✗ | prebuilt kernel + modules |
| `source/` | ✓ / ✗ | BSP source tree (kernel, OOT drivers, DT) |
| `tools/` | ✓ / ✗ | flashing helpers, jetson-io, kernel_flash |
| `nv_tegra/` | ✓ / ✗ | nvidia firmware tarballs, kernel-supplements |
Active flash conf `<flash_config>`: present at
`<bsp_image.root_path>/<flash_config>` _or_ `(missing — verify before flashing)`.
### nvpmodel files matching the active SKU
Filtered from `rootfs/etc/nvpmodel/` by `nvpmodel_<module.id>_<module.sku>*.conf`:
- `<each match, one per line>`
The active variant at boot is selected by `nvpower.sh` from
`/proc/device-tree/compatible` plus super / safety state — see
`jetson-customize-nvpmodel` for the resolution rules.
## Source tree layout
(omit this whole section if `source.root_path` is `NA`/missing)
Top-level subtrees under `<source.root_path>`:
| Subtree | Present | Purpose |
|---|---|---|
| `kernel-jammy-src/` | ✓ / ✗ | mainline 5.x kernel sources |
| `hardware/nvidia/` | ✓ / ✗ | NVIDIA platform DTs (per chip family) |
| `nvidia-oot/` | ✓ / ✗ | NVIDIA out-of-tree kernel modules |
| `nvgpu/` | ✓ / ✗ | GPU driver |
| `nvethernetrm/` | ✓ / ✗ | ethernet driver |
| `nvdisplay/` | ✓ / ✗ | display driver |
| `hwpm/` | ✓ / ✗ | hardware performance monitor |
| `kernel-devicetree/` | ✓ / ✗ | devicetree sources |
### Devicetree files for chip family `<chip>`
(omit if `kernel-devicetree/generic-dts/dts/` is absent)
Files matching `tegra<chip>*` under `kernel-devicetree/generic-dts/dts/`:
- `<each match, one per line — cap at 30, then a "first 30 of N" note>`
## Documents
| Field | Reference |
|---|---|
| Documents root folder | `<doc_root>` _or_ _not recorded_ |
| BSP / Jetson Linux developer guide | `<bsp_developer_guide>` _or_ _not recorded_ |
| Tegra SoC Technical Reference Manual | `<soc_tech_ref_manual>` _or_ _not recorded_ |
| Jetson module data sheet | `<module_data_sheet>` _or_ _not recorded_ |
| Jetson module design guide (PDG) | `<module_design_guide>` _or_ _not recorded_ |
| Jetson module thermal design guide (TDG) | `<module_thermal_design_guide>` _or_ _not recorded_ |
| Jetson module schematic | `<module_schematic>` _or_ _not recorded_ |
| Reference carrier board specification | `<carrier_board_spec>` _or_ _not recorded_ |
| Reference carrier schematic | `<carrier_schematic>` _or_ _not recorded_ |
| Custom carrier schematic | `<custom_carrier_schematic>` _or_ _not recorded / N/A (no custom carrier)_ |
| Reference-devkit pinmux spreadsheet | `<ref_devkit_pinmux_xls>` _or_ _not recorded_ |
| Custom-carrier pinmux spreadsheet | `<custom_carrier_pinmux_xls>` _or_ _not recorded / N/A (no custom carrier)_ |
(Local paths are tagged ` (missing)` if absent on disk. URLs are
recorded verbatim and not fetched. If `doc_root` is set, also tag
` (missing)` on it if the directory itself is gone — that signals
auto-mapping in `jetson-link-docs` won't work on a re-run.)
## How to refresh this file
Re-run `jetson-generate-kb` whenever any of the following changes:
- the BSP at `<bsp_image.root_path>` is re-extracted, patched, or upgraded,
- the source tree at `<source.root_path>` changes,
- the active profile's `bsp_image.*` or `documents.*` fields are edited.
This file is overwritten on every run. Do not hand-edit it — edit the
source data (profile YAML or the BSP tree) and re-run instead.
```
### Confirm
Print a short summary:
- Output path: `target-platform/<profile-stem>.md`.
- BSP top-level directory count and which canonical subtrees were
present / absent.
- nvpmodel match count for the active SKU.
- Source-tree section: rendered or skipped (and why).
- Documents: count of recorded fields, count of local paths flagged
`(missing)`.
If a downstream skill triggered this run, tell the user to re-issue
their original request.
## Gotchas
- **The KB is a snapshot, not a live view.** The dated header is
authoritative — if it doesn't match today, the BSP/source/docs may
have changed underneath. Re-run on demand.
- **Always overwrites.** No prompt before clobbering the previous KB
at `target-platform/<profile-stem>.md`. This is intentional —
re-runnability is the whole point. Tell the user not to hand-edit
the file; edit profile YAML or the BSP and regenerate.
- **Refuses on `bsp_image.root_path = NA`.** A profile with no BSP path
produces a content-free KB. Do not write one — instead, point the
user at the profile YAML to fill in.
- **No URL fetching.** Document URLs are recorded verbatim. Promoting
to deep indexing (HTTP HEAD, PDF parsing) is out of scope for v0.1.
- **No recursive scans.** Discovery is one level deep per directory,
with at most one targeted glob (nvpmodel + devicetree). Never walk
the entire BSP — it's huge and slow.
- **Cap devicetree listings at 30 entries** to keep the KB readable.
Show "first 30 of N" when truncating.
- **Don't auto-invoke from setup skills.** Setup may suggest running
this skill in its summary, but the user opts in. Auto-running hides
the I/O step and surprises users whose BSP/doc paths are incomplete.
- **Filename collision risk.** The KB sits at
`target-platform/<stem>.md` next to `<stem>.yaml`. Don't accidentally
read `.md` files in the profile-listing logic of
`jetson-set-target` (it already filters to `*.yaml`, but check
before adding new file types).
- **Chip-family map is short.** If a future module SKU is added that
isn't in the map, the devicetree filter step is skipped — the KB
will note `chip: unknown` rather than fabricate a `<chip>` prefix.
Update this skill's chip-family table when a new chip lands.
## Prerequisites
- Active target profile resolved per
`../../context/target-platform-contract.md`.
- `bsp_image:` recorded by `/jetson-init-image`; this is the only
required on-disk tree. If `source.root_path` is missing, render the KB
without the source-tree section.
- Optional: `/jetson-init-source` already resolved `source:` when the
user wants source-tree discovery included.
- Optional but recommended: `/jetson-link-docs` already wrote the
`documents:` block.
## Limitations
- Read-only against the BSP and source trees; never edits the profile
YAML or rewrites source files.
- Devicetree-file enumeration depends on the chip-family table inside
this skill; an unknown module SKU lands in the KB as `chip: unknown`
rather than a fabricated prefix.
- Filename layout is fixed at `target-platform/<stem>.md` to stay next
to the profile YAML; renaming the YAML invalidates the link.
## Troubleshooting
- **`bsp_image.root_path` not found** — re-run `/jetson-init-image` so
the BSP is extracted and the path is recorded before regenerating
the KB.
- **Source tree walk picks up wrong subtrees** — `source.root_path`
override is stale; rerun `/jetson-init-source` or correct the
profile field.
- **`documents:` block missing from the KB** — `/jetson-link-docs` was
never run; the KB falls back to "no documents bound" rather than
guessing paths.
- **Devicetree section short / empty** — chip-family table doesn't
cover the active SoC; update the table and rerun.
## References
- [`../../context/target-platform-contract.md`](../../context/target-platform-contract.md) — read-order contract this skill follows.
- [`../../context/bsp-customization-workflow.md`](../../context/bsp-customization-workflow.md) — origin of the canonical BSP/source subtree list.
- [`../../references/platform_template.yaml`](../../references/platform_template.yaml) — source of the documents-field one-line descriptions.
- [`../jetson-init-target/SKILL.md`](../jetson-init-target/SKILL.md) — sibling skill that authors the active target identity.
- [`../jetson-init-image/SKILL.md`](../jetson-init-image/SKILL.md) — sibling skill that authors the BSP image metadata this skill scans.
- [`../jetson-set-target/SKILL.md`](../jetson-set-target/SKILL.md) — sibling skill that flips the active pointer this skill resolves.
すべてのファイル
5件のファイルjetson-generate-kbをインストール
スキルファイルをダウンロードし、.claude/skills/ ディレクトリに解凍してください。
ZIPをダウンロードリポジトリをクローンし、スキルファイルをプロジェクトにコピーしてください。
git clone https://github.com/NVIDIA/skills/tree/main/skills/jetson-generate-kb # Copy SKILL.md to your .claude/skills/ directory
コピー





家
