CompaniesHouse.NET AGENTS.md

CompaniesHouse.NET AGENTS.md is an instructions file for Codex, OpenCode from kevbite/CompaniesHouse.NET. It costs 1,930 tokens per session, scanned A, original, MIT.

Repository instructions for CompaniesHouse.NET, a .NET client library for the Companies House Public Data API. They describe its new major-version rewrite, NuGet packages, project layout, and development rules.

In plain words
What is it for?
Use them when changing the CompaniesHouse.NET codebase, especially when selecting and implementing work from its plans.
Why use it?
They give an agent the project context and prevent it from bypassing the planned work or settled design decisions.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/kevbite/companieshouse.net/agents-md
Clone the repo
git clone --depth 1 https://github.com/kevbite/CompaniesHouse.NET

Made for: Codex, OpenCode.

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 CompaniesHouse.NET AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/kevbite/companieshouse.net/agents-md.svg)](https://agentmods.dev/instructions/kevbite/companieshouse.net/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/kevbite/companieshouse.net/agents-md"><img src="https://agentmods.dev/badge/instructions/kevbite/companieshouse.net/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,930 This file is loaded in full into every session.
When invoked 1,930 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.01930 $0.01930
Opus 5 $0.00965 $0.00965
Sonnet 5 $0.00386 $0.00386
Haiku 4.5 $0.00193 $0.00193

Measured 5d ago against content hash c1a283a0dbb5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

CompaniesHouse.NET AGENTS.md 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 5d 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.

AGENTS.md · 159 lines

How it starts

The opening of the file, as written. The whole thing — 159 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

Guidance for AI agents (and humans) working in this repository. Read this before making changes, then read the relevant plan in .plans/outstanding/.

What this project is

CompaniesHouse.NET is a .NET client SDK for the Companies House Public Data API. It is published as two NuGet packages:

  • CompaniesHouse — the core client (CompaniesHouseClient) and all request/response models.
  • CompaniesHouse.Extensions.Microsoft.DependencyInjection — DI helpers for registering the client with IServiceCollection.

Current state: a v-next rewrite

We are building a new major version on the prerelease branch. Breaking changes are expected and welcome. The old surface lives on master and can be referenced for behaviour, but we are rebuilding the client endpoint-by-endpoint from the official API documentation rather than porting the old code verbatim.

The single source of truth for the work is .plans/. Do not freelance a large redesign — pick up an outstanding plan, refine it if needed, and execute it.

Non-negotiable design decisions

These are settled for the new major version. Do not reverse them without updating the relevant plan and calling it out explicitly.

  1. Multi-target net8.0;net9.0;net10.0. No netstandard, no net45. Drop the Microsoft.NETFramework.ReferenceAssemblies and Microsoft.Net.Http references.
  2. System.Text.Json only. Remove every reference to Newtonsoft.Json (see issue #188). No new dependency on Json.NET in any project, including tests.
  3. No plain C# enums on the wire. Every API "enum" is modelled as a string-backed readonly record struct that preserves the raw value and never throws on an unrecognised value. See .plans/outstanding/03-string-backed-value-types.md and the design blog post: https://kevsoft.net/2026/06/28/enums-in-api-contracts.html.
  4. Enum values are generated, not hand-written. A Roslyn source generator produces the string-backed types from the Companies House api-enumerations YAML (pulled in as a git submodule) plus our own local "extra" lists. We ship a new package version to pick up new values — we do not hand-edit generated types. See plans 04 and 05.
  5. CompaniesHouseClient stays the entry point. Every capability hangs off it as its own focused sub-client (e.g. search, company profile, officers), each behind its own interface, exactly as today.
  6. DI uses IOptions<>. The DI package uses AddOptions, IConfiguration binding and validation, with overloads to configure the client several ways. See .plans/outstanding/02-di-extensions-ioptions.md.
  7. nullable reference types enabled across all projects.
  8. Test stack: xUnit + Shouldly. No NUnit, no FluentAssertions (license changed to a paid tier from v8). Use [Fact]/[Theory]/[MemberData] and IAsyncLifetime for async setup/teardown; assert with Shouldly's .ShouldBe(...) family. For deep object-graph comparisons against test fixtures that hold raw wire strings, use the repo's own EquivalencyAssertionExtensions.ShouldBeEquivalentTo(...) helper in CompaniesHouse.Tests (bridges enum <-> wire string, no FluentAssertions IEquivalencyStep needed).

Read the full file on GitHub · 159 lines

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. 5d ago First seen · 159 lines · 1,930 tokens per session scan A c1a283a0dbb5

Subscribe to this mod's changes

CompaniesHouse.NET AGENTS.md is an instructions file published in the GitHub repository kevbite/CompaniesHouse.NET (40 stars, last pushed 4d ago), licensed MIT. It adds 1,930 tokens to every session, about $0.0097 per session on Opus 5. 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-30.