smithery/alechenninger

constructors

Use config structs in constructor functions.

Installation

$ npx skills add smithery/alechenninger --skill constructors

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 419 B
  • docs SUMMARY.md 64 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Overview

Non-trivial structs should be configured with a config struct, like so:

func NewX(cfg XConfig) {
    // Apply defaults
    // Validate
}

struct XConfig {
    // All config parameters here
}

## When to use

Any time there is a struct to be construct that...

- Is either non trivial
- Is especially likely to evolve