Add nuget-trusted-publishing skill - #34
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a comprehensive knowledge-driven skill for setting up NuGet trusted publishing (OIDC) on GitHub Actions repositories, replacing long-lived API keys with secure short-lived tokens. The skill provides a structured 5-phase process: discovery, structure validation, local testing, nuget.org policy setup, and workflow configuration.
Changes:
- Adds
nuget-trusted-publishingskill with complete OIDC setup guidance - Provides detailed package type detection logic and structural requirements for libraries, dotnet tools, MCP servers, and template packages
- Includes a production-ready GitHub Actions workflow template with tag-triggered publishing
- Registers the new skill in the marketplace plugin configuration
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
skills/nuget-trusted-publishing/SKILL.md |
Main orchestrating skill (200 lines) defining the 5-phase trusted publishing setup process with safety rules and common blockers |
skills/nuget-trusted-publishing/references/package-types.md |
Comprehensive reference for detecting and validating NuGet package types with minimal .csproj examples and gotchas |
skills/nuget-trusted-publishing/references/publish-workflow.md |
Complete tag-triggered GitHub Actions workflow template with customization guidance and optional GitHub Release integration |
.github/plugin/marketplace.json |
Registers the new skill in the core-skills plugin collection |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c28e28f to
87f5659
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jeffschwMSFT
left a comment
There was a problem hiding this comment.
@lewing can you share the evaluator output? I added a peer from nuget to take a look as well
Knowledge-driven skill for setting up NuGet trusted publishing (OIDC) on GitHub Actions repos. Guides users through a 5-phase process: discovery, structure validation, local testing, nuget.org policy setup, and workflow creation/modification. Supports library, dotnet tool, MCP server, and template package types with per-type structural requirements and a complete tag-triggered workflow template. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Merge 5 phases into 4 (Discovery + Structure Validation → Assess) - Fix nuget.org URL to correct https://www.nuget.org/account/trustedpublishing - Add contents: read to migration YAML snippet (prevents checkout failures) - Add MCP server version-sync check (.csproj ↔ server.json) - Clarify environment name is convention not requirement - Restore policy owner (user vs org) guidance - Add multi-project repo note - Fix .yml/.yaml extension guidance - Add Version to dotnet tool required properties in package-types.md - Compact troubleshooting table Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Move nuget-trusted-publishing from skills/ to src/dotnet/skills/ - Add eval.yaml with two scenarios: greenfield setup and API key migration - Skills are auto-discovered via plugin.json, no marketplace.json change needed Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ment The skill's phased process was too heavyweight for simple greenfield setups — the agent would spend turns on assessment and never create the workflow. Added fast-path guidance to combine phases for single-project repos, and strengthened Phase 2/4 to ensure key content (NuGet/login, id-token, local pack verification) always appears in the first response. Eval results improved from 2.2/5 (regression) to 4.2/5 (improvement). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
87f5659 to
33458a2
Compare
Evaluator OutputRun 1 (before fix — commit 87f5659)
Run 2 (after fix — commit 33458a2)
Model: claude-opus-4.6 | Judge: claude-opus-4.6 The greenfield scenario was regressing (-0.8) because the skill's multi-phase process caused the agent to spend turns on assessment without ever creating the workflow. Added a fast-path for simple repos that combines phases into a single response, bringing it to +1.2. Both scenarios now pass. |
Eval Results (Run 4 — Exe classification fix + shell-agnostic INVOKES)
Model: claude-opus-4.6 | Judge: claude-opus-4.6 Changes in this run:
Previous eval runsRun 3 — After Copilot review feedback (INVOKES + ToolCommandName)
Run 2 — After greenfield fix + no-keyword scenario added
Run 1 — Initial (greenfield regressed)
|
…word Tests that the skill activates when the user asks about secure keyless NuGet publishing without explicitly mentioning trusted publishing or OIDC. Scores +2.6 improvement over baseline. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Change INVOKES from 'powershell' to 'bash' (workflow runs on ubuntu) - Mark ToolCommandName as optional (defaults to assembly name), matching package-types.md reference Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Exe projects with IsPackable=true can be published as NuGet packages (application packages), not just tools - Changed INVOKES from 'bash' to 'shell (powershell or bash)' for cross-platform compatibility Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@jeffschwMSFT next steps? |
code review from the area owner (nuget?) |
|
@kartheekp-ms can you review or point me to someone who can? |
|
For reference, I've set up trusted publishing multiple times recently, including using this skill to do it. |
|
|
||
| 2. Guide the user to create the trusted publishing policy: | ||
| > Go to [**nuget.org/account/trustedpublishing**](https://www.nuget.org/account/trustedpublishing) → **Add policy** | ||
| > |
There was a problem hiding this comment.
Please add package owner and policy name
There was a problem hiding this comment.
I can do this but the form requires these and owner is filled by default. The text here is to suggest the specific values that augment the form not replace it
|
|
||
| 2. Guide the user to create the trusted publishing policy: | ||
| > Go to [**nuget.org/account/trustedpublishing**](https://www.nuget.org/account/trustedpublishing) → **Add policy** | ||
| > |
There was a problem hiding this comment.
I can do this but the form requires these and owner is filled by default. The text here is to suggest the specific values that augment the form not replace it
Knowledge-driven skill for setting up NuGet trusted publishing (OIDC) on GitHub Actions repos, replacing long-lived API keys with short-lived tokens. Replaces #34 which could not be reopened after history rewrite.
* Add nuget-trusted-publishing skill Knowledge-driven skill for setting up NuGet trusted publishing (OIDC) on GitHub Actions repos, replacing long-lived API keys with short-lived tokens. Replaces #34 which could not be reopened after history rewrite. * Address review: move to plugins/tests layout, fix phase sequencing, add CODEOWNERS - Move skill from src/dotnet/skills/ to plugins/dotnet/skills/nuget-trusted-publishing/ - Move eval from src/dotnet/tests/ to tests/dotnet/nuget-trusted-publishing/ - Fix Phase 3/4 sequencing conflict: clarify that drafting the workflow is OK before policy confirmation, but publishing/removing secrets should wait - Add CODEOWNERS entry for nuget-trusted-publishing Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…noted xUnit, fixed MSTest example
Add nuget-trusted-publishing skill
Knowledge-driven skill for setting up NuGet trusted publishing (OIDC) on GitHub Actions repos -- replacing long-lived API keys with short-lived tokens.
5-Phase Process
Files
SKILL.md-- orchestrating skill (~1900 tokens)references/package-types.md-- per-type structural requirements and detection logicreferences/publish-workflow.md-- complete tag-triggered workflow templateValidated against