Immutable. This exact content is served forever at /api/v1/blob/05ce8482ee453c06.
--- name: dotnet-inspect-sourcelink version: 0.1.0 description: Find SourceLink-mapped original source through PDB data — map files and member locations, fetch source, or resolve checksum-matched content locally. --- # dotnet-inspect: SourceLink and original source Use this skill to get the original source mapped by the PDB. dotnet-inspect verifies local files and GitHub committed blobs read through `--repo` against the PDB checksum. A network `Original Source` fetch follows the SourceLink URL without performing that checksum check; use `library -S "SourceLink: Integrity"` for opt-in content verification of fetchable, non-embedded compiler-source documents. Without a usable PDB, SourceLink map, or matching source, use the always-local `decompiler` skill. ```bash dnx dotnet-inspect -y -- <command> ``` ## Find where the source lives `-S "Source Files"` maps types in `type` scope. Library and package scope use `SourceLink: Files`; `-S "Source Locations"` gives per-member file and line URLs without fetching bodies. Use `--urls` for a clean URL list and `--paths` for source path rows. ```bash dnx dotnet-inspect -y -- library System.Text.Json -S "SourceLink: Files" dnx dotnet-inspect -y -- type JsonSerializer --platform System.Text.Json -S "Source Files" --urls dnx dotnet-inspect -y -- member Type Method:1 -S "Source Locations" --paths dnx dotnet-inspect -y -- library System.Text.Json --il-offset 0x06000001+0x0 ``` ## Fetch the original source `-S "Original Source"` returns the original source body when SourceLink can resolve it (also part of the `-S @Source` bundle alongside the decompiled and IL views). Use `--print` to fetch the source body behind one printable SourceLink row. When the section renders multiple rows, add `--row N|first|last`; `N` addresses the displayed 1-based row number, while `first` and `last` mean the rendered endpoints. If that row has no printable document, the command reports it instead of silently choosing another row. ```bash dnx dotnet-inspect -y -- member JsonSerializer --platform System.Text.Json Serialize:1 -S "Original Source" dnx dotnet-inspect -y -- member JsonSerializer --package System.Text.Json \ Serialize:1 -S "Original Source,Source Diff" --repo /path/to/runtime dnx dotnet-inspect -y -- type JsonSerializer --platform System.Text.Json -S "Source Files" --print --row 1 dnx dotnet-inspect -y -- member JsonSerializer --platform System.Text.Json -m Serialize -S "Source Locations" --print --row 1 dnx dotnet-inspect -y -- type JsonSerializer --platform System.Text.Json -S "Source Files" --print --row 1 --json-array ``` `--repo` requires a fully qualified clone path and applies only to `raw.githubusercontent.com` SourceLink URLs. It is consulted before fetching the source body remotely; package or PDB acquisition may still use the network. ## URL forms PDBs *carry* SourceLink data; they are not SourceLink themselves. SourceLink URL rows default to raw/fetchable form; add `--blob` for browser URLs. Prefer `--urls` when you want URL payloads, `--paths` for file paths, and `--print` when you want the referenced source body. `--bare` remains a raw selected-payload escape hatch. ```bash dnx dotnet-inspect -y -- member Type Method:1 -S "Source Locations" --urls --jsonl dnx dotnet-inspect -y -- type JsonSerializer --platform System.Text.Json -S "Source Files" --urls --json-array dnx dotnet-inspect -y -- library System.Text.Json -S "SourceLink: Files" --urls --blob ``` To check *whether* SourceLink is present and usable (rather than fetch source), see the `signals` skill. Library `Signals` summarizes map usability and `SourceLink: Diagnostics` reports parse errors or rejected mappings; `SourceLink: Availability`, `SourceLink: Integrity`, and `SourceLink: Missing Files` check the mapped documents. The document checks also aggregate across selected package libraries.