update-library-template
Skill213 starsChanged 8 months agoMITView on GitHub
Merges the latest Library.Template into this repo (at position of HEAD) and resolves conflicts.
9 other projects use a version of this, 9 of them edited.
Adopted by
Most recently taken up by
- microsoft/vs-servicehubedited, first seen Jul 15, 2026
- microsoft/vs-mefedited, first seen Jul 13, 2026
- microsoft/vs-streamjsonrpcedited, first seen Jul 13, 2026
- microsoft/vs-threadingedited, first seen Jul 13, 2026
- microsoft/vs-validationedited, first seen Jul 13, 2026
- microsoft/VSSDK-Analyzersedited, first seen Jul 13, 2026
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 9
- microsoft/vs-threading★ 1k99% same
- microsoft/vs-streamjsonrpc★ 93999% same
- microsoft/vs-mef★ 46699% same
- microsoft/slow-cheetah★ 35499% same
- microsoft/vs-validation★ 14399% same
- microsoft/json-document-transforms★ 11799% same
- microsoft/VSSDK-Analyzers★ 5699% same
- microsoft/vs-servicehub★ 3299% same
- microsoft/vssdktestfx★ 2399% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repositoryOne other file it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. 7 are common, 3 are distinctive, and 8 are very specific to this project.
7
Common
Most of the 9 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Run ./tools/MergeFrom-Template.ps1 from the repo root.
- Common: line 17
Always refer to that file before proceeding.
- Common: line 22
When resolving merge conflicts, consider whether it looks like the relevant code file is older than it should be given the changes the …
- Common: line 23
Ask the user when in doubt as to whether the conflict should be resolved in favor of 'catching up' with the template or keeping the current …
- Common: line 25
Use #runSubagent to analyze and resolve merge conflicts across files in parallel.
- Distinctive: line 44
When the template deletes a file that exists locally, check the template's commit history to understand *why* it was removed.
- Very specific: line 45
Use the GitHub commit history page for the file (e.g.
- Distinctive: line 46
If the template restructured or centralized the functionality (e.g.
- Distinctive: line 47
If the file contains repo-specific customizations not present in the template, keep it.
- Very specific: line 55
After the merge, always check global.json for MSBuild Sdks with names starting with Microsoft.VisualStudio.Internal.MicroBuild.
- Very specific: line 57
Always take the latest of the versions you see among these SDKs and the MicroBuildVersion property.
- Common: line 62
Use #runSubagent for each step.
- Very specific: line 64
Verify that dotnet restore succeeds.
- Very specific: line 65
Verify that dotnet build succeeds.
- Very specific: line 66
Verify that tests succeed by running tools/dotnet-test-cloud.ps1.
- Common: line 72
If validation fails for reasons that seem unrelated to the changes brought in by the merge, advise the user and ask how they'd like you to …
- Common: line 78
If you have to make any changes for validations to pass, consider whether they qualify as a bad merge conflict resolution or more of a …
- Very specific: line 81
Always author your commits using git commit --author "🤖 Copilot <no-reply@github.com>" (and possibly other parameters).
“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Instructions
- Run
./tools/MergeFrom-Template.ps1from the repo root. - Resolve merge conflicts, taking into account conflict resolution policy below.
- Validate the changes, as described in the validation section below.
- Committing your changes (if applicable).
Conflict resolution policy
There may be special notes that describe special considerations for certain files or scenarios to help you resolve conflicts appropriately.
Always refer to that file before proceeding.
In particular, focus on the incoming part of the file, since it represents the changes from the Library.Template that you are merging into your repo.
Also refer to .github/prompts/repo-merge-notes.md for notes specific to this repo (e.g. which deleted files to keep, which customizations to preserve).
Also consider that some repos choose to reject certain Library.Template patterns.
For example the template uses MTPv2 for test projects, but a repo might have chosen not to adopt that.
When resolving merge conflicts, consider whether it looks like the relevant code file is older than it should be given the changes the template is bringing in.
Ask the user when in doubt as to whether the conflict should be resolved in favor of 'catching up' with the template or keeping the current changes.
Use #runSubagent to analyze and resolve merge conflicts across files in parallel.
Keep Current files
Conflicts in the following files should always be resolved by keeping the current version (i.e. discard incoming changes):
- README.md
Deleted files
Very typically, when the incoming change is to a file that was deleted locally, the correct resolution is to re-delete the file.
In some cases however, the deleted file may have incoming changes that should be applied to other files.
The test/Library.Tests/Library.Tests.csproj file is very typical of this.
Changes to this file should very typically be applied to any and all test projects in the repo.
You are responsible for doing this in addition to re-deleting this template file.
Files deleted by the template
When the template deletes a file that exists locally, check the template's commit history to understand why it was removed.
Use the GitHub commit history page for the file (e.g. https://github.com/aarnott/Library.Template/commits/microbuild/path/to/file) to find the relevant commit.
If the template restructured or centralized the functionality (e.g. OptProf pipelines moved to a centralized VS pipeline), accept the deletion.
If the file contains repo-specific customizations not present in the template, keep it.
Files deleted locally but updated by the template
These show as "deleted by us" conflicts. Refer to repo-merge-notes.md for this repo's specific decisions on which files to keep or re-delete.
Updating package and SDK versions
After the merge, always check global.json for MSBuild Sdks with names starting with Microsoft.VisualStudio.Internal.MicroBuild.
These SDK versions should match the value of the MicroBuildVersion property found in Directory.Packages.props.
Always take the latest of the versions you see among these SDKs and the MicroBuildVersion property.
Validation
Validate the merge result (after resolving any conflicts, if applicable). Use #runSubagent for each step.
- Verify that
dotnet restoresucceeds. Fix any issues that come up. - Verify that
dotnet buildsucceeds. - Verify that tests succeed by running
tools/dotnet-test-cloud.ps1.
While these validations are described using dotnet CLI commands, some repos require using full msbuild.exe.
You can detect this by checking the azure-pipelines/dotnet.yml or .github/workflows/build.yml files for use of one or the other tool.
You are not responsible for fixing issues that the merge did not cause. If validation fails for reasons that seem unrelated to the changes brought in by the merge, advise the user and ask how they'd like you to proceed. That said, sometimes merges will bring in SDK or dependency updates that can cause breaks in seemingly unrelated areas. In such cases, you should investigate and solve the issues as needed.
Committing your changes
If you have to make any changes for validations to pass, consider whether they qualify as a bad merge conflict resolution or more of a novel change that you're making to work with the Library.Template update. Merge conflict resolution fixes ideally get amended into the merge commit, while novel changes would go into a novel commit after the merge commit.
Always author your commits using git commit --author "🤖 Copilot <no-reply@github.com>" (and possibly other parameters).
Describe the nature of the merge conflicts you encountered and how you resolved them in your commit message.
Later, if asked to review pull request validation breaks, always author a fresh commit with each fix that you push, unless the user directs you to do otherwise.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

