helix.mcp: Skill for Claude Code

.copilot/skills/ihttpclientfactory-di/SKILL.md

ihttpclientfactory-di is a skill for Claude Code, Codex from lewing/helix.mcp. It costs 0 tokens per session (368 once invoked), scanned A, original, MIT.

A coding pattern for using .NET’s IHttpClientFactory, which manages reusable HTTP connections, while keeping an HTTP client parameter optional for tests.

In plain words
What is it for?
Use it when replacing static or manually created HttpClient instances with dependency injection and IHttpClientFactory in a .NET service.
Why use it?
It avoids connection-lifecycle problems from static or repeatedly created HttpClient objects without breaking tests that construct the service directly.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

This is lewing/helix.mcp's own configuration. It tells Claude Code and Codex how to work on helix.mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything helix.mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to lewing/helix.mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/lewing/helix.mcp/main/.copilot/skills/ihttpclientfactory-di/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/lewing/helix.mcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ihttpclientfactory-di

README.md
[![agentmods](https://agentmods.dev/badge/skills/lewing/helix.mcp/ihttpclientfactory-di.svg)](https://agentmods.dev/skills/lewing/helix.mcp/ihttpclientfactory-di)
Your own site
<a href="https://agentmods.dev/skills/lewing/helix.mcp/ihttpclientfactory-di"><img src="https://agentmods.dev/badge/skills/lewing/helix.mcp/ihttpclientfactory-di.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 368 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00368
Opus 5 $0.00000 $0.00184
Sonnet 5 $0.00000 $0.00074
Haiku 4.5 $0.00000 $0.00037

Measured 6d ago against content hash ecda72958264, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

ihttpclientfactory-di scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.copilot/skills/ihttpclientfactory-di/SKILL.md · 53 lines

What it actually says

Skill: IHttpClientFactory with Optional Constructor Injection

Confidence: low Source: earned

Problem

You need to replace static or new HttpClient() patterns with IHttpClientFactory for proper handler lifecycle management, but the service is constructed by tests that don't use DI.

Wrong Pattern

// Static field — socket exhaustion, no DNS refresh
private static readonly HttpClient s_httpClient = new();

// Or: required parameter breaks all test constructors
public MyService(IHelixApiClient api, HttpClient httpClient) { ... }

Right Pattern

// Optional parameter — production injects from factory, tests get default
public MyService(IHelixApiClient api, HttpClient? httpClient = null)
{
    _api = api ?? throw new ArgumentNullException(nameof(api));
    _httpClient = httpClient ?? new HttpClient();
}

DI registration:

services.AddHttpClient("MyDownload", c => c.Timeout = TimeSpan.FromMinutes(5));
services.AddSingleton<MyService>(sp =>
    new MyService(
        sp.GetRequiredService<IMyApiClient>(),
        sp.GetRequiredService<IHttpClientFactory>().CreateClient("MyDownload")));

Why

  • IHttpClientFactory manages HttpMessageHandler lifetime (recycles every 2 min by default)
  • Avoids socket exhaustion from long-lived static HttpClient
  • Named clients allow per-use-case timeout configuration
  • Optional parameter preserves backward compatibility with tests
  • Tests that don't exercise HTTP can pass one arg; tests that do can inject a mock handler

Applies When

  • Replacing static HttpClient fields in services
  • Service is heavily tested with direct construction (not DI)
  • Multiple HTTP use cases need different timeouts
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 53 lines · 0 tokens per session scan A ecda72958264

Subscribe to this mod's changes

ihttpclientfactory-di is a skill published in the GitHub repository lewing/helix.mcp (4 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 368 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

codegen

Use for .NET code generation work with Roslyn, Microsoft.OpenApi, Razor templates, DTO/manager/controller generation, REST API generation, C# HttpClient generation, Angular/Axios TypeScript request clients, generated formatting, and deterministic output.

AterDev/Perigon.CLI · 53 tokens

worker-services

Build long-running .NET background services with BackgroundService, Generic Host, graceful shutdown, configuration, logging, and deployment patterns suited to workers and daemons. USE FOR: background services; scheduled workers; hosted services; worker extraction; graceful shutdown, health checks, and service hosting…

managedcode/dotnet-skills · 109 tokens

aspnet-core

Build, debug, modernize, or review ASP.NET Core applications with correct hosting, middleware, security, configuration, logging, and deployment patterns on current .NET. USE FOR: working on ASP.NET Core apps, services, or middleware; changing auth, routing, configuration, hosting, or deployment behavior; deciding…

managedcode/dotnet-skills · 122 tokens

minimal-apis

Design and implement Minimal APIs in ASP.NET Core using handler-first endpoints, route groups, filters, and lightweight composition suited to modern .NET services. USE FOR: building new HTTP APIs in ASP.NET Core; creating lightweight microservices; choosing between Minimal APIs and controllers. DO NOT USE FOR…

managedcode/dotnet-skills · 105 tokens

web-api

Build or maintain controller-based ASP.NET Core APIs when the project needs controller conventions, advanced model binding, validation extensions, OData, JsonPatch, or existing API patterns. USE FOR: working on controller-based APIs in ASP.NET Core; needing controller-specific extensibility or conventions; migrating…

managedcode/dotnet-skills · 115 tokens

managedcode-communication

Use ManagedCode.Communication when a .NET application needs explicit result objects, structured errors, and predictable service or API boundaries instead of exception-driven control flow. USE FOR: integrating ManagedCode.Communication into services or APIs; replacing exception-driven result handling with explicit…

managedcode/dotnet-skills · 114 tokens