neo-csharp-interface-generator

Solid

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.

AI & Automation 7 stars 2 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 81/100

Stars 20%
30
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# 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. ## 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, interf...

Details

Author
Benknightdark
Repository
Benknightdark/neo-skills
Created
6 months ago
Last Updated
yesterday
Language
JavaScript
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category