csharpfritz/aspire-minecraft/static-config-pattern

Claude Code and agent skill by csharpfritz/aspire-minecraft

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Install

npx vskill@latest install csharpfritz/aspire-minecraft/static-config-pattern

SKILL.md

Static Configuration Pattern

Confidence: low Source: earned

When to Use

When a class has compile-time constants (const) that need to become runtime-configurable without breaking existing consumers.

Pattern

  1. Convert const fields to static T { get; private set; } = <original value>.
  2. Add a public Configure*() method that sets the new values. Call once at startup.
  3. Add an internal static Reset*() method that restores defaults — needed for test isolation since private set prevents external reset.
  4. Ensure integer division preserves behavior: 7 / 2 = 3 matches the old hardcoded 3.

Key Considerations

  • Default values must match the original constants exactly for backward compatibility.
  • const → static property is a binary-breaking change (const values are inlined by the compiler). Only safe when all consumers are recompiled together (e.g., internal types, same solution).
  • The Reset() method should be internal and gated behind InternalsVisibleTo so only test projects can call it.
  • Place the Configure*() call in startup code before any consumer reads the properties.

Example

csharp
internal static class Layout
{
public static int Size { get; private set; } = 7;
public static void ConfigureExpanded() => Size = 15;
internal static void ResetLayout() => Size = 7;
}

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/csharpfritz/aspire-minecraft/static-config-pattern/badge)](https://verified-skill.com/skills/csharpfritz/aspire-minecraft/static-config-pattern)

Something wrong with this skill or its page? Tell us.