jetson-generate-kb
NVIDIA/skills
Génère un fichier Markdown de base de connaissances spécifique à chaque cible en parcourant la racine du BSP et l'arborescence des sources, afin de documenter la disposition des images, la structure de l'arborescence des sources et les références aux documents.
...Développer toutGénérer une base de connaissances cible
Présentation
Cette compétence génère une référence Markdown par profil à l’emplacement
target-platform/ (au même niveau que le fichier YAML du profil). Elle
regroupe trois éléments dans un seul fichier afin qu’une future session Claude — ou l’
utilisateur — puisse visualiser la structure de la cible active sans avoir à parcourir à nouveau le
système de fichiers :
- la structure de l’image BSP — les répertoires de niveau supérieur sous
bsp_image.root_path, la présence de sous-arborescences canoniques (rootfs/,bootloader/,source/, …), ainsi que les variantes nvpmodel correspondant à la référence (SKU) du module actif. - Structure de l’arborescence des sources — sous-arborescences de niveau supérieur sous
source.root_path(kernel-jammy-src/,hardware/nvidia/,nvidia-oot/, etc.) et les fichiers de l’arborescence des périphériques correspondant à la famille de puces. - Documents — les
documents.*références enregistrées dans le profil, avec vérification de l’existence du chemin d’accès local et descriptions d’une ligne.
La base de connaissances est un instantané, dont la date figure dans son en-tête. Relancez cette compétence chaque fois que les données sous-jacentes changent — elle est intentionnellement réexécutable et écrase la base de connaissances précédente à chaque exécution.
Quand l’invoquer
- Une fois que
jetson-init-imagea préparé le BSP pour un profil nouvellement créé. - Après avoir réextrait une archive BSP ou appliqué des correctifs sous
bsp_image.root_path. - Après la mise à jour de l’arborescence source à l’adresse
source.root_path. - Après avoir modifié
bsp_image.*oudocuments.*dans le fichier YAML du profil. - Lorsqu'une compétence en aval demande « où se trouve X dans ce BSP ? » et que vous préférez consulter la base de connaissances plutôt que de parcourir à nouveau l'arborescence.
Procédure
Déterminez la cible active
Résolvez le profil actif conformément au contrat dans
../../context/target-platform-contract.md;
mettez-le en cache en mémoire — le reste de la compétence n’utilise que ce
profil. Enregistrez (le nom de fichier nu sans .yaml)
comme racine du nom de fichier de sortie de la base de connaissances.
Valider les entrées
| Champ | Obligatoire pour la base de connaissances ? | Si manquant |
|---|---|---|
bsp_image.root_path |
oui | Refuser. Une base de connaissances sans racine BSP à analyser n’est qu’une simple reformulation en YAML ; demander à l’utilisateur d’exécuter jetson-init-image ou de modifier manuellement le profil. |
source.root_path |
non | Ignorez la section relative à l'arborescence source ; indiquez « source_root non enregistrée » dans la base de connaissances. |
documents.* |
non | Afficher un tableau « Documents » vide avec la mention « aucun document enregistré ». |
Si bsp_image.root_path est défini mais que le répertoire n'existe pas sur le disque,
refusez avec un message clair — ne créez pas de structure pour un chemin
qui n'existe pas.
Découverte des BSP (sous bsp_image.root_path)
N’exécutez que les opérations peu coûteuses suivantes — pas de balayages récursifs, pas de lecture du contenu des fichiers au-delà des listes de répertoires :
ls -1d’bsp_image.root_path(à un niveau de profondeur). Noter quels répertoires sont présents.- Pour chaque sous-arbre canonique ci-dessous, indiquez s’il est présent ou absent :
rootfs/,bootloader/,kernel/,source/,tools/,nv_tegra/. - Vérifier si le
flash_configfichier existe à l’. Notez son chemin d’accès ou/ (missing). - Liste
rootfs/etc/nvpmodel/et filtrez les noms de fichiers correspondant ànvpmodel_. Enregistrez chaque résultat. Utilisez l’identifiant du module en minuscules (par ex._ *.conf p3767) et la chaîne sku entre guillemets YAML (par ex.0001).
Découverte de l’arborescence source (sous source.root_path)
Ignorez complètement cette étape si source.root_path est NA ou s’il manque.
Sinon, exécutez uniquement :
ls -1desource.root_path(à un niveau de profondeur).- Pour chaque sous-arbre canonique ci-dessous, indiquez s'il est présent ou absent :
kernel-jammy-src/,hardware/nvidia/,nvidia-oot/,nvgpu/,nvethernetrm/,nvdisplay/,hwpm/,kernel-devicetree/. - Si
kernel-devicetree/generic-dts/dts/il en existe, lister les noms de fichiers correspondant àtegraoù* est le préfixe numérique de la famille de puces (voir le tableau des familles de puces ci-dessous). Enregistrez jusqu’à 30 résultats ; s’il y en a davantage, enregistrez le nombre et ajoutez la note « affichage des 30 premiers ».
Tableau des familles de puces (utilisé dans les étapes « Découverte du BSP » et « Découverte de l’arborescence source »)
Dériver à partir de module.id:
module.id |
Préfixe de la famille de puces | préfixe |
|---|---|---|
p3701, p3767 |
T234 — Orin | 234 |
p3834 |
T264 — Thor | 264 |
Si module.id n'apparaît pas dans ce tableau, enregistrez la puce sous la forme
unknown (module.id= et ignorez le filtre « devicetree » avec préfixe de puce
.
Les documents passent
Pour chaque champ de documents.* du profil chargé :
- Classez la valeur comme URL (commençant par
http://,https://, ouftp://) ou chemin local (tout le reste). - Pour les URL : enregistrez-les telles quelles. Ne récupérez pas l’URL — la génération de la base de connaissances doit rester hors ligne. (Une future fonctionnalité pourra permettre une indexation approfondie.)
- Pour les chemins d’accès locaux : vérifiez
os.path.exists. Enregistrez le chemin ; s’il est introuvable sur le disque, ajoutez(missing).
La description d’une ligne pour chaque champ provient du marqueur dans
../../references/platform_template.yaml
— supprimez le conteneur et utilisez le texte interne.
Si le profil ne comporte pas de documents: bloc, affichez la section sur une
seule ligne : _No documents recorded — run jetson-link-docs or hand-edit the profile to add references._
Afficher et enregistrer la base de connaissances
Afficher le Markdown en utilisant la structure ci-dessous. Utiliser la date du jour (AAA-MM-JJ) dans l’en-tête. Remplacer systématiquement tout fichier KB existant à la destination — ne pas demander de confirmation avant le remplacement ; les exécutions répétées font partie de l’ utilisation prévue.
Destination : target-platform/.
Structure générée
# 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.
Confirmer
Imprimer un bref résumé :
- Chemin de sortie :
target-platform/..md - Nombre de répertoires de niveau supérieur BSP et indication des sous-arborescences canoniques présentes / absentes.
- Nombre de correspondances nvpmodel pour le SKU actif.
- Section de l’arborescence source : rendue ou ignorée (et pourquoi).
- Documents : nombre de champs enregistrés, nombre de chemins locaux signalés
(missing).
Si une compétence en aval a déclenché cette exécution, demander à l’utilisateur de renvoyer sa requête d’origine.
Points à retenir
- La base de connaissances est un instantané, pas une vue en temps réel. L’en-tête daté fait autorité : s’il ne correspond pas à la date du jour, le BSP, la source ou les documents peuvent avoir changé en arrière-plan. Relancer l’exécution à la demande.
- Le fichier est toujours écrasé. Aucune invite n’est affichée avant l’écrasement de la base de connaissances précédente
à
target-platform/. Ceci est intentionnel — la possibilité de relancer le traitement est justement l’intérêt principal. Indiquez à l’utilisateur de ne pas modifier manuellement le fichier ; modifiez le profil YAML ou le BSP, puis régénérez..md - Échoue en cas d’
bsp_image.root_path = NA. Un profil sans chemin BSP produit une base de connaissances vide. N’en créez pas — dirigez plutôt l’ utilisateur vers le fichier YAML du profil à remplir. - Pas de récupération d'URL. Les URL des documents sont enregistrées telles quelles. La mise en œuvre d'une indexation en profondeur (HTTP HEAD, analyse de PDF) n'est pas prévue pour la v0.1.
- Pas d’analyses récursives. La découverte s’effectue à un niveau de profondeur par répertoire, avec au maximum un modèle glob ciblé (nvpmodel + devicetree). Ne parcourez jamais l’intégralité du BSP — il est énorme et lent.
- Limiter les listes de devicetree à 30 entrées pour que la base de connaissances reste lisible. Afficher « les 30 premiers sur N » en cas de troncature.
- Ne pas lancer automatiquement cette compétence à partir des compétences de configuration. La configuration peut suggérer d’exécuter cette compétence dans son résumé, mais c’est à l’utilisateur de donner son accord. L’exécution automatique masque l’étape d’E/S et surprend les utilisateurs dont les chemins d’accès au BSP ou à la documentation sont incomplets.
- Risque de conflit de noms de fichiers. La base de connaissances se trouve à
target-platform/à côté de.md . Ne pas lire par inadvertance les.yaml .mdfichiers dans la logique de liste des profils dejetson-set-target(elle filtre déjà les*.yaml, mais vérifiez avant d’ajouter de nouveaux types de fichiers). - La table des familles de puces est courte. Si une future référence de module est ajoutée et qu’elle
ne figure pas dans la table, l’étape de filtrage de l’arborescence des périphériques est ignorée — la base de connaissances
le signalera
chip: unknownplutôt que d'inventer unpréfixe. Mettez à jour le tableau des familles de puces de cette compétence lorsqu’une nouvelle puce est intégrée.
Prérequis
- Profil cible actif résolu conformément à la
../../context/target-platform-contract.md. bsp_image:enregistré par/jetson-init-image; c’est la seule arborescence sur disque requise. Sisource.root_pathmanque, affichez la base de connaissances sans la section « arborescence source ».- Facultatif :
/jetson-init-sourcedéjà résolusource:lorsque l’ utilisateur souhaite que la découverte de l’arborescence des sources soit incluse. - Facultatif mais recommandé :
/jetson-link-docsa déjà rédigé ledocuments:bloc.
Limitations
- Accès en lecture seule aux arborescences BSP et source ; ne modifie jamais le profil YAML ni ne réécrit les fichiers source.
- L'énumération des fichiers Devicetree dépend du tableau des familles de puces intégré à
cette compétence ; un SKU de module inconnu est enregistré dans la base de connaissances sous la forme
chip: unknownplutôt que sous un préfixe de fabrication. - La structure des noms de fichiers est fixée à
target-platform/pour rester à côté du fichier YAML du profil ; le renommage du fichier YAML invalide le lien..md
Dépannage
bsp_image.root_pathintrouvable — relancez/jetson-init-imageafin que le BSP soit extrait et que le chemin soit enregistré avant de régénérer la base de connaissances.- La traversée de l’arborescence source sélectionne de mauvaises sous-arborescences —
source.root_pathla redéfinition est obsolète ; relancer/jetson-init-sourceou corrigez le champ de profil. documents:Bloc manquant dans la base de connaissances —/jetson-link-docsn’a jamais été exécuté ; la KB revient à « aucun document lié » plutôt que de deviner les chemins d’accès.- Section « devicetree » trop courte / vide — la table des familles de puces ne couvre pas le SoC actif ; mettez à jour la table et relancez l'opération.
Références
../../context/target-platform-contract.md— contrat d’ordre de lecture suivi par cette compétence.../../context/bsp-customization-workflow.md— origine de la liste canonique des sous-arborescences BSP/source.../../references/platform_template.yaml— source des descriptions d’une ligne du champ « documents ».../jetson-init-target/SKILL.md— compétence sœur qui crée l’identité de la cible active.../jetson-init-image/SKILL.md— Compétence sœur qui génère les métadonnées de l’image BSP que cette compétence analyse.../jetson-set-target/SKILL.md— compétence sœur qui inverse le pointeur actif que cette compétence résout.
---
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.
Tous les fichiers
5 fichiersInstaller jetson-generate-kb
Téléchargez et décompressez les fichiers de compétences dans votre répertoire .claude/skills/.
Télécharger le ZIPClonez le dépôt et copiez les fichiers de compétence dans votre projet.
git clone https://github.com/NVIDIA/skills/tree/main/skills/jetson-generate-kb # Copy SKILL.md to your .claude/skills/ directory
Copier





Maison
