Skip to content
Back to skills

Neo Csharp Interface Generator

ASecurity

Use this skill when the user asks to generate, update, or place a C# interface from an existing class. Trigger for extracting public members, filtering virtual or non-public members, enforcing getter-only properties, and safely creating, appending, or replacing interface blocks.

  • 7 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added May 26, 2026
developmentgoc#express

Security analysis

A100/100

Scanned November 12, 2026

npx -y skills add Benknightdark/neo-skills --skill neo-csharp-interface-generator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Neo Csharp Interface Generator?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Neo Csharp Interface Generator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/benknightdark-neo-csharp-interface-generator/badge)](https://www.skillsdirectory.com/skills/benknightdark-neo-csharp-interface-generator)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: neo-csharp-interface-generator
description: >
  Use this skill when the user asks to generate, update, or place a C# interface
  from an existing class. Trigger for extracting public members, filtering virtual
  or non-public members, enforcing getter-only properties, and safely creating,
  appending, or replacing interface blocks.
compatibility: "Supports C# 12 through 15 and .NET 10.0/11.0."
metadata:
  version: "1.1.0"
  category: "Core"
---

# C# Interface Generator Skill Specification

## Perceive
1. **Code Structure Recognition**: Parse C# Class content, identify properties, methods, and access modifiers.
2. **Constraint Check**:
   - Identify members with the `virtual` keyword.
   - Identify non-`public` members.
3. **Environment Awareness**: When the user specifies a target file, read the file content to check for the existence of an Interface with the same name.
4. **Language Constructs Check (C# 15)**: Verify whether the target type is a C# 15 `union` or a standard class/record. Union types represent closed type choices and usually do not require extracting traditional interfaces.

## Reason
1. **Interface Generation Logic**:
   - **Naming Convention**: The Interface name must be the Class name prefixed with `I`.
   - **Property Filtering**:
     - **Keep only** simple properties.
     - **Strictly prohibit** properties containing the `virtual` modifier.
     - **Getter Only**: All properties in the interface MUST only have a `get;` accessor. No `set;` or `init;` is allowed.
     - Include only `public` members.
   - **Formatting**: Ensure the generated Interface follows standard C# indentation and brace styles.
2. **Smart Overwrite Strategy**:
   - If the target file does not exist: Plan to create a new file with necessary namespaces.
   - If the target file exists but has no Interface with the same name: Plan to append the new Interface to the end of the file.
   - If the target file exists and already contains an Interface with the same name:
     - Use regular expressions or block matching to find the start and end positions of the Interface.
     - Plan to replace only that specific block, preserving other classes, interfaces, or using declarations in the file.

## Act
1. **Code Generation**: Output a C# Interface that complies with the Reason logic.
2. **User Confirmation**:
   - After generation, pause and ask the user: "In which file should this Interface be stored? (Please provide a relative path)".
3. **Execution Write**:
   - Based on the user's response, perform `read_file` (if the file exists) -> logical replacement -> `write_file`.
   - Inform the user of the result (created, appended, or overwritten).
4. **Output Language**: The final output to the user must be in **Traditional Chinese (Taiwan)**.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.