neo-csharp-interface-generator
Skill7 starsChanged 6 months agoMITView on GitHub
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.
In this repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- generate-skillSkill
- neo-azure-pipelinesSkill
- neo-clarificationSkill
- neo-clean-architectureSkill
- neo-code-reviewSkill
- neo-csharpSkill
- neo-dotnet-ef-coreSkill
- neo-dotnet-minimal-apisSkill
- neo-dotnet-mvcSkill
- neo-dotnetSkill
- neo-dotnet-tag-helperSkill
- neo-dotnet-webapiSkill
- neo-harness-projectSkill
- neo-harnessSkill
- neo-javascriptSkill
- neo-opentelemetrySkill
- neo-prSkill
- neo-python-managerSkill
- neo-pythonSkill
- neo-rabbitmqSkill
- neo-rustSkill
- neo-stop-slopSkill
- neo-sub-agentSkill
- neo-swiftSkill
- neo-swift-uiSkill
- neo-typescriptSkill
- neo-vueSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Environment Awareness: When the user specifies a target file, read the file content to check for the existence of an Interface with the …
- Very specific: line 22
Language Constructs Check (C# 15): Verify whether the target type is a C# 15 union or a standard class/record.
- Very specific: line 30
Getter Only: All properties in the interface MUST only have a get.
- Distinctive: line 32
Formatting: Ensure the generated Interface follows standard C# indentation and brace styles.
- Distinctive: line 34
If the target file does not exist: Plan to create a new file with necessary namespaces.
- Distinctive: line 35
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.
- Distinctive: line 36
If the target file exists and already contains an Interface with the same name:
- Distinctive: line 37
Use regular expressions or block matching to find the start and end positions of the Interface.
- Distinctive: line 43
After generation, pause and ask the user: "In which file should this Interface be stored?
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
C# Interface Generator Skill Specification
Perceive
- Code Structure Recognition: Parse C# Class content, identify properties, methods, and access modifiers.
- Constraint Check:
- Identify members with the
virtualkeyword. - Identify non-
publicmembers.
- Identify members with the
- 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.
- Language Constructs Check (C# 15): Verify whether the target type is a C# 15
unionor a standard class/record. Union types represent closed type choices and usually do not require extracting traditional interfaces.
Reason
- 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
virtualmodifier. - Getter Only: All properties in the interface MUST only have a
get;accessor. Noset;orinit;is allowed. - Include only
publicmembers.
- Formatting: Ensure the generated Interface follows standard C# indentation and brace styles.
- Naming Convention: The Interface name must be the Class name prefixed with
- 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
- Code Generation: Output a C# Interface that complies with the Reason logic.
- User Confirmation:
- After generation, pause and ask the user: "In which file should this Interface be stored? (Please provide a relative path)".
- 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).
- Based on the user's response, perform
- Output Language: The final output to the user must be in Traditional Chinese (Taiwan).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

