xiaohongshu
xiaohongshu
csharp-unity-majo
C# and Unity development standards for Mark's projects.
Full skill instructions
Goal: Write consistent, well-documented C# code for Unity game development following specific naming conventions, XML documentation standards, and British spelling preferences.
public → camelCaseprotected → PascalCaseprivate → _camelCase<summary>, <param>, <returns>Standards for writing C# code, with Unity-specific patterns.
public double lightness; // public: camelCase
protected Slider LightnessSlider; // protected: PascalCase
private FirebaseAuth _auth; // private: _camelCase
| Access Level | Convention | Example |
|---|---|---|
public | camelCase | lightness, userData, isReady |
protected | PascalCase | LightnessSlider, UserData |
private | _camelCase | _auth, _userData, _isInitialised |
Methods use PascalCase regardless of access level:
public void CalculateSimilarity() { }
private void _initialiseAuth() { } // ❌ WRONG
private void InitialiseAuth() { } // ✅ CORRECT
When porting code from external sources, preserve the original naming for traceability:
// https://bottosson.github.io/posts/oklab/ (public domain)
public static Lab linear_srgb_to_oklab(RGB c) // snake_case preserved
{
// implementation...
}
Add a comment linking to the original source.
Use XML documentation for public APIs:
/// <summary>
/// calculate a similarity percentage from a colour distance
/// </summary>
/// <param name="delta">the delta object returned by CalculateDistance</param>
/// <param name="chromaMax">maximum chroma value, defaults to 1.0f</param>
/// <returns>a similarity percentage (0-100)</returns>
public static float CalculateSimilarity(DeltaLabChE delta, float chromaMax = 1.0f)
{
// implementation...
}
Key points:
<summary> tags<param> for all parameters<returns> for non-void methodsUse List-based callback registration for event systems:
private readonly List<Action<FirebaseUser>> _onSignInCallbacks = new();
public void RegisterOnSignInCallback(Action<FirebaseUser> callback)
{
_onSignInCallbacks.Add(callback);
Debug.Log($"registering OnSignInCallback ({_onSignInCallbacks.Count})");
}
private void FireOnSignInCallbacks()
{
foreach (var callback in _onSignInCallbacks)
{
try
{
callback.Invoke(_user);
}
catch (Exception e)
{
Debug.LogError($"error invoking callback: {e.Message}");
}
}
}
Pattern elements:
List<Action<T>> for storing callbacksRegister*Callback methodFire*Callbacks method with try-catchUse lowercase messages consistent with error message format:
Debug.Log($"initialising authentication service");
Debug.Log($"registering OnSignInCallback ({_onSignInCallbacks.Count})");
Debug.LogWarning($"user not authenticated, skipping sync");
Debug.LogError($"error invoking callback: {e.Message}");
For errors, follow the standard format:
Debug.LogError($"authservice: error: failed to sign in: {e.Message}");
Use British spellings in code identifiers and documentation. See dev-standards-majo for the complete list.
Common C# examples:
Initialise() not Initialize()colour not colorbehaviour not behaviorSerialise() not Serialize()Normalise() not Normalize()Exception: When interfacing with Unity or .NET APIs that use American spellings (e.g., MonoBehaviour, Color), use the API's spelling for that specific reference.
<summary>, <param>, <returns> tagsThis skill extends dev-standards-majo. Always ensure dev-standards-majo is loaded for:
Works alongside:
git-majo — For committing C# changeswriting-docs-majo — For writing C#/Unity documentationtask-planning-majo — For planning Unity projectsxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience