一键导入
dependency-fallback-removal
How to safely remove implicit constructor fallbacks for injected dependencies
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
How to safely remove implicit constructor fallbacks for injected dependencies
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Investigate .NET CI failures using the hlx CLI tool via bash. USE FOR: checking Helix job status, searching build logs, downloading test results, AzDO build timeline analysis — when MCP tools aren't loaded, when the MCP server isn't configured or fails to start, or when scripting with JSON output and jq. DO NOT USE FOR: tasks where Helix/AzDO MCP tools are already available in context (prefer ci-analysis skill when MCP server is loaded). INVOKES: bash (hlx CLI commands with --json output).
{what this skill teaches agents}
Audit pattern for comparing WorkItemSummary (list API) fields against WorkItemDetails (per-item API) after a Helix.Client SDK bump
Domain-layer normalizer + JSON-stable cache key pattern for filter types with server-side defaults and case-insensitive fields.
Strict unknown-parameter rejection for MCP tools: Stage A (UnmappedMemberHandling.Disallow) + Stage B (did-you-mean CallToolFilter).
Audit MCP/CLI tool parameter surface against underlying REST API capabilities to find silently-dropped params.
| name | dependency-fallback-removal |
| description | How to safely remove implicit constructor fallbacks for injected dependencies |
| domain | testing |
| confidence | low |
| source | earned |
Use this when a service currently creates a default dependency internally (for example new HttpClient()) and you want to require explicit injection instead. The risk is not the constructor change itself; it is missing a call site or missing coverage around the new null contract.
public MyService(IMyApi api, HttpClient httpClient)
{
_api = api ?? throw new ArgumentNullException(nameof(api));
_httpClient = httpClient ?? throw new ArgumentNullException(nameof(httpClient));
}
Validation steps:
rg "new MyService\\(" srcArgumentNullException for the injected dependency