mirror of
https://github.com/dotnet/skills.git
synced 2026-09-20 09:49:54 +08:00
4975793af0
* Add csharp-development skill and update CODEOWNERS and README.md - Introduced a new skill for C# development guidance. - Updated CODEOWNERS to include reviewers for the new skill. - Modified README.md to list the new csharp-development skill. - Added evaluation scenarios for the csharp-development skill. * Refactor C# evaluation scenarios to enhance production code review and validation guidance * Refactor production code review scenarios to improve clarity and focus on async error handling * Update CODEOWNERS to reflect current ownership and streamline reviewer assignments * Remove csharp-development skill documentation and evaluation tests * Remove csharp-development skill from README * Fix formatting in Constants.g.cs by adding missing semicolon * Revert Constants.g.cs to main * Remove csharp-development skill from CODEOWNERS * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Update CODEOWNERS to include additional reviewers for dotnet-ai skills * Move dotnet skills to dotnet-util to keep dotnet plugin focused and targeted. * Add CODEOWNERS, SKILL.md, package-types.md, and publish-workflow.md for NuGet trusted publishing; implement eval.yaml for dotnet-pinvoke and dotnet-util skills * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Update README files to enhance plugin descriptions and remove outdated LSP section * Rename repository title from 'dotnet' to 'dotnet-util' in README.md for clarity. * Refine README.md to clarify included .NET skills and remove redundant descriptions * Add 'dotnet-util' plugin for utility skills in .NET development * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Add 'dotnet-util' plugin for utility skills in .NET development * Add dotnet-util to Codex marketplace manifest * Align dotnet-util marketplace descriptions * Refactor CODEOWNERS and update README for nuget-trusted-publishing; add evaluation scenarios and workflow template for trusted publishing * Add P/Invoke diagnostics and type mapping references; implement NuGet trusted publishing setup - Created diagnostics.md for common pitfalls and failure modes in P/Invoke. - Added type-mapping.md for native-to-.NET type mappings. - Introduced nuget-trusted-publishing skill for setting up OIDC-based NuGet publishing. - Added package-types.md detailing structural requirements for various NuGet package types. - Created publish-workflow.md as a template for GitHub Actions workflows for NuGet publishing. * Add evaluation YAML files for csharp-scripts, dotnet-pinvoke, and nuget-trusted-publishing skills * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Complete nuget-trusted-publishing move: remove from dotnet, add to dotnet-specialized README * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Remove eval.vally.yaml and eval.yaml files for nuget-trusted-publishing skill * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Add NuGet trusted publishing skill and related references - Introduced `nuget-trusted-publishing` skill for setting up OIDC-based trusted publishing on GitHub Actions. - Added detailed documentation in SKILL.md covering prerequisites, process, safety rules, and troubleshooting. - Created `package-types.md` to outline structural requirements for various NuGet package types. - Developed `publish-workflow.md` as a template for GitHub Actions workflows for NuGet publishing. - Removed obsolete `dotnet-specialized` plugin and updated `dotnet` plugin description. - Added evaluation tests for `nuget-trusted-publishing` skill to ensure proper guidance for users. - Implemented evaluation tests for `dotnet-pinvoke` and `csharp-scripts` skills to validate functionality. * Update dotnet plugin description to include high-level .NET development skills * Add NuGet trusted publishing and P/Invoke documentation - Introduced type mapping reference for native-to-.NET types in dotnet-pinvoke. - Added a comprehensive guide for setting up NuGet trusted publishing using OIDC in GitHub Actions. - Created a reference document detailing structural requirements for various NuGet package types. - Provided a template for GitHub Actions workflow for publishing NuGet packages with trusted publishing. - Implemented evaluation scenarios for testing the dotnet-pinvoke and nuget-trusted-publishing skills, including prompts and assertions for expected outputs. * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Add CODEOWNERS entries for setup-local-sdk * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Update dotnet README to list setup-local-sdk skill * Add setup-local-sdk to skills section in README * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
71 lines
2.4 KiB
YAML
71 lines
2.4 KiB
YAML
name: dotnet-pinvoke
|
|
description: Evaluates the dotnet/dotnet-pinvoke skill
|
|
type: capability
|
|
config:
|
|
timeout: 1m
|
|
stimuli:
|
|
- name: Generate LibraryImport declaration from C header (.NET 8+)
|
|
prompt: |
|
|
I have the following C header for a cross-platform library targeting .NET 8:
|
|
|
|
```c
|
|
int32_t compress_buffer(const uint8_t* input, size_t input_len,
|
|
uint8_t* output, size_t output_len,
|
|
size_t* bytes_written);
|
|
```
|
|
|
|
Write a C# class named NativeCompression that exposes a P/Invoke
|
|
to call this function from a shared library called "compresslib".
|
|
graders:
|
|
- type: output-matches
|
|
config:
|
|
pattern: LibraryImport
|
|
- type: output-matches
|
|
config:
|
|
pattern: compresslib
|
|
- type: output-matches
|
|
config:
|
|
pattern: nuint
|
|
- type: output-matches
|
|
config:
|
|
pattern: static partial
|
|
- type: prompt
|
|
- type: pairwise
|
|
rubric:
|
|
- Uses LibraryImport instead of DllImport since the target is .NET 8
|
|
- Maps size_t to nuint, not ulong
|
|
- The method signature is declared as static partial
|
|
- Parameter types correctly map from the C header to .NET types
|
|
- name: Generate LibraryImport declaration from C header (.NET Framework)
|
|
prompt: |
|
|
I have the following C header for a Windows library targeting .NET Framework (x86):
|
|
|
|
```c
|
|
int32_t compress_buffer(const uint8_t* input, size_t input_len,
|
|
uint8_t* output, size_t output_len,
|
|
size_t* bytes_written);
|
|
```
|
|
|
|
Write a C# class named NativeCompression that exposes a P/Invoke
|
|
to call this function from a shared library called "compresslib".
|
|
graders:
|
|
- type: output-matches
|
|
config:
|
|
pattern: DllImport
|
|
- type: output-matches
|
|
config:
|
|
pattern: compresslib
|
|
- type: output-matches
|
|
config:
|
|
pattern: UIntPtr
|
|
- type: output-matches
|
|
config:
|
|
pattern: static extern
|
|
- type: prompt
|
|
- type: pairwise
|
|
rubric:
|
|
- Uses DllImport instead of LibraryImport since the target is .NET Framework
|
|
- Maps size_t to UIntPtr, not ulong (nuint is not available on .NET Framework)
|
|
- The method signature is declared as static extern
|
|
- Parameter types correctly map from the C header to .NET types
|