Neo csharp interface generator
Skill Benknightdark/neo-skills/skills/neo-csharp-interface-generator
Neo Skills 是專為現代 AI Agent 設計的全方位能力擴充套件。本專案透過標準化的通訊架構,為 AI 代理安裝可插拔的「技能模組 (Skills)」,使其不僅僅是一個聊天機器人,而是能轉化為具備「感知-推理-行動」能力的多領域專家。
npx -y skills add Benknightdark/neo-skills --skill neo-csharp-interface-generatorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 7 stars7 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
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.
SKILL.md
2.5 KB, as published. Nobody here has run it
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.
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).