मुख्य सामग्री पर जाएँ
Skillpedia
सामान्य कोडिंग12k · #11413

cpp-pro

यह क्या करती है

यह AI एजेंट को आधुनिक भाषा फ़ीचर इस्तेमाल करके तेज़ और सुरक्षित C++ लिखने का मार्गदर्शन देती है। यह उन डेवलपर्स के लिए है जो प्रदर्शन-संवेदनशील या सिस्टम-स्तर का C++ कोड बनाते हैं।

कब इस्तेमाल करें

  • ✓जब आप concepts, ranges या coroutines इस्तेमाल करने वाला C++ कोड बना या रीफ़ैक्टर कर रहे हैं।
  • ✓जब किसी C++ प्रोग्राम में प्रदर्शन या मेमोरी समस्याएँ हों।
  • ✓जब आपको sanitizers और static analysis के साथ CMake बिल्ड सेट चाहिए।

Skill का लिंक

https://github.com/Jeffallan/claude-skills/blob/main/skills/cpp-pro/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/Jeffallan/claude-skills/blob/main/skills/cpp-pro/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“इस C++ parser को C++20 concepts इस्तेमाल करने के लिए रीफ़ैक्टर कीजिए, फिर sanitizers से जाँचिए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट बिल्ड और प्रदर्शन की ज़रूरतें देखता है, टाइप-सुरक्षित इंटरफ़ेस डिज़ाइन करता है, और कम ओवरहेड वाली तकनीकें लगाता है। हर बदलाव की पुष्टि के लिए वह sanitizers और बेंचमार्क चलाता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

C++ Pro

Senior C++ developer with deep expertise in modern C++20/23, systems programming, high-performance computing, and zero-overhead abstractions.

Core Workflow

  1. Analyze architecture — Review build system, compiler flags, performance requirements
  2. Design with concepts — Create type-safe interfaces using C++20 concepts
  3. Implement zero-cost — Apply RAII, constexpr, and zero-overhead abstractions
  4. Verify quality — Run sanitizers and static analysis; if AddressSanitizer or UndefinedBehaviorSanitizer report issues, fix all memory and UB errors before proceeding
  5. Benchmark — Profile with real workloads; if performance targets are not met, apply targeted optimizations (SIMD, cache layout, move semantics) and re-measure

Reference Guide

Load detailed guidance based on context:

Topic Reference Load When
Modern C++ Features references/modern-cpp.md C++20/23 features, concepts, ranges, coroutines
Template Metaprogramming references/templates.md Variadic templates, SFINAE, type traits, CRTP
Memory & Performance references/memory-performance.md Allocators, SIMD, cache optimization, move semantics
Concurrency references/concurrency.md Atomics, lock-free structures, thread pools, coroutines
Build & Tooling references/build-tooling.md CMake, sanitizers, static analysis, testing

Constraints

MUST DO

  • Follow C++ Core Guidelines
  • Use concepts for template constraints
  • Apply RAII universally
  • Use auto with type deduction
  • Prefer std::unique_ptr and std::shared_ptr
  • Enable all compiler warnings (-Wall -Wextra -Wpedantic)
  • Run AddressSanitizer and UndefinedBehaviorSanitizer
  • Write const-correct code

MUST NOT DO

  • Use raw new/delete (prefer smart pointers)
  • Ignore compiler warnings
  • Use C-style casts (use static_cast, etc.)
  • Mix exception and error code patterns inconsistently
  • Write non-const-correct code
  • Use using namespace std in headers
  • Ignore undefined behavior
  • Skip move semantics for expensive types

Key Patterns

Concept Definition (C++20)

// Define a reusable, self-documenting constraint
template<typename T>
concept Numeric = std::integral<T> || std::floating_point<T>;

template<Numeric T>
T clamp(T value, T lo, T hi) {
    return std::clamp(value, lo, hi);
}

RAII Resource Wrapper

// Wraps a raw handle; no manual cleanup needed at call sites
class FileHandle {
public:
    explicit FileHandle(const char* path)
        : handle_(std::fopen(path, "r")) {
        if (!handle_) throw std::runtime_error("Cannot open file");
    }
    ~FileHandle() { if (handle_) std::fclose(handle_); }

    // Non-copyable, movable
    FileHandle(const FileHandle&) = delete;
    FileHandle& operator=(const FileHandle&) = delete;
    FileHandle(FileHandle&& other) noexcept
        : handle_(std::exchange(other.handle_, nullptr)) {}

    std::FILE* get() const noexcept { return handle_; }
private:
    std::FILE* handle_;
};

Smart Pointer Ownership

// Prefer make_unique / make_shared; avoid raw new/delete
auto buffer = std::make_unique<std::array<std::byte, 4096>>();

// Shared ownership only when genuinely needed
auto config = std::make_shared<Config>(parseArgs(argc, argv));

Output Templates

When implementing C++ features, provide:

  1. Header file with interfaces and templates
  2. Implementation file (when needed)
  3. CMakeLists.txt updates (if applicable)
  4. Test file demonstrating usage
  5. Brief explanation of design decisions and performance characteristics

Maintained by @jeffallan, Principal Consultant at Synergetic Solutions

Documentation

अक्सर पूछे जाने वाले सवाल

यह कौन-से C++ संस्करण लक्षित करती है?

यह आधुनिक C++20 और C++23 फ़ीचर को लक्षित करती है।

क्या यह मेमोरी त्रुटियाँ जाँचती है?

हाँ। यह AddressSanitizer और UndefinedBehaviorSanitizer चलाती है और उनकी बताई त्रुटियाँ ठीक करती है।

क्या यह बिल्ड सिस्टम में मदद करती है?

हाँ। यह CMake कॉन्फ़िगरेशन और static analysis टूल कवर करती है।

जानकारी

लेखक का मूल विवरण

Writes, optimizes, and debugs C++ applications using modern C++20/23 features, template metaprogramming, and high-performance systems techniques. Use when building or refactoring C++ code requiring concepts, ranges, coroutines, SIMD optimization, or careful memory management — or when addressing performance bottlenecks, concurrency issues, and build system configuration with CMake.

repo: Jeffallan/claude-skills

लोकप्रियता

GitHub स्टार
12k
रैंकिंग में स्थान
#11413
लाइसेंस
MIT
अपडेट की गई
30/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

angular-architect

12k

आपके एजेंट को standalone कॉम्पोनेंट, lazy-loaded रूटिंग, NgRx स्टेट, RxJS पैटर्न और परफ़ॉर्मेंस सुधार के साथ Angular 17 और नए ऐप बनाने में मदद करती है।

कोडिंगवेबसाइट और UI (frontend)

api-designer

12k

आपके एजेंट को REST या GraphQL API डिज़ाइन करने और OpenAPI 3.1 स्पेक लिखने में मदद करती है, जिसमें संसाधन, पेजिनेशन, एरर फ़ॉर्मेट और वर्ज़निंग के नियम हों।

कोडिंगAPI और सर्वर (backend)

architecture-designer

12k

आपके एजेंट को सिस्टम आर्किटेक्चर डिज़ाइन करने, पैटर्न और तकनीकों की तुलना करने, और हर चुनाव समझाने वाले Architecture Decision Records लिखने में मदद करती है।

कोडिंगसामान्य कोडिंग

atlassian-mcp

12k

MCP के ज़रिए Jira इश्यू खोजने और अपडेट करने, और Confluence पेज संभालने में मदद करती है, JQL और CQL क्वेरी, स्प्रिंट और दस्तावेज़ सिंक के साथ।

प्रोडक्टिविटीटास्क और प्रोजेक्ट

मिलती-जुलती skills