Patterns and techniques for evaluating and improving AI agent outputs.
中文简介正在准备中。当前显示原文说明。
Authors Roslyn analyzers. DiagnosticAnalyzer, CodeFixProvider, CodeRefactoring, multi-version.
中文简介正在准备中。当前显示原文说明。
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Comprehensive Roslyn analyzer integration for dotnet-agent-harness providing real-time code analysis through agent hooks and enforced quality gates via git hooks.
# Skip all analyzer checks (default: false, analyzers run by default)
export DOTNET_AGENT_HARNESS_SKIP_ANALYZERS=true
# Configure timeout (default: 60 seconds)
export DOTNET_AGENT_HARNESS_ANALYZER_TIMEOUT=120
# Minimum severity to report (Error/Warning/Info)
export DOTNET_AGENT_HARNESS_ANALYZER_SEVERITY=Warning
# Execution mode (sync/async)
export DOTNET_AGENT_HARNESS_ANALYZER_MODE=async
[*.cs]
# Enable all analyzers
dotnet_analyzer_diagnostic.severity = warning
# Category-based configuration
dotnet_analyzer_diagnostic.category-security.severity = error
dotnet_analyzer_diagnostic.category-performance.severity = warning
# Specific rule overrides
dotnet_diagnostic.CA2007.severity = suggestion # ConfigureAwait
dotnet_diagnostic.CA1816.severity = error # GC.SuppressFinalize
| Analyzer Code | Skill | Description |
|---|---|---|
| CA2007 | dotnet-csharp-async-patterns | Do not directly await a Task |
| CA2008 | dotnet-csharp-async-patterns | TaskScheduler required |
| CA1816 | dotnet-gc-memory | GC.SuppressFinalize |
| CA2000 | dotnet-gc-memory | Dispose objects before losing scope |
| CA1822 | dotnet-performance-patterns | Mark members as static |
| CA1860 | dotnet-performance-patterns | Avoid Enumerable.Any() |
| CA2100 | dotnet-security-owasp | SQL injection prevention |
| CA5350 | dotnet-security-owasp | Weak cryptographic algorithms |
| CA1001 | dotnet-architecture-patterns | IDisposable pattern |
| CA1063 | dotnet-architecture-patterns | Implement IDisposable correctly |
Full mappings in .rulesync/analyzer-to-skill.json
# Run setup script
bash .githooks/setup.sh
# Copy hooks to .git/hooks/
cp .githooks/pre-commit .git/hooks/
cp .githooks/pre-push .git/hooks/
chmod +x .git/hooks/pre-commit .git/hooks/pre-push
# Skip analyzer checks for this commit
DOTNET_AGENT_HARNESS_SKIP_ANALYZERS=true git commit -m "message"
# Bypass all hooks (not recommended)
git commit --no-verify -m "message"
| Configuration | Build Time Impact | When to Use |
|---|---|---|
| NetAnalyzers only | +15% | Development (default) |
| + Roslynator | +98% | Development with refactoring |
| + StyleCop | +49% | Style enforcement |
| Full Suite (CI) | +522% | CI/CD pipelines only |
Increase timeout:
export DOTNET_AGENT_HARNESS_ANALYZER_TIMEOUT=120
For large solutions, disable heavy analyzers:
<PropertyGroup>
<RunSonarAnalyzer>false</RunSonarAnalyzer>
</PropertyGroup>
Disable specific rules in .editorconfig:
dotnet_diagnostic.CA1707.severity = none
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Patterns and techniques for evaluating and improving AI agent outputs.
中文简介正在准备中。当前显示原文说明。
Comprehensive AI prompt engineering safety review and improvement prompt. Analyzes prompts for safety, bias, security vulnerabilities, and effectiveness while providing detailed improvement recommendations.
中文简介正在准备中。当前显示原文说明。
Use when user requests research requiring multiple sources, comprehensive analysis, or synthesis across topics - technical research, domain knowledge gathering, market analysis, or learning about complex subjects
中文简介正在准备中。当前显示原文说明。
AI-powered wiki generation for code repositories with commands, agents, and skills
中文简介正在准备中。当前显示原文说明。
Use when building .NET 10 or C# 14 applications; when using minimal APIs, modular monolith patterns, or feature folders; when implementing HTTP resilience, Options pattern, Channels, or validation; when seeing outdated patterns like old extension method syntax
中文简介正在准备中。当前显示原文说明。
Implements accessible .NET UI. SemanticProperties, ARIA, AutomationPeer, testing per platform.
中文简介正在准备中。当前显示原文说明。