/SKILL.md
# SourceAnnotations > Embed curated file annotations in PDB files so tools and AI agents can discover what matters in a library's source repository. ## What This Library Does SourceAnnotations is a companion to SourceLink. Where SourceLink maps binary symbols to source URLs, SourceAnnotations lets library authors tag specific files — docs, migration guides, key source files — with human-readable descriptions and freeform role tags. These annotations are embedded in the PDB and travel with the
npx skillsauth add richlander/source-annotations source-annotationsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Embed curated file annotations in PDB files so tools and AI agents can discover what matters in a library's source repository.
SourceAnnotations is a companion to SourceLink. Where SourceLink maps binary symbols to source URLs, SourceAnnotations lets library authors tag specific files — docs, migration guides, key source files — with human-readable descriptions and freeform role tags. These annotations are embedded in the PDB and travel with the binary.
(path, role, description) tuples stored as a JSON blob in the PDB's CustomDebugInformation table.llm-context, breaking-change, migration-guide, api-surface. Consumers filter on roles they understand.a7e2f251-4cd1-4bfc-a2f0-e3e8e8d1f74b.src/
SourceAnnotations/ Core model + reader library
SourceAnnotation.cs Record: (Path, Role?, Description?)
SourceAnnotationsDocument.cs Record: (Version, Annotations)
SourceAnnotationsGuids.cs Well-known GUID constant
SourceAnnotationsReader.cs Read annotations from PDB files
SourceAnnotations.Tasks/ MSBuild integration
GenerateSourceAnnotationsTask.cs ITaskItem[] → JSON file
EmbedSourceAnnotationsTask.cs JSON + PDB → modified PDB
build/
SourceAnnotations.Tasks.props Convention auto-discovery
SourceAnnotations.Tasks.targets Build target wiring
// Core types
record SourceAnnotation(string Path, string? Role, string? Description);
record SourceAnnotationsDocument(int Version, IReadOnlyList<SourceAnnotation> Annotations);
// Reader
static class SourceAnnotationsReader
{
static SourceAnnotationsDocument? Read(string pdbPath);
static SourceAnnotationsDocument? Read(MetadataReader reader);
}
// GUID
static readonly Guid SourceAnnotationsGuids.SourceAnnotationsId;
Authors add <SourceAnnotation> items to their project file:
<ItemGroup>
<SourceAnnotation Include="SKILL.md" Role="llm-context"
Description="LLM-optimized library guide." />
</ItemGroup>
The GenerateSourceAnnotations target runs after CoreCompile:
GenerateSourceAnnotationsTask — deduplicates items (last-writer-wins), validates paths are relative with no .. traversal, writes JSON.EmbedSourceAnnotationsTask — reads the standalone PDB, copies all debug tables, adds/replaces the CustomDebugInformation row, writes back using PortablePdbBuilder.Convention auto-discovery: llms.txt and docs/llms.txt are automatically included with the llm-context role if present.
The embed task uses System.Reflection.Metadata and System.Reflection.Metadata.Ecma335 to:
MetadataBuilderCustomDebugInformation rowPortablePdbBuilder, preserving the original PDB ID and type system row counts{
"version": 1,
"annotations": [
{ "path": "SKILL.md", "role": "llm-context", "description": "..." },
{ "path": "src/Foo.cs" }
]
}
Fields role and description are omitted from JSON when empty.
| Task | Command |
|------|---------|
| Build | dotnet build |
| Test | dotnet test |
| Pack | dotnet pack src/SourceAnnotations.Tasks |
development
# SampleLibrary > A minimal library that demonstrates SourceAnnotations embedding. ## API - `Greeter.Greet(string name)` — Returns a greeting string. ## Files - `README.md` — Project overview (role: documentation) - `SKILL.md` — This file (role: llm-context)
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------