smithery/13eholder

m15-anti-pattern

Common C++ Anti-Patterns. Triggers: global variables, new/delete, C-style cast, macros, void*.

Installation

$ npx skills add smithery/13eholder --skill m15-anti-pattern

Similar popular skills

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

Also in this package

Other skills from smithery/13eholder.

npx skills add smithery/13eholder

Browse all from smithery/13eholder

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 1,145 B
  • docs SUMMARY.md 118 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

C++ Anti-Patterns

Core Question

Is this C or C++?

  • C-Style: malloc, free, (int)x, void*.
  • C++ Style: std::vector, std::uniqueptr, staticcast, templates.

Error → Design Question

Issue Design Question
Hard to refactor Are you using Macros?
Leak Are you using new?
UB Are you using reinterpret_cast?

Thinking Prompt

  1. Can I delete this new?

- Use make_unique.

  1. Can I remove this macro?

- Use constexpr or templates.

Quick Reference

Anti-Pattern Modern Fix
new T make_unique<T>
**T* ownership** unique_ptr<T>
(T)ptr static_cast<T>(ptr)
#define constexpr