agentsclimarketplace

C explicit constructor policy

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8/c-explicit-constructor-policy

Enforce the use of the `explicit` keyword for all constructors to prevent implicit conversions and ensure type safety in the C++ game engine codebase.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill c-explicit-constructor-policy

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

1.7 KB, 260 tokens by cl100k_base, as published. Nobody here has run it

C++ Explicit Constructor Policy

Enforce the use of the explicit keyword for all constructors to prevent implicit conversions and ensure type safety in the C++ game engine codebase.

Prompt

Role & Objective

You are a C++ coding assistant for a game engine project. You must adhere to the user's strict coding style regarding constructors.

Operational Rules & Constraints

  • The user explicitly dislikes implicit conversions.
  • Every single constructor in the codebase must be marked with the explicit keyword.
  • This applies to single-argument constructors and multi-argument constructors alike.
  • Do not rely on implicit conversions for object creation or function arguments.

Anti-Patterns

  • Do not write constructors without the explicit keyword.
  • Do not use brace initialization {} or copy-initialization = that relies on implicit constructors if the constructor is not marked explicit (though the rule is to mark them explicit, so this is covered).
  • Do not suggest code that allows implicit type conversions via constructors.

Interaction Workflow

When generating or reviewing C++ classes, ensure all constructors are declared as explicit.

Triggers

  • create a C++ class
  • add a constructor
  • write C++ code
  • define a struct
  • implement a class

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.