Razor Pages
ASP.NET Core Razor Pages patterns for server-rendered web apps.
Skill by ngxtm
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ngxtm-razor-pages
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/razor-pages
What's inside
- Skill name
Razor Pages- Description
- ASP.NET Core Razor Pages patterns for server-rendered web apps.
- License
- MIT
- Instructions
- 116 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- name: only lowercase letters, digits and single hyphens allowed
- name: "Razor Pages" does not match folder "razor-pages"
Files (2)
- SKILL.md
- REFERENCE.md · references/
SKILL.md (first lines)
# Razor Pages
## **Priority: P1 (OPERATIONAL)**
ASP.NET Core Razor Pages patterns for server-rendered web applications.
## Implementation Guidelines
- **PageModel**: Keep logic in PageModel, not in `.cshtml`. Use handlers (`OnGet`, `OnPost`).
- **Model Binding**: Use `[BindProperty]` for form data. `[FromQuery]` for query params.
- **Tag Helpers**: Use `asp-for`, `asp-action`, `asp-route-*` for type-safe HTML.
- **Partial Views**: Reusable UI components with `<partial>` tag helper.
- **View Components**: Complex reusable UI with server logic.
- **Layout**: Shared layout in `_Layout.cshtml`. Use sections for page-specific content.
- **TempData**: Flash messages with PRG (Post-Redirect-Get) pattern.
## Anti-Patterns
- **No logic in `.cshtml`**: Move to PageModel or View Components.
- **No `ViewBag`/`ViewData`**: Use strongly-typed models.
- **No inline CSS/JS**: Use external files with bundling.
- **No form without anti-forgery**: Always include `@Html.AntiForgeryToken()` or use `asp-antiforgery`.
## Code
```csharp
// Pages/Users/Create.cshtml.cs
public class CreateModel(IUserService userService, ILogger<CreateModel> logger) : PageModel
{
[BindProperty]
public CreateUserInput Input { get; set; } = new();
public List<SelectListItem> Roles { get; set; } = [];
public async Task OnGetAsync()
{
Roles = await GetRolesAsync();
}
public async Task<IActionResult> OnPostAsync()
{
if (!ModelState.IsValid)
{
Roles = await GetRolesAsync();
return Page();
}
var result = await userService.CreateAsync(Input);
if (!result.IsSuccess)
{
ModelState.AddModelError(string.Empty, result.Error!);
Roles = await GetRolesAsync();
return Page();
}
TempData["Success"] = "User created successfully";
return RedirectToPage("./Index");
}
}
```
```html
@* Pages/Users/Create.cshtml *@
@page
@model CreateModel
<h2>Create User</h2>
@if (TempData["Error"] is string error)
{
<div class="alert alert-danger">@error</div>
}
<form method="post">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="mb-3">
<label asp-for="Input.Name" class="form-label"></label>
<input asp-for="Input.Name" class="form-control" />
<span asp-validation-for="Input.Name" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="Input.Email" class="form-label"></label>
<input asp-for="Input.Email" class="form-control" type="email" />
<span asp-validation-for="Input.Email" class="text-danger"></span>
</div>
<div class="mb-3">
<label asp-for="Input.RoleId" class="form-label"></label>
<select asp-for="Input.RoleId" asp-items="Model.Roles" class="form-select">
<option value="">Select a role</option>
</select>
<span asp-validation-for="Input.RoleId" class="text-danger"></span>
</div>
<button type="submit" class="btn btn-primary">Create</button>
<a asp-page="./Index" class="btn btn-secondary">Cancel</a>
</form>
@section Scripts {
<partial name="_ValidationScriptsPartial" />
}
```
## Reference & Examples
For page conventions, view components, and AJAX patterns:
See [references/REFERENCE.md](references/REFERENCE.md).
## Related Topics
aspnet-core | blazor | securityFrom ngxtm/devkit, MIT.
More from ngxtm/devkit
- 0.463score
Flutter BLoC State Management
ngxtm
Standards for predictable state management using flutter_bloc, freezed, and equatable.
SkillDFreshness: D★ 8Claude Code +9 - 0.463score
Flutter GetX Navigation
ngxtm
Context-less navigation, named routes, and middleware using GetX.
SkillDFreshness: D★ 8Claude Code +9 - 0.463score
.NET Security
ngxtm
Security standards for .NET applications based on OWASP guidelines.
SkillDFreshness: D★ 8Claude Code +9 - 0.463score
C# Language Patterns
ngxtm
Modern C# standards for type safety, performance, and maintainability.
SkillDFreshness: D★ 8Claude Code +9 - 0.463score
Flutter Feature-Based Clean Architecture
ngxtm
Standards for organizing code by feature at the root level to improve scalability and maintainability.
SkillDFreshness: D★ 8Claude Code +9 - 0.463score
Flutter Dependency Injection (Injectable)
ngxtm
Standards for automated service locator setup using injectable and get_it.
SkillDFreshness: D★ 8Claude Code +9 - 0.463score
Flutter CI/CD
ngxtm
Continuous Integration and Deployment standards for Flutter apps.
SkillDFreshness: D★ 8Claude Code +9 - 0.460score
Blazor
ngxtm
Blazor component patterns for interactive web UIs.
SkillDFreshness: D★ 8Claude Code +9 - 0.460score
C# Best Practices
ngxtm
Idiomatic C# patterns for clean, maintainable code.
SkillDFreshness: D★ 8Claude Code +9 - 0.460score
Flutter GetX State Management
ngxtm
Simple and powerful reactive state management using GetX.
SkillDFreshness: D★ 8Claude Code +9 - 0.460score
ASP.NET Core Web API
ngxtm
Modern ASP.NET Core patterns for building RESTful APIs.
SkillDFreshness: D★ 8Claude Code +9 - 0.460score
.NET Tooling
ngxtm
Essential tooling for .NET development and CI/CD.
SkillDFreshness: D★ 8Claude Code +9
Signals
- Stars
- 8
- Forks
- 5
- Open issues
- 0
- Last commit (this folder)
- Feb 3, 2026 (8 months ago)
- Last release
- Feb 28, 2026 (8 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ngxtm/devkit
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ngxtm
- 0.463score
.NET Security
ngxtm
Security standards for .NET applications based on OWASP guidelines.
SkillDFreshness: D★ 8Claude Code +9 - 0.463score
Flutter CI/CD
ngxtm
Continuous Integration and Deployment standards for Flutter apps.
SkillDFreshness: D★ 8Claude Code +9 - 0.463score
Flutter GetX Navigation
ngxtm
Context-less navigation, named routes, and middleware using GetX.
SkillDFreshness: D★ 8Claude Code +9 - 0.463score
C# Language Patterns
ngxtm
Modern C# standards for type safety, performance, and maintainability.
SkillDFreshness: D★ 8Claude Code +9 - 0.463score
Flutter BLoC State Management
ngxtm
Standards for predictable state management using flutter_bloc, freezed, and equatable.
SkillDFreshness: D★ 8Claude Code +9 - 0.463score
Flutter Dependency Injection (Injectable)
ngxtm
Standards for automated service locator setup using injectable and get_it.
SkillDFreshness: D★ 8Claude Code +9
Cite this page
Razor Pages skill. Agent Mart. https://agentmart.dev/skills/ngxtm-razor-pages (last updated 2026-10-24)