OpenParable
Skip to content
← Back to skills

Dotnet Inspect Sourcelink

Research
dotnet-inspect-sourcelink

Dotnet Inspect Sourcelink is an Agent Skill for research published in the richlander/dotnet-inspect repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Find and fetch the authoritative original source via SourceLink — type-to-URL maps, member file/line locations, and the original source body. Needs a SourceLink-enabled PDB and a network fetch, so it can be unavailable.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/richlander/dotnet-inspect/blob/HEAD/skills/sourcelink/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/dotnet-inspect-sourcelink, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

dotnet-inspect: SourceLink and original source

Use this skill to get the authoritative original source as written by the author. It resolves through SourceLink data in the PDB and fetches over the network, so it can be unavailable (no PDB, no SourceLink, private repo). When it is unavailable, the decompiler skill is the always-local fallback.

dnx dotnet-inspect -y -- <command>

Find where the source lives

-S "Source Files" maps types to their SourceLink URLs (on type, library, or package); -S "Source Locations" gives per-member file and line URLs without fetching the bodies. Use --urls for a clean URL list and --paths for source path rows.

dnx dotnet-inspect -y -- library System.Text.Json -S "Source 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; add --row N when the selected section has multiple printable rows.

dnx dotnet-inspect -y -- member JsonSerializer --platform System.Text.Json Serialize:1 -S "Original Source"
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-all --json-array

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.

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 "Source Files" --urls --blob

To check whether SourceLink is present and valid (rather than fetch source), see the signals skill (SourceLink Availability/Integrity/Missing Files).