context-engineering

context-engineering is a skill for Claude Code, Codex from peterblazejewicz/claude-plugins. It costs 80 tokens per session (3,757 once invoked), scanned A, original, MIT.

A method for preparing the information an AI coding agent needs when working on a .NET or C# project. It organizes project rules, design documents, relevant source code, and test results so the agent can use the right context at the right time.

In plain words
What is it for?
Use it when starting a coding session, changing between parts of a project such as an Avalonia app and an ASP.NET Core API, or improving agent instructions and project settings.
Why use it?
Agents can produce incorrect code when they lack project conventions or are given too much unrelated information. Clear, focused context helps them follow the codebase's patterns and avoid guessing.

Skill for Claude CodeCodex

Part of the dotnet-skills plugin — 24 skills, 9 commands, 4 agents shipped together

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 skills/peterblazejewicz/claude-plugins/context-engineering
Any agent
npx skills add peterblazejewicz/claude-plugins --skill context-engineering
Clone the repo
git clone --depth 1 https://github.com/peterblazejewicz/claude-plugins

Made for: Claude Code, Codex.

Or install dotnet-skills, the plugin that ships this one along with the rest of its 24 skills, 9 commands, 4 agents.

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 context-engineering

README.md
[![agentmods](https://agentmods.dev/badge/skills/peterblazejewicz/claude-plugins/context-engineering.svg)](https://agentmods.dev/skills/peterblazejewicz/claude-plugins/context-engineering)
Your own site
<a href="https://agentmods.dev/skills/peterblazejewicz/claude-plugins/context-engineering"><img src="https://agentmods.dev/badge/skills/peterblazejewicz/claude-plugins/context-engineering.svg" alt="Measured on agentmods" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,757 The whole file, excluding the scripts and references it only reads on demand.
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.00080 $0.03757
Opus 5 $0.00040 $0.01878
Sonnet 5 $0.00016 $0.00751
Haiku 4.5 $0.00008 $0.00376

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

Security

Grade A, and why

context-engineering 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 4d 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.

plugins/dotnet-skills/skills/context-engineering/SKILL.md · 342 lines

How it starts

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

Context Engineering

Overview

Feed agents the right information at the right time. Context is the single biggest lever for agent output quality — too little and the agent hallucinates, too much and it loses focus. Context engineering is the practice of deliberately curating what the agent sees, when it sees it, and how it's structured.

When to Use

  • Starting a new coding session
  • Agent output quality is declining (wrong patterns, hallucinated APIs, ignoring conventions)
  • Switching between different parts of a codebase (Avalonia host vs ASP.NET Core API vs shared Core)
  • Setting up a new project for AI-assisted development
  • The agent is not following project conventions

The Context Hierarchy

Structure context from most persistent to most transient:

┌─────────────────────────────────────┐
│  1. Rules Files (CLAUDE.md, etc.)   │ ← Always loaded, project-wide
├─────────────────────────────────────┤
│  2. Spec / Architecture Docs        │ ← Loaded per feature/session
├─────────────────────────────────────┤
│  3. Relevant Source Files            │ ← Loaded per task
├─────────────────────────────────────┤
│  4. Error Output / Test Results      │ ← Loaded per iteration
├─────────────────────────────────────┤
│  5. Conversation History             │ ← Accumulates, compacts
└─────────────────────────────────────┘

Level 1: Rules Files

Create a rules file that persists across sessions. This is the highest-leverage context you can provide.

CLAUDE.md (for Claude Code) — example for a .NET/Avalonia project:

# Project: [Name]

## Tech Stack
- .NET 8 (LTS), C# 12
- Avalonia 11 for desktop UI (CommunityToolkit.Mvvm for view models)
- ASP.NET Core 8 for the HTTP API
- EF Core 8 against PostgreSQL (Npgsql); SQLite for integration tests
- xUnit v3 + native `Xunit.Assert` for unit tests; WebApplicationFactory for integration tests
- `<TreatWarningsAsErrors>true</TreatWarningsAsErrors>`, `<Nullable>enable</Nullable>`

## Solution layout
- src/MyApp               → Avalonia host, composition root
- src/MyApp.Core          → Domain types, use cases, pure logic (no framework references)
- src/MyApp.Infrastructure → EF Core DbContext, external integrations
- src/MyApp.Contracts     → DTOs shared by server + clients
- tests/MyApp.Core.Tests
- tests/MyApp.Infrastructure.Tests

## Commands
- Restore:  `dotnet restore`
- Build:    `dotnet build -warnaserror`
- Test:     `dotnet test --collect:"XPlat Code Coverage"`
- Format:   `dotnet format --verify-no-changes`
- Run host: `dotnet run --project src/MyApp`
- Migrate:  `dotnet ef migrations add <Name> -p src/MyApp.Infrastructure -s src/MyApp`

## Code Conventions
- Nullable reference types on (`<Nullable>enable</Nullable>`); public APIs have honest nullability
- `_camelCase` for private fields; `PascalCase` for properties and methods
- Prefer `record` / `record struct` for value-typed data with value equality
- Expression-bodied methods only when the body is one short line
- File-scoped namespaces; one top-level type per file
- `async` methods always accept `CancellationToken` on I/O paths; no sync-over-async (`.Result`, `.Wait()`)
- `using` directives sorted alphabetically with `System.*` first

## Boundaries
- Never commit secrets; use `dotnet user-secrets` for dev and Key Vault / env for prod
- Never add a NuGet package without updating `Directory.Packages.props`
- Ask before modifying EF Core migrations or `DbContext` shape
- Ask before adding project references (we intentionally avoid `Core → Infrastructure`)
- Always run `dotnet test` and `dotnet build -warnaserror` before committing

## Patterns
[Paste one short, well-written view model or service from the codebase — e.g. a CommunityToolkit.Mvvm partial class with observable properties and a RelayCommand, or an ASP.NET Core Minimal API endpoint with ProblemDetails error handling]

Read the full file on GitHub · 342 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. 4d ago First seen · 342 lines · 80 tokens per session scan A c670783b462c

Subscribe to this mod's changes

context-engineering is a skill published in the GitHub repository peterblazejewicz/claude-plugins (7 stars, last pushed 2mo ago), licensed MIT. It adds 80 tokens to every session and 3,757 once invoked, about $0.0004 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-31.

Related

Other skills, from other repositories

agents-sdk-dotnet-activityhandler-migration

Use when migrating a Microsoft 365 Agents SDK agent that uses ActivityHandler or TeamsActivityHandler to AgentApplication. This is ONLY for DotNet projects that uses Microsoft.Agents. packages. Triggered by Agents SDK bots that subclass ActivityHandler or TeamsActivityHandler that need to be modernized to…

microsoft/Agents · 76 tokens

agents-sdk-dotnet

Use when any code imports Microsoft.Agents.Hosting.AspNetCore, Microsoft.Agents.Builder, or related Agents SDK packages, or when the user is building, configuring, or asking questions about a Microsoft 365 Agents SDK agent in C# / .NET. Trigger on questions about appsettings.json, connection configuration…

microsoft/Agents · 112 tokens

agents-sdk-dotnet-otel

Use when adding, configuring, validating, or troubleshooting OpenTelemetry observability for a Microsoft 365 Agents SDK application in C# / .NET. Trigger when the user mentions OpenTelemetry, OTel, telemetry, traces, metrics, logs, OTLP, Aspire Dashboard, Application Insights, Azure Monitor, distributed tracing…

microsoft/Agents · 86 tokens

bf-to-agents-sdk-dotnet-migration

Use when migrating a Bot Framework .NET SDK bot to Microsoft 365 Agents SDK. Triggered by projects that depend on packages: Microsoft.Bot.Builder or Microsoft.Bot.Builder.Integration.AspNet.Core that want to migrate to Agents SDK.

microsoft/Agents · 56 tokens

agents-sdk-dotnet-debugging

Use when troubleshooting an agent built with the Microsoft Agents SDK (Microsoft.Agents.Hosting.AspNetCore and related packages) in C# / .NET. Trigger on any of these symptoms: build or C# compile errors, crashes on startup, 401 or auth errors on incoming requests, the bot not responding to messages, appsettings.json…

microsoft/Agents · 136 tokens

ai-navigation

Use when implementing AI movement — NavigationAgent2D/3D, steering behaviors, behavior trees, and patrol patterns.

jame581/GodotPrompter · 26 tokens