Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计通过

the-standard-code-csharp标准代码 csharp

Agent Skill

the-standard-code-csharp 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

24,285

周安装

603

GitHub Stars

17

下载量

7,911
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:the-standard-code-csharp(标准代码 csharp)
来源仓库:https://github.com/hassanhabib/the-standard-skills
仓库路径:skills/the-standard-code-csharp
安装命令:
npx skills add https://github.com/hassanhabib/the-standard-skills --skill 'The Standard Code CSharp'
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/hassanhabib/the-standard-skills --skill 'The Standard Code CSharp'

简介

the-standard-code-csharp 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 适用于根据关键词、任务场景或来源线索进行信息检索与筛选的场景。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网或文件读写操作。
  • 可结合原始 README 进一步核验具体用法和功能边界。

SKILL.md

The Standard Code CSharp

What this skill is

This skill is the canonical C# coding-style and organization layer for The Standard. Use it whenever generating, reviewing, refactoring, or evaluating C# code.

Explicit coverage map

This skill explicitly covers all supplied C# style rule files:

  • Files
  • Variables
  • Methods
  • Classes and Interfaces
  • Comments and Documentation

It also preserves the implementation-profile naming conventions supplied in the implementation specification.

When to use

Use this skill for any C# or.NET code, including models, brokers, services, controllers, tests, and support code.

Mandatory operating behavior

  1. Follow these rules exactly.
  2. Prefer explicit readability over personal taste.
  3. Use Standard naming even when team-local habits differ.
  4. Reject abbreviations, ambiguous names, noisy wrappers, and inconsistent formatting.
  5. Keep methods at level 0 of detail whenever possible.
  6. Break down code when chaining or long declarations become cognitively expensive.
  7. Preserve property order when instantiating models.
  8. Use this. for private fields.
  9. Maintain partial-file conventions for multi-dimensional classes.

Canonical rule set

0 Files

The following are the naming conventions and guidance for naming C# files.

0.0 Naming

File names should follow the PascalCase convention followed by the file extension .cs.

Do

Student.cs

Also, Do

StudentService.cs

Don't

student.cs

Also, Don't

studentService.cs

Also, Don't

Student_Service.cs

0.1 Partial Class Files

Partial class files are files that contain nested classes for a root file. For instance:

  • StudentService.cs

- StudentService.Validations.cs - StudentService.Exceptions.cs

Both validations and exceptions are partial classes to display a different aspect of any given class in a multi-dimensional space.

Do

StudentService.Validations.cs

Also, Do

StudentService.Validations.Add.cs

Don't

StudentServiceValidations.cs

Also, Don't

StudentService_Validations.cs

0. Variables

0.0 Naming

Variable names should be concise and representative of nature and the quantity of the value it holds or will potentially hold.

0.0.0 Names

Do

var student = new Student();

Don't

var s = new Student();

Also, Don't

var stdnt = new Student();

The same rule applies to lambda expressions:

Do

students.Where(student => student ... );

Don't

students.Where(s => s ... );

0.0.1 Plurals

Do

var students = new List<Student>();

Don't

var studentList = new List<Student>();

0.0.2 Names with Types

Do

var student = new Student();

Don't

var studentModel = new Student();

Also, Don't

var studentObj = new Student();

0.0.3 Nulls or Defaults

If a variable value is it's default such as 0 for int or null for strings and you are not planning on changing that value (for testing purposes for instance) then the name should identify that value.

Do

Student noStudent = null;

Don't

Student student = null;

Also, Do

int noChangeCount = 0;

But, Don't

int changeCount = 0;

0.1 Declarations

Declaring a variable and instantiating it should indicate the immediate type of the variable, even if the value is to be determined later.

0.1.0 Clear Types

If the right side type is clear, then use var to declare your variable

Do

var student = new Student();

Don't

Student student = new Student();

0.1.1 Semi-Clear Types

If the right side isn't clear (but known) of the returned value type, then you must explicitly declare your variable with it's type.

Do

Student student = GetStudent();

Don't

var student = GetStudent();

0.1.2 Unclear Types

If the right side isn't clear and unknown (such as an anonymous types) of the returned value type, you may use var as your variable type.

Do

var student = new
{
    Name = "Hassan",
    Score = 100
};

0.1.3 Single-Property Types

Assign properties directly if you are declaring a type with one property.

Do

var inputStudentEvent = new StudentEvent();
inputStudentEvent.Student = inputProcessedStudent;

Don't

var inputStudentEvent = new StudentEvent
{
    Student = inputProcessedStudent
};

Also, Do

var studentEvent = new StudentEvent
{
    Student = someStudent,
    Date = someDate
}

Don't

var studentEvent = new StudentEvent();
studentEvent.Student = someStudent;
studentEvent.Date = someDate;

0.2 Organization

0.2.0 Breakdown

If a variable declaration exceeds 120 characters, break it down starting from the equal sign.

Do

List<Student> washingtonSchoolsStudentsWithGrades =
    await GetAllWashingtonSchoolsStudentsWithTheirGradesAsync();

Don't

List<Student> washgintonSchoolsStudentsWithGrades = await GetAllWashingtonSchoolsStudentsWithTheirGradesAsync();

0.2.1 Multiple Declarations

Declarations that occupy two lines or more should have a new line before and after them to separate them from previous and next variables declarations.

Do

Student student = GetStudent();

List<Student> washingtonSchoolsStudentsWithGrades =
    await GetAllWashingtonSchoolsStudentsWithTheirGradesAsync();

School school = await GetSchoolAsync();

Don't

Student student = GetStudent();
List<Student> washgintonSchoolsStudentsWithGrades =
    await GetAllWashingtonSchoolsStudentsWithTheirGradesAsync();
School school = await GetSchoolAsync();

Also, declarations of variables that are of only one line should have no new lines between them.

Do

Student student = GetStudent();
School school = await GetSchoolAsync();

Don't

Student student = GetStudent();

School school = await GetSchoolAsync();

1 Methods

1.0 Naming

Method names should be a summary of what the method is doing, it needs to stay percise and short and representative of the operation with respect to synchrony.

1.0.0 Verbs

Method names must contain verbs in them to represent the action it performs.

Do

public List<Student> GetStudents()
{
	...
}

Don't

public List<Student> Students()
{
	...
}

1.0.1 Asynchronousy

Asynchronous methods should be postfixed by the term Async such as methods returning Task or ValueTask in general.

Do

public async ValueTask<List<Student>> GetStudentsAsync()
{
	...
}

Don't

public async ValueTask<List<Student>> GetStudents()
{
	...
}

1.0.2 Input Parameters

Input parameters should be explicit about what property of an object they will be assigned to, or will be used for any action such as search.

Do

public async ValueTask<Student> GetStudentByNameAsync(string studentName)
{
	...
}

Don't

public async ValueTask<Student> GetStudentByNameAsync(string text)
{
	...
}

Also, Don't

public async ValueTask<Student> GetStudentByNameAsync(string name)
{
	...
}

1.0.3 Action Parameters

If your method is performing an action with a particular parameter specify it.

Do

public async ValueTask<Student> GetStudentByIdAsync(Guid studentId)
{
	...
}

Don't

public async ValueTask<Student> GetStudentAsync(Guid studentId)
{
	...
}

1.0.4 Passing Parameters

When utilizing a method, if the input parameters aliases match the passed in variables in part or in full, then you don't have to use the aliases, otherwise you must specify your values with aliases.

Assume you have a method:

Student GetStudentByNameAsync(string studentName);

Do

string studentName = "Todd";
Student student = await GetStudentByNameAsync(studentName);

Also, Do

Student student = await GetStudentByNameAsync(studentName: "Todd");

Also, Do

Student student = await GetStudentByNameAsync(toddName);

Don't

Student student = await GetStudentByNameAsync("Todd");

Don't

Student student = await GetStudentByNameAsync(todd);

1.1 Organization

In general encapsulate multiple lines of the same logic into their own method, and keep your method at level 0 of details at all times.

1.1.0 Single/Multiple-Liners

1.1.0.0 One-Liners

Any method that contains only one line of code should use fat arrows

Do

public List<Student> GetStudents() => this.storageBroker.GetStudents();

Don't

public List<Student> Students()
{
	return this.storageBroker.GetStudents();
}

If a one-liner method exceeds the length of 120 characters then break after the fat arrow with an extra tab for the new line.

Do

public async ValueTask<List<Student>> GetAllWashingtonSchoolsStudentsAsync() =>
	await this.storageBroker.GetStudentsAsync();

Don't

public async ValueTask<List<Student>> GetAllWashingtonSchoolsStudentsAsync() => await this.storageBroker.GetStudentsAsync();

1.1.0.1 Multiple-Liners

If a method contains multiple liners separated or connected via chaining it must have a scope. Unless the parameters are going on the next line then a one-liner method with multi-liner params is allowed.

Do

public Student AddStudent(Student student)
{
	ValidateStudent(student);

	return this.storageBroker.InsertStudent(student);
}

Also, Do

public Student AddStudent(Student student)
{
	return this.storageBroker.InsertStudent(student)
		.WithLogging();
}

Also, Do

public Student AddStudent(
	Student student)
{
	return this.storageBroker.InsertStudent(student);
}

Don't

public Student AddStudent(Student student) =>
	this.storageBroker.InsertStudent(student)
		.WithLogging();

Also, Don't

public Student AddStudent(
	Student student) =>
		this.storageBroker.InsertStudent(student);

1.1.1 Returns

For multi-liner methods, take a new line between the method logic and the final return line (if any).

Do

public List<Student> GetStudents()
{
	StudentsClient studentsApiClient = InitializeStudentApiClient();

	return studentsApiClient.GetStudents();
}

Don't

public List<Student> GetStudents()
{
	StudentsClient studentsApiClient = InitializeStudentApiClient();
	return studentsApiClient.GetStudents();
}

1.1.2 Multiple Calls

With mutliple method calls, if both calls are less than 120 characters then they may stack unless the final call is a method return, otherwise separate with a new line.

Do

public List<Student> GetStudents()
{
	StudentsClient studentsApiClient = InitializeStudentApiClient();
	List<Student> students = studentsApiClient.GetStudents();

	return students;
}

Don't

public List<Student> GetStudents()
{
	StudentsClient studentsApiClient = InitializeStudentApiClient();

	List<Student> students = studentsApiClient.GetStudents();

	return students;
}

Also, Do

public async ValueTask<List<Student>> GetStudentsAsync()
{
	StudentsClient washingtonSchoolsStudentsApiClient =
		await InitializeWashingtonSchoolsStudentsApiClientAsync();

	List<Student> students = studentsApiClient.GetStudents();

	return students;
}

Don't

public async ValueTask<List<Student>> GetStudentsAsync()
{
	StudentsClient washingtonSchoolsStudentsApiClient =
		await InitializeWashingtonSchoolsStudentsApiClientAsync();
	List<Student> students = studentsApiClient.GetStudents();

	return students;
}

1.1.3 Declaration

A method declaration should not be longer than 120 characters.

Do

public async ValueTask<List<Student>> GetAllRegisteredWashgintonSchoolsStudentsAsync(
	StudentsQuery studentsQuery)
{
	...
}

Don't

public async ValueTask<List<Student>> GetAllRegisteredWashgintonSchoolsStudentsAsync(StudentsQuery studentsQuery)
{
	...
}

1.1.4 Multiple Parameters

If you are passing multiple parameters, and the length of the method call is over 120 characters, you must break by the parameters, with one parameter on each line.

Do

List<Student> redmondHighStudents = await QueryAllWashingtonStudentsByScoreAndSchoolAsync(
	MinimumScore: 130,
	SchoolName: "Redmond High");

Don't

List<Student> redmondHighStudents = await QueryAllWashingtonStudentsByScoreAndSchoolAsync(
	MinimumScore: 130,SchoolName: "Redmond High");

1.1.5 Chaining (Uglification/Beautification)

Some methods offer extensions to call other methods. For instance, you can call a Select() method after a Where() method. And so on until a full query is completed.

We will follow a process of Uglification Beautification. We uglify our code to beautify our view of a chain methods. Here's some examples:

Do

	students.Where(student => student.Name is "Elbek")
		.Select(student => student.Name)
			.ToList();

Don't

	students
		.Where(student => student.Name is "Elbek")
			.Select(student => student.Name)
				.ToList();

The first approach enforces simplifying and cutting the chaining short as more calls continues to uglify the code like this:

	students.SomeMethod(...)
		.SomeOtherMethod(...)
			.SomeOtherMethod(...)
				.SomeOtherMethod(...)
					.SomeOtherMethod(...);

The uglification process forces breaking down the chains to smaller lists then processing it. The second approach (no uglification approach) may require additional cognitive resources to distinguish between a new statement and an existing one as follows:

	student
		.Where(student => student.Name is "Elbek")
		.Select(student => student.Name)
		.OrderBy(student => student.Name)
		.ToList();

	ProcessStudents(students);

4 Classes

4.0 Naming

Classes that represent services or brokers in a Standard-Compliant architecture should represent the type of class in their naming convention, however that doesn't apply to models.

4.0.0 Models

Do

class Student {
	...
}

Don't

class StudentModel {

}

4.0.1 Services

In a singular fashion, for any class that contains business logic.

Do

class StudentService {
	....
}

Don't

class StudentsService{
	...
}

Also, Don't

class StudentBusinessLogic {
	...
}

Also, Don't

class StudentBL {
	...
}

4.0.2 Brokers

In a singular fashion, for any class that is a shim between your services and external resources.

Do

class StudentBroker {
	....
}

Don't

class StudentsBroker {
	...
}

4.0.3 Controllers

In a plural fashion, to reflect endpoints such as /api/students to expose your logic via RESTful operations.

Do

class StudentsController {
	....
}

Don't

class StudentController {
	...
}

4.1 Fields

A field is a variable of any type that is declared directly in a class or struct. Fields are members of their containing type.

4.1.0 Naming

Class fields are named in a camel cased fashion.

Do

class StudentsController {
	private readonly string studentName;
}

Don't

class StudentController {
	private readonly string StudentName;
}

Also, Don't

class StudentController {
	private readonly string _studentName;
}

Should follow the same rules for naming as mentioned in the Variables sections.

4.1.1 Referencing

When referencing a class private field, use this keyword to distinguish private class member from a scoped method or constructor level variable.

Do

class StudentsController {
	private readonly string studentName;

	public StudentsController(string studentName) {
		this.studentName = studentName;
	}
}

Don't

class StudentController {
	private readonly string _studentName;

	public StudentsController(string studentName) {
		_studentName = studentName;
	}
}

4.2 Instantiations

4.2.0 Input Params Aliases

If the input variables names match to input aliases, then use them, otherwise you must use the aliases, especially with values passed in.

Do

int score = 150;
string name = "Josh";

var student = new Student(name, score);

Also, Do

var student = new Student(name: "Josh", score: 150);

But, Don't

var student = new Student("Josh", 150);

Also, Don't

Student student = new (...);

4.2.1 Honoring Property Order

When instantiating a class instance - make sure that your property assignment matches the properties order in the class declarations.

Do

public class Student
{
	public Guid Id {get; set;}
	public string Name {get; set;}
}

var student = new Student
{
	Id = Guid.NewGuid(),
	Name = "Elbek"
}

Also, Do

public class Student
{
	private readonly Guid id;
	private readonly string name;

	public Student(Guid id, string name)
	{
		this.id = id;
		this.name = name;
	}
}

var student = new Student (id: Guid.NewGuid(), name: "Elbek");

Don't

public class Student
{
	public Guid Id {get; set;}
	public string Name {get; set;}
}

var student = new Student
{
	Name = "Elbek",
	Id = Guid.NewGuid()
}

Also, Don't

public class Student
{
	private readonly Guid id;
	private readonly string name;

	public Student(string name, Guid id)
	{
		this.id = id;
		this.name = name;
	}
}

var student = new Student (id: Guid.NewGuid(), name: "Elbek");

Also, Don't

public class Student
{
	private readonly Guid id;
	private readonly string name;

	public Student(Guid id, string name)
	{
		this.id = id;
		this.name = name;
	}
}

var student = new Student (name: "Elbek", id: Guid.NewGuid());

12 Comments

12.0 Introduction

Comments can only be used to explain what code can't. Whether the code is visible or not.

12.1 Copyrights

Comments highlighting copyrights should follow this pattern:

Do

    // ---------------------------------------------------------------
    // Copyright (c) Coalition of the Good-Hearted Engineers
    // FREE TO USE TO CONNECT THE WORLD
    // ---------------------------------------------------------------

Don't

    //----------------------------------------------------------------
    // <copyright file="StudentService.cs" company="OpenSource">
    //      Copyright (C) Coalition of the Good-Hearted Engineers
    // </copyright>
    //----------------------------------------------------------------

Also, Don't

   /*
    * ==============================================================
    * Copyright (c) Coalition of the Good-Hearted Engineers
    * FREE TO USE TO CONNECT THE WORLD
    * ==============================================================
    */

12.2 Methods

Methods that have code that is not accessible at dev-time, or perform a complex function should contain the following details in their documentation.

  • Purposing
  • Incomes
  • Outcomes
  • Side Effects

Implementation-profile naming addendum

10. Naming Conventions

ElementPatternExample
Broker interfaceI{Resource}BrokerIStorageBroker, IModernApiBroker, ILoggingBroker
Broker class{Resource}BrokerStorageBroker, ModernApiBroker, LoggingBroker
Broker method{Action}{Entity}AsyncInsertLegacyUserAsync, PostPersonAsync
Service interfaceI{Entity}ServiceILegacyUserService
Service class{Entity}ServiceLegacyUserService
Service methodAdd{Entity}AsyncAddLegacyUserAsync
Inner exception{Adjective}{Entity}ExceptionNullLegacyUserException
Outer exception{Entity}{Category}ExceptionLegacyUserValidationException
Test class{Entity}ServiceTestsLegacyUserServiceTests
Test methodShould{Action}Async / ShouldThrow{Exception}On{Action}…ShouldAddLegacyUserAsync

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.51%
按下载量换算2,967

Claude

31.5%
按下载量换算2,492

Cursor

16.86%
按下载量换算1,334

Gemini CLI

10.01%
按下载量换算792

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills