Install
$ agentstack add skill-benknightdark-neo-skills-neo-dotnet-tag-helper ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
.NET Tag Helper Expert Skill
Trigger On
- The user requests to create, generate, or design a custom Razor Tag Helper in C#.
- The user wants to encapsulate complex HTML/UI logic into reusable custom tags without using Partial Views or CSHTML.
- The target framework is .NET 6.0 (LTS) and above.
Workflow (Generator Pattern)
Follow these steps exactly to create robust, high-performance C# Tag Helpers.
Step 1: Perceive & Gather Requirements (Inversion)
Before writing any code, ask the user to clarify the following if not already provided:
- Target HTML Tag: What is the name of the custom tag in HTML? (e.g., `
,`) - Properties: What parameters/attributes should this tag accept? (e.g.,
theme,is-active,user-id) - Dependencies (DI): Does this tag need to query a database or call a service? (Needs Dependency Injection)
- Context: Does it need to access
ViewContext(e.g., to generate URLs or check model state)?
Step 2: Reason & Design (Planning)
Based on the answers:
- Class Naming: Ensure the class name ends with
TagHelper(e.g.,MyButtonTagHelper). - Target Element: Apply
[HtmlTargetElement("my-button")]. - Properties: Map HTML kebab-case attributes to C# PascalCase properties. Apply
[HtmlAttributeName("is-active")]if necessary. - Method Selection:
- If no IO/Async operations, override
Process. - If using DI for database/API calls, override
ProcessAsync.
Step 3: Act (Code Generation)
Generate the complete C# class. Strictly adhere to the following rules:
- Inherit from
Microsoft.AspNetCore.Razor.TagHelpers.TagHelper. - Do NOT generate
.cshtmlfiles. All HTML must be constructed usingTagBuilderinside the C# class. - If
ViewContextis needed, use[ViewContext]and[HtmlAttributeNotBound]. - Manage content properly using
output.TagName,output.Attributes.SetAttribute, andoutput.Content.SetHtmlContent. - Ensure Thread-Safety (do not store request-specific state in instance fields unless injected as scoped/transient).
Step 4: Validate (Quality Check)
Review the generated code against these criteria before presenting it:
- Are all properties strongly typed?
- Is
TagBuilderused instead of string concatenation for HTML elements? - Is
ProcessAsyncused correctly if awaiting tasks?
Deliverable
Present the C# code wrapped in a markdown code block. Briefly explain how to register it in _ViewImports.cshtml (e.g., @addTagHelper *, YourAssemblyName).
Documentation
Official References
Internal References
- [Tag Helper Coding Style & Advanced Patterns](reference/coding-style.md)
- [Tag Helper Coding Conventions](reference/patterns.md)
- [Tag Helper Anti-Patterns](reference/anti-patterns.md)
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Benknightdark
- Source: Benknightdark/neo-skills
- License: MIT
- Homepage: https://neo-blog-iota.vercel.app/
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.