MR
Mayur Rathi
@github
⭐ 34.1k GitHub stars

Oqtane

Oqtane是一款code方向的AI技能,核心价值是Oqtane Module patterns,可用于解决开发者在code领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。

Oqtane Module patterns

Last verified on: 2026-05-30
mkdir -p ./skills/oqtane && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/oqtane/SKILL.md -o ./skills/oqtane/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

Blazor Code Style and Structure


- Write idiomatic and efficient Blazor and C# code.

- Follow .NET and Blazor conventions.

- Use Razor Components appropriately for component-based UI development.

- Use Blazor Components appropriately for component-based UI development.

- Prefer inline functions for smaller components but separate complex logic into code-behind or service classes.

- Async/await should be used where applicable to ensure non-blocking UI operations.



Naming Conventions


- Follow PascalCase for component names, method names, and public members.

- Use camelCase for private fields and local variables.

- Prefix interface names with "I" (e.g., IUserService).


Blazor and .NET Specific Guidelines


- Utilize Blazor's built-in features for component lifecycle (e.g., OnInitializedAsync, OnParametersSetAsync).

- Use data binding effectively with @bind.

- Leverage Dependency Injection for services in Blazor.

- Structure Blazor components and services following Separation of Concerns.

- Always use the latest version C#, currently C# 13 features like record types, pattern matching, and global usings.


Oqtane specific Guidelines

- See base classes and patterns in the [Main Oqtane repo](https://github.com/oqtane/oqtane.framework)

- Follow client server patterns for module development.

- The Client project has various modules in the modules folder.

- Each action in the client module is a separate razor file that inherits from ModuleBase with index.razor being the default action.

- For complex client processing like getting data, create a service class that inherits from ServiceBase and lives in the services folder. One service class for each module.

- Client service should call server endpoint using ServiceBase methods

- Server project contains MVC Controllers, one for each module that match the client service calls. Each controller will call server-side services or repositories managed by DI

- Server projects use repository patterns for modules, one repository class per module to match the controllers.


Error Handling and Validation


- Implement proper error handling for Blazor pages and API calls.

- Use built-in Oqtane logging methods from base classes.

- Use logging for error tracking in the backend and consider capturing UI-level errors in Blazor with tools like ErrorBoundary.

- Implement validation using FluentValidation or DataAnnotations in forms.


Blazor API and Performance Optimization


- Utilize Blazor server-side or WebAssembly optimally based on the project requirements.

- Use asynchronous methods (async/await) for API calls or UI actions that could block the main thread.

- Optimize Razor components by reducing unnecessary renders and using StateHasChanged() efficiently.

- Minimize the component render tree by avoiding re-renders unless necessary, using ShouldRender() where appropriate.

- Use EventCallbacks for handling user interactions efficiently, passing only minimal data when triggering events.


Caching Strategies


- Implement in-memory caching for frequently used data, especially for Blazor Server apps. Use IMemoryCache for lightweight caching solutions.

- For Blazor WebAssembly, utilize localStorage or sessionStorage to cache application state between user sessions.

- Consider Distributed Cache strategies (like Redis or SQL Server Cache) for larger applications that need shared state across multiple users or clients.

- Cache API calls by storing responses to avoid redundant calls when data is unlikely to change, thus improving the user experience.


State Management Libraries


- Use Blazor's built-in Cascading Parameters and EventCallbacks for basic state sharing across components.

- use built-in Oqtane state management in the base classes like PageState and SiteState when appropriate.

- Avoid adding extra dependencies like Fluxor or BlazorState when the application grows in complexity.

- For client-side state persistence in Blazor WebAssembly, consider using Blazored.LocalStorage or B

🎯 Best For

  • Claude users
  • GitHub Copilot users
  • Software engineers
  • Development teams
  • Tech leads

💡 Use Cases

  • Code quality improvement
  • Best practice enforcement

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Oqtane to Your Work

    Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.

  4. 4

    Review and Refine

    Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.

❓ Frequently Asked Questions

Is Oqtane compatible with Cursor and VS Code?

Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.

Do I need specific dependencies for Oqtane?

Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.

How do I install Oqtane?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/oqtane/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Skipping validation

Always test AI-generated code changes, even for simple refactors.

Missing dependency updates

Check if the skill requires updated dependencies or new packages.

🔗 Related Skills