skills/git-repo-digest/SKILL.md
Generate source-grounded repository digest markdown from deterministic local evidence bundles. Use when the user asks to create, refresh, or complete repo/package digests, family or project overview pages, .bot/digests output, digest workspace workflows, or result/Index.md plus result/{PackageName}.md files for any repository URL. The skill runs its bundled .NET file-based evidence generator over a git clone, separates authoritative XML evidence from Markdown prompts and reading aids, writes package digests first, then writes the overview from completed package digests, and enforces complete-read grounding and no-invention rules even when file output is capped.
npx skillsauth add codebeltnet/agentic git-repo-digestInstall 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.

Use this skill to turn a deterministic digest workspace into website-ready or docs-ready Markdown. The bundled scripts/digest.cs runner owns repository access, evidence gathering, package discovery, evidence packing, prompt generation, and generated instructions. The agent owns reading that evidence, writing the digest files, and validating that every claim is grounded.
manifest.json, instructions.md, prompts/*.prompt.md, or evidence/**/*.xml files disagree with this skill, follow the generated files unless they are internally inconsistent.result/*.md file must start with the YAML frontmatter contract from its generated prompt. Preserve generated static metadata such as package counts, library counts, target framework monikers, external links, family links, internal .md family URLs, and link glyphs unless raw evidence proves the hint wrong.result/Index.md, preserve the generated title hint exactly unless raw evidence proves the product metadata is wrong. The runner resolves that title from a literal root Directory.Build.props <Product> value, then from a literal <Product> on the most-referenced top-level packable .csproj; it fails generation when no product can be resolved instead of falling back to repo-id.PackageProjectUrl first, falls back to exact README.md / .nuget/<PackageName>/README.md documentation links that pass the documentation-host filter when package-specific URLs are not 200 OK, including emoji-prefixed Documentation headings and package-local "More documentation..." blocks before Related Packages, derives normal package API paths from .docfx/**/docfx.json metadata[].dest entries when they name the package, uses namespaces declared under src/<PackageName>/**/*.cs as additional DocFX page candidates, links packages with no DocFX API entry to the same docs root as result/Index.md, and fails before prose is written when no documentation URL returns 200 OK.--repo-url. The runner also requires --output-root; if the user omits it, resolve it deterministically to <active-workspace>/.bot/digests and pass that explicit value to the runner.--external-repo-url flag.repo-url; a second value is output-root only when it is not a URL; every URL after the first is an external-repo-url.output-root is known. Do not search for or reuse the latest existing {output-root}/{repo-id}/{run-id} merely because it exists.result/*.md files, copied website/docs pages, sibling .bot/digests runs, and any previously authored digest prose as contamination, not evidence. Do not read, summarize, adapt, compare against, or use them as style/source material unless the user explicitly asked to reuse, continue, inspect, validate, or repair that exact existing workspace.<active-workspace>/.bot/digests as the output root so the workspace becomes <active-workspace>/.bot/digests/{repo-id}/{run-id}. Do not ask for confirmation just to use this default.--output-root; the runner still appends {repo-id}/{run-id}.repo-id customizable. It is derived from the final repository URL path segment.run-id customizable. It is always generated in UTC as yyyyMMdd-HHmmssZ.result.instructions.md, the relevant manifest entry, and the complete-read contract. Subagents reduce context pressure; they do not reduce grounding requirements.prompts/overview.prompt.md and every completed package result file required by the manifest before writing. The generated evidence indexes and chunks are a safer way to finish reading large evidence files; they are not permission to skip sections.evidence/{PackageName}/ as source.xml, tests.xml, projects.xml, readmes.xml, and external-usage.xml. Markdown prompts are task instructions; indexes are navigation aids only.Contents column. They list stable packed-path labels such as Source Code, Test Coverage, NuGet Documentation, or Project Metadata when XML <file path="..."> entries are present.*.index.md file and then read every chunk listed in numeric order. If the chunk reads are also capped or incomplete, continue by ranges or stop and report the blocker instead of writing from a subset.api-summary.md and engineering-signals.md reading aids. Use them to focus attention on likely public types, abstractions, extension points, lifecycle contracts, validation guards, factories, callbacks, and package-boundary clues, but verify every claim against raw source, tests, and project evidence.## Basic usage when current source evidence validates the APIs.The skill bundles a .NET 10 file-based app:
scripts/digest.cs
Run it with dotnet run --file so it is not confused with a nearby project file:
dotnet run --file <skill-root>/scripts/digest.cs -- --repo-url <repo-url> --output-root <output-root>
Required inputs:
--repo-url Fully qualified git repository URL
--output-root Directory where the digest workspace will be written
Optional repeated input:
--external-repo-url Public repository URL to clone and search locally for curated consumer usage
Fixed conventions:
repo-id Derived from the final repository URL path segment, with .git removed
run-id Derived from current UTC time
result dir result
The runner requires the .NET 10 SDK or newer and git. It performs one shallow git clone for the repository under digest, optionally performs one shallow clone per provided external usage repository, discovers packages from the digest clone, and packs evidence with its bundled C# packer. The packer uses git ls-files for deterministic tracked-file membership, applies the runner's evidence classifiers, skips generated or low-signal paths, keeps text files only, and writes stable XML evidence files under evidence/{PackageName}/.
The runner also supports deterministic result validation for authored workspaces:
dotnet run --file <skill-root>/scripts/digest.cs -- --validate-results --workspace <workspace>
Use this as a deterministic gate after authoring result files. It reports unsupported package-owned API member access in C# examples, low-signal Basic usage patterns, non-Codebelt-style xUnit snippets, non-PascalCase MethodName_Scenario_ExpectedBehavior test-method names, and Basic usage snippets that do not compile and pass as temporary Codebelt.Extensions.Xunit tests. For executable validation, the runner creates temp test projects with direct package references for the page's NuGet package plus xUnit test packages and Codebelt.Extensions.Xunit, then runs dotnet test with bounded parallelism. The agent must revise from source evidence and rerun until validation passes.
Any result-file edit after a validation pass invalidates that pass. Rerun --validate-results after the final write to result/*.md, including after small copy edits, regenerated Basic usage snippets, or manual repairs.
Packing notes:
--repo-url..csproj or nearest ancestor Directory.Build.props / Directory.Build.targets; selected C# files can come from source or test projects, but must contain a strong current-package marker such as the package id or namespace before public-symbol matches affect ranking.GlobalSuppressions.cs from packed evidence. Do not recreate or infer digest claims from those files.src/, owned tests live under test/, and owned test projects are named after the package plus .Tests for libraries or .FunctionalTests for apps. It does not scan generic tests/ roots or broader suffix variants such as .UnitTests or .IntegrationTests. Within the fixed test/ root, it prefers a dedicated owned test project, then a single unambiguous direct project reference. If only downstream package tests match a shared base package prefix, the runner leaves Test path undiscovered instead of assigning another package's tests.Test, such as framework abstractions named WebHostTest. Test evidence is limited to files under the discovered owned test/ path..NET 10 or git is unavailable, stop and report the missing dependency.The digest root is chosen by the caller when an output path is supplied. When the user does not supply an output path, the deterministic default staging root is:
<active-workspace>/.bot/digests
When that default root is used, the generated workspace is:
<active-workspace>/.bot/digests/{repo-id}/{yyyyMMdd-HHmmssZ}
If the user supplies an output path, use that value as the root while keeping the same generated child shape:
{output-root}/{repo-id}/{yyyyMMdd-HHmmssZ}
Generated shape:
{output-root}/{repo-id}/
manifest.json
instructions.md
prompts/
{PackageName}.prompt.md
overview.prompt.md
evidence/
{PackageName}/
source.xml
tests.xml
projects.xml
readmes.xml
external-usage.xml
api-summary.md
engineering-signals.md
source.index.md
source.chunks/
0001.xml
result/
Index.md
{PackageName}.md
The manifest is authoritative after generation. Always follow the manifest for concrete package names, prompt paths, evidence paths, evidence index paths, evidence chunk paths, result paths, and phase order.
Manifest targets also include frontmatterHints, which are generated metadata values for the YAML frontmatter required in each result file. For the overview target, frontmatterHints.title is repository-owned product metadata, not a URL-derived repository id. Documentation entries in frontmatterHints.links are validated URLs only; the runner does not emit repository #readme documentation fallbacks.
Collect or infer these runner inputs:
repo-url: required. Ask for it if the user gives only a slug or a repository nickname.output-root: pass this explicitly to the runner. If the user did not provide an output path, use <active-workspace>/.bot/digests.external-repo-url: optional and repeatable. Use only public repository URLs the user supplied as curated usage sources.Apply this positional mapping to slash commands, pasted bare values, and natural-language invocations alike:
<digest-repo-url> <optional-output-folder> <optional-external-url> <optional-external-url>
Map them as follows:
repo-url.output-root only when it is not a URL.external-repo-url values.external-repo-url and use <active-workspace>/.bot/digests as output-root.external-repo-url because the repository name or domain seems unrelated. Pass the user-supplied URL to the runner and let deterministic external usage selection decide whether it contributes evidence.Examples:
https://github.com/example/library https://github.com/example/consumer maps to --repo-url https://github.com/example/library --output-root <active-workspace>/.bot/digests --external-repo-url https://github.com/example/consumer unless the user supplies an explicit output path./git-repo-digest https://github.com/example/library .bot/digests https://github.com/example/consumer maps to --repo-url https://github.com/example/library --output-root .bot/digests --external-repo-url https://github.com/example/consumer.generate a digest for https://github.com/example/library using https://github.com/example/consumer as evidence uses the same mapping: first URL is the digest repo, second URL is external usage evidence.digest both https://github.com/example/library and https://github.com/example/other-library separately is different because the user explicitly requested independent digests; handle that as separate digest runs.Do not ask for repo-id, run-id, or result directory.
Choose the workspace mode from the user's input, not from folders you happen to discover:
{output-root}/{repo-id} already contains prior run folders; the runner appends a new UTC {run-id}.result/*.md files, website copies, docs copies, sibling run folders, or other digest prose before writing. The only digest-writing inputs are the newly generated workspace's manifest.json, instructions.md, prompts, evidence files, evidence indexes, evidence chunks, and any result files produced earlier in the same new workspace phase order.{output-root}/{repo-id} or {output-root}/{repo-id}/{run-id}, or asks to reuse, continue, inspect, validate, or repair existing output.{output-root}/{repo-id} as an existing-workspace path and does not name a run-id, inspect the folder and ask before choosing among prior run folders unless the user asked for the latest run.For a fresh run, execute the bundled runner from this skill:
dotnet run --file <skill-root>/scripts/digest.cs -- --repo-url <repo-url> --output-root <output-root> [--external-repo-url <external-url>]...
The runner writes deterministic evidence files, prompt files, and the result folder. It does not call an LLM and does not overwrite existing result/*.md files.
Read only these root files first:
manifest.json
instructions.md
From manifest.json, identify:
frontmatterHints valuesIf there is no manifest, infer the package list only from prompts/*.prompt.md and evidence/*/ folders and stop to tell the user the manifest is missing. Continue only if the user explicitly accepts the degraded workflow.
For each package in the first phase:
instructions.md if needed.result/{PackageName}.md or the manifest's declared equivalent.title, description, and lede with grounded package-specific prose.## Basic usage, prefer representative external usage when it exists, validates against current source evidence, and gives a clearer consumer scenario than owned tests.Do not use another package's evidence to fill gaps unless the current prompt explicitly includes it or the manifest marks that relationship as required.
When editing an existing package result:
## Basic usage, select from the section heading through the complete section body. Do not start the replacement inside the section or inside a fenced code block.--validate-results after the final result-file edit. A previous validation pass is stale after any result-file change.If the agent runtime can delegate work, use subagents to keep each package evidence set isolated and roomy:
instructions.md, write or draft only its assigned result/{PackageName}.md, and report any unreadable or contradictory evidence.result/Index.md until all required package result files exist.result/Index.md itself from those completed digests plus prompts/overview.prompt.md and supplementary project/readme evidence as needed.Subagent summaries and caveats are useful handoff material for the orchestrator, but they are not a replacement for the completed package result files required by the overview phase.
Write result/Index.md only after package digests exist.
Open and completely read prompts/overview.prompt.md and every completed package result file listed by the manifest or by the generated required package-digest source section. Treat the completed package result files as the required package-digest source for result/Index.md; treat project/readme evidence as supplementary repository evidence for relationships, project metadata, README framing, and package inventory. Reading only project/readme evidence is not sufficient when package result files exist.
If package digests were produced by subagents, collect their reported caveats and validation notes before drafting the overview. Use those notes to avoid overclaiming, but ground the overview in the completed package result files, prompts/overview.prompt.md, and supplementary project/readme evidence as needed.
The overview should help readers understand the repository's concepts before they open package-specific pages. It should not behave like a package inventory, repeat package-page summaries, or amplify unsupported claims.
Write result/Index.md as a conceptual overview:
title because it comes from repository-owned <Product> metadata, and replacing editorial placeholders for description and lede with grounded repository-level prose.links, with the index NuGet link queryable and package-page NuGet links package-exact. Keep generated repository, releases, issues, documentation, NuGet, and familyLinks entries when they are present in frontmatterHints.## Overview, ## Concepts, and ## Usage guidance.## Concepts with a short introductory paragraph before the first concept heading.## Overview, ## Key APIs, ## Basic usage, and ## Usage guidance sections, then connect package responsibilities and APIs across layers where the evidence supports it.[Package.Name](Package.Name.md).For usage guidance, separate evidence from inference:
If any package digest is missing, decide from the manifest:
Run the deterministic result validator and require a pass before reporting completion:
dotnet run --file <skill-root>/scripts/digest.cs -- --validate-results --workspace <workspace>
This validator catches C# Basic usage member accesses on package-owned receiver types that do not exist in source evidence, non-Codebelt-style xUnit snippets, test methods not named with the exact PascalCase MethodName_Scenario_ExpectedBehavior convention, malformed Basic usage sections, low-signal Basic usage examples, and snippets that fail an executable Codebelt.Extensions.Xunit harness. It intentionally does not guess replacement APIs. If it reports an error, revise the example from source evidence and rerun validation until it passes.
The executable validation path is optimized for large digest workspaces: it writes direct package references into each temporary test project, runs examples with bounded parallelism, and honors GIT_REPO_DIGEST_VALIDATE_PARALLELISM when a host needs to lower or raise concurrency. Do not replace this with manual dotnet add package loops.
Treat validation as a final-state check, not a milestone from earlier in the session. If any result/*.md file changes after --validate-results passes, rerun validation before reporting completion.
Use a tight repair loop when validation fails:
rg searches as triage only. A search hit is not automatically a defect; decide from context and source evidence, for example HttpStatusCode.OK is not the same as a toy literal response body.--validate-results. Do not treat unrelated preflight search hits as reasons to rewrite passing examples.Before finishing, verify:
result/Index.md exists when the manifest includes an overview entry.title, description, lede, pageKind, packageCount, libraryCount, targetFrameworks, targetFrameworkMonikers, license, links, and familyLinks; package pages also include packageId.links array contains NuGet entries: package pages point to exact package URLs, while result/Index.md uses the generated queryable NuGet URL.familyLinks array appears on both result/Index.md and package pages, links to every package page with relative PackageName.md URLs, and keeps package-context glyphs unless evidence supports a better glyph..nuget/{PackageName}/README.md Related Packages sections when available; otherwise keep the generated package-name heuristic glyph.result/Index.md has an introductory paragraph after ## Concepts and before the first concept subsection.result/Index.md uses concept headings instead of package-named subsections.result/Index.md concepts synthesize completed package ## Overview, ## Key APIs, ## Basic usage, and ## Usage guidance sections instead of ignoring package-level APIs or scenarios.result/Index.md connects related packages in concept prose where package responsibilities, dependencies, or APIs show a relationship.result/Index.md does not contain a package-selection table unless a future generated prompt explicitly asks for one.result/Index.md are inline relative Markdown links such as [Package.Name](Package.Name.md).using Codebelt.Extensions.Xunit; and using Xunit;, uses a file-scoped consumer namespace such as namespace MyProject.Tests;, omits using Xunit.Abstractions;, declares a public test class inheriting from Test or a source-backed Codebelt test base class that the evidence shows derives from Test, defines a constructor that accepts ITestOutputHelper output and passes that output helper to the base constructor, names the single [Fact] or [Theory] method with exactly three PascalCase parts in the MethodName_Scenario_ExpectedBehavior shape such as ResolveOptions_MissingName_ThrowsOptionsException, and uses TestOutput.Write, TestOutput.WriteLine, or TestOutput.WriteLines for concise human-friendly scenario output.Codebelt.Extensions.Xunit, runs dotnet test with bounded parallelism, and treats any compile or test failure as blocking.## Basic usage section, headings inside fenced code blocks do not count as Markdown section boundaries, and every Basic usage section contains at least one complete fenced C# code block.--validate-results until the workspace passes.## Basic usage contains exactly one C# fenced code block unless the generated prompt explicitly allows more.using statements, a file-scoped consumer namespace, a public test class inheriting from Test or a source-backed Codebelt test base class that the evidence shows derives from Test, a constructor with ITestOutputHelper output passed to the base constructor, useful TestOutput.Write, TestOutput.WriteLine, or TestOutput.WriteLines output, and exactly one [Fact] or [Theory] method named with exactly three PascalCase parts in the MethodName_Scenario_ExpectedBehavior shape unless the generated prompt explicitly allows more.## Basic usage contains one C# fenced code block per referenced code package.### Codebelt.Extensions.Xunit.[Fact] or [Theory] method named with the PascalCase MethodName_Scenario_ExpectedBehavior convention.using statements, prefers explicit imports, uses a file-scoped consumer namespace, and includes at least one assertion or observable result plus human-friendly TestOutput context.Greeting, MessageService, Hello World, OK, Foo, Bar, Sample, or Dummy unless the evidence proves those terms are real and central.## Basic usage, make an internal receiver/member pass over every C# code block. If foo.Bar appears, identify what foo is, what static type it has, and where Bar is declared. If the declaration cannot be found in source evidence or a known framework type, revise the example.app.Run(...) or app.Use(...) over UseMiddleware<T> unless T exists in the package evidence or is defined in the snippet.Use targeted searches instead of rereading everything:
rg -n "TODO|TBD|confidence|citation|analysis notes|I cannot|as an AI|\\.\\.\\.|placeholder" <workspace>/result
rg -n "Write a source-grounded|Write a short lede" <workspace>/result
rg -n "Greeting|MessageService|Hello World|Hello, World|Hello from DI|\\bOK\\b|GenerateReport|CreateService|BuildHost|FormatInvoice|CreateClient|SampleMiddleware|MyService|IMyService|MyRepository|FakeRepository|MyController|SampleController|\\bFoo\\b|\\bBar\\b|\\bDummy\\b" <workspace>/result
rg -n "base\\.OnDispose|dispose managed resources here|test-data\\.bin|File\\.Open|Environment\\.GetEnvironmentVariable|localhost|127\\.0\\.0\\.1" <workspace>/result
rg -n "UseMiddleware<|file class|file record|file struct" <workspace>/result
Explain any remaining risk, especially missing tests, ambiguous APIs, oversized context, or packages whose purpose is unclear from source.
Index.md instead of relying on their path list inside prompts/overview.prompt.md.*.index.md file plus every ordered file under *.chunks/. If chunks are unavailable in an older workspace, split the full evidence read into ranges or sections and continue until the entire file has been inspected. Track where you left off so no section is skipped.*.index.md as a table of contents, not as source evidence. It can tell you which chunks and packed files exist, but digest claims must come from the full evidence file or the complete ordered chunk set.The digest workspace is staging output. A consuming website or docs system may map staged files into its own content tree. For the current Codebelt website, the conventional mapping is:
src/Codebelt.Website.WebApp/Content/Markdown/{repo-id}/Index.md
src/Codebelt.Website.WebApp/Content/Markdown/{repo-id}/{PackageName}.md
Do not copy staged results there unless the user asks for website sync, publication, or integration.
.md URLs and package-context glyphs, and grounded title, description, and lede text.## Concepts section that explains repository concepts, boundaries, and relationships without becoming a package inventory.## Concepts section opens with a short paragraph before concept subsections.## Key APIs, Basic usage scenarios, and Usage guidance at a conceptual level and connect related packages where the evidence supports a relationship.Test inheritance directly or through a source-backed derived Codebelt test base class, output helper wiring, one focused [Fact] or [Theory], useful TestOutput context, and an observable assertion/result.## Key APIs entries read as short prose paragraphs that start with the API name in code formatting instead of definition-list entries such as `Type` - description.scripts/digest.cs runner.--external-repo-url flags..bot/digests runs, result/*.md, website content, docs content, or other folders during fresh generation.codebeltnet or a fixed repository host such as GitHub.*.index.md as a summary that can replace reading the full evidence file or every chunk.Index.md before package digests exist.Index.md after reading only project/readme evidence and not the completed package result files.Index.md as a package-selection table or package inventory when the generated prompt asks for concepts.## Key APIs entries as definition-list bullets such as `Type` - description or using colons and dashes as hard separators when natural prose is possible.## Concepts immediately with a third-level heading and no introductory paragraph.## Key APIs details.Index.md.Hello World / OK literals when source or usage evidence supports a more meaningful engineering scenario.[Fact] or [Theory] methods.nugetUrl, changing exact package NuGet links into search links, changing the index NuGet search link into a single package link, omitting familyLinks, or stripping .md from familyLinks.url.testing
Generate GitHub release notes by summarizing all commits and pull requests between two Git tags, branches, or the current branch and the upstream default branch. Use when the user asks to write release notes, generate release notes, draft a GitHub release, create release notes from tags, summarize changes between versions, summarize the current branch, or provides a GitHub compare URL. Trigger phrases: "release notes", "generate release notes", "what changed between", "summarize changes from v1 to v2", "GitHub release", "summarize this branch", compare URLs like "github.com/owner/repo/compare/v1...v2". When no explicit input is given, detects the current branch and compares against the upstream default branch automatically.
development
Classifies .NET library or NuGet package changes and recommends the correct release bump: Major, Minor, or Patch. Applies both Semantic Versioning (MAJOR.MINOR.PATCH) and .NET assembly/file versioning (Major.Minor.Build.Revision), grounded in Microsoft’s official .NET library compatibility rules. Use when evaluating the current branch, breaking changes, API diffs, public API changes, dependency updates, TFM/platform support, interface or enum changes, overloads, analyzers, source generators, or binary/source/behavioral/design-time/backwards compatibility. When no explicit change details or compare range are provided, inspects the current Git branch and compares it against the upstream default branch automatically. Always returns structured compatibility reasoning with the recommendation.
testing
Turn many commits into a curated grouped squash summary compatible with the opinionated wording style of git-visual-commits. Use when the user asks to squash a branch into a concise summary, write a squash-and-merge summary, summarize this branch, summarize a commit range or PR as grouped lines, clean up noisy commit history, or asks for a curated summary without committing. For normal squash-and-merge requests, default to the full current feature branch from merge-base to HEAD against the base branch instead of a same-named tracking remote, include commits from all authors unless the user explicitly narrows by author, and do not ask for yolo because the skill is read-only. Returns grouped lines only, preserves identifiers, merges overlap, drops noise, and avoids changelog wording.
tools
Scaffold a new .NET NuGet library solution following codebelt engineering conventions. Use this skill when the user wants to create a new NuGet library, class library, or reusable .NET package. Also use when the user mentions "new library", "new NuGet package", "scaffold library", "class library solution", "dotnet new classlib", or wants a .NET library project with multi-target frameworks, strong-name signing, NuGet packaging, DocFX documentation, CI/CD pipeline, and code quality tooling. ALWAYS use this skill when asked to scaffold or create a new .NET library solution.