Install any skill in seconds. Free to start, no credit card required.
Get Started Free →dotnet/fetch-and-send-data
Call APIs, load data into components, and handle the async lifecycle in Blazor. USE FOR fetching data from a backend, submitting data to an API, displaying loading/error states, registering HttpClient, building service abstractions for Auto/WebAssembly render modes. DO NOT USE for form validation (see collect-user-input), prerendering persistence (see support-prerendering), or project scaffolding (see create-blazor-project).
Passed 19 of 22 test cases with the skill, and 15 of 22 without it.
and 5 more in the full report
4 fixed15 passed either way3 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 4 test cases the skill fixed. Same model, same prompt, with and without the skill.
In a Blazor Server component with interactive server rendering, navigating to the page triggers OnInitializedAsync twice during prerendering, causing duplicate database calls. What pattern should be used inside the component code to prevent re-querying the database during the interactive render phase?
| Checked | Without skill | With skill |
|---|---|---|
| The field or property storing fetched data uses the PersistentState attribute. | Missed | Passed |
| The data fetching assignment inside OnInitializedAsync uses the null-coalescing assignment operator ??=. | Missed | Passed |
The instructions your model reads when the skill loads.
Check Interactivity Mode and Scope:
| Mode | Data access |
|---|---|
| None (Static SSR) | Server-side: inject services/DbContext. Use [StreamRendering] for loading UX. |
| Server | Server-side: inject services/DbContext. Guard prerender with ??= + [PersistentState]. |
| WebAssembly | Browser-side: HttpClient only. No direct server access. |
| Auto | Both server and browser. Always go through an API. |
Only needed when calling external APIs from Server, or always for WebAssembly/Auto. Server components accessing their own database should inject DbContext or a service directly.
// Named client — requires Microsoft.Extensions.Http NuGet
builder.Services.AddHttpClient("CatalogAPI", client =>
{
client.BaseAddress = new Uri("https://api.example.com/");
});
// Typed client
builder.Services.AddHttpClient<CatalogClient>(client =>
client.BaseAddress = new Uri("https://api.example.com/"));
For WebAssembly/Auto with prerendering, register in both server and .Client Program.cs.
@page "/products"
@inject CatalogClient Catalog
@if (products is null)
test cases passed, vs 15 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.