Chuyển đến nội dung
Skillpedia
Lập trình chung40k · #7109

code-exemplars-blueprint-generator

Skill này làm gì

Công cụ này tạo một hướng dẫn gồm các ví dụ mã chất lượng cao cho dự án. Nó giúp giữ tiêu chuẩn lập trình nhất quán bằng cách đưa ra những ví dụ tốt về cách viết mã.

Khi nào nên dùng

  • ✓Khi bắt đầu một dự án mới để xác định tiêu chuẩn.
  • ✓Khi chất lượng mã cần được cải thiện.
  • ✓Để giúp lập trình viên mới hiểu các thực hành tốt nhất.

Liên kết skill

https://github.com/github/awesome-copilot/blob/main/skills/code-exemplars-blueprint-generator/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/github/awesome-copilot/blob/main/skills/code-exemplars-blueprint-generator/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo hướng dẫn ví dụ mã cho dự án Python của tôi, tập trung vào mẫu thiết kế và có các đoạn mã minh họa.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Bạn xác định loại dự án và cách công cụ nên phân tích mã. Sau đó, công cụ tạo một tệp với các ví dụ mã tuân theo thực hành tốt nhất đã định.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Code Exemplars Blueprint Generator

Configuration Variables

${PROJECT_TYPE="Auto-detect|.NET|Java|JavaScript|TypeScript|React|Angular|Python|Other"} <!-- Primary technology --> ${SCAN_DEPTH="Basic|Standard|Comprehensive"} <!-- How deeply to analyze the codebase --> ${INCLUDE_CODE_SNIPPETS=true|false} <!-- Include actual code snippets in addition to file references --> ${CATEGORIZATION="Pattern Type|Architecture Layer|File Type"} <!-- How to organize exemplars --> ${MAX_EXAMPLES_PER_CATEGORY=3} <!-- Maximum number of examples per category --> ${INCLUDE_COMMENTS=true|false} <!-- Include explanatory comments for each exemplar -->

Generated Prompt

"Scan this codebase and generate an exemplars.md file that identifies high-quality, representative code examples. The exemplars should demonstrate our coding standards and patterns to help maintain consistency. Use the following approach:

1. Codebase Analysis Phase

  • ${PROJECT_TYPE == "Auto-detect" ? "Automatically detect primary programming languages and frameworks by scanning file extensions and configuration files" : Focus on ${PROJECT_TYPE} code files}
  • Identify files with high-quality implementation, good documentation, and clear structure
  • Look for commonly used patterns, architecture components, and well-structured implementations
  • Prioritize files that demonstrate best practices for our technology stack
  • Only reference actual files that exist in the codebase - no hypothetical examples

2. Exemplar Identification Criteria

  • Well-structured, readable code with clear naming conventions
  • Comprehensive comments and documentation
  • Proper error handling and validation
  • Adherence to design patterns and architectural principles
  • Separation of concerns and single responsibility principle
  • Efficient implementation without code smells
  • Representative of our standard approaches

3. Core Pattern Categories

${PROJECT_TYPE == ".NET" || PROJECT_TYPE == "Auto-detect" ? `#### .NET Exemplars (if detected)

  • Domain Models: Find entities that properly implement encapsulation and domain logic
  • Repository Implementations: Examples of our data access approach
  • Service Layer Components: Well-structured business logic implementations
  • Controller Patterns: Clean API controllers with proper validation and responses
  • Dependency Injection Usage: Good examples of DI configuration and usage
  • Middleware Components: Custom middleware implementations
  • Unit Test Patterns: Well-structured tests with proper arrangement and assertions` : ""}

${(PROJECT_TYPE == "JavaScript" || PROJECT_TYPE == "TypeScript" || PROJECT_TYPE == "React" || PROJECT_TYPE == "Angular" || PROJECT_TYPE == "Auto-detect") ? `#### Frontend Exemplars (if detected)

  • Component Structure: Clean, well-structured components
  • State Management: Good examples of state handling
  • API Integration: Well-implemented service calls and data handling
  • Form Handling: Validation and submission patterns
  • Routing Implementation: Navigation and route configuration
  • UI Components: Reusable, well-structured UI elements
  • Unit Test Examples: Component and service tests` : ""}

${PROJECT_TYPE == "Java" || PROJECT_TYPE == "Auto-detect" ? `#### Java Exemplars (if detected)

  • Entity Classes: Well-designed JPA entities or domain models
  • Service Implementations: Clean service layer components
  • Repository Patterns: Data access implementations
  • Controller/Resource Classes: API endpoint implementations
  • Configuration Classes: Application configuration
  • Unit Tests: Well-structured JUnit tests` : ""}

${PROJECT_TYPE == "Python" || PROJECT_TYPE == "Auto-detect" ? `#### Python Exemplars (if detected)

  • Class Definitions: Well-structured classes with proper documentation
  • API Routes/Views: Clean API implementations
  • Data Models: ORM model definitions
  • Service Functions: Business logic implementations
  • Utility Modules: Helper and utility functions
  • Test Cases: Well-structured unit tests` : ""}

4. Architecture Layer Exemplars

  • Presentation Layer:

    • User interface components
    • Controllers/API endpoints
    • View models/DTOs
  • Business Logic Layer:

    • Service implementations
    • Business logic components
    • Workflow orchestration
  • Data Access Layer:

    • Repository implementations
    • Data models
    • Query patterns
  • Cross-Cutting Concerns:

    • Logging implementations

…

Câu hỏi thường gặp

“Code exemplars” là gì?

Đó là các đoạn mã làm mẫu, minh họa cách viết mã chất lượng cao và tuân theo tiêu chuẩn đã định cho dự án.

“Technology-agnostic” nghĩa là gì?

Nghĩa là công cụ có thể làm việc với nhiều ngôn ngữ lập trình và framework khác nhau, không bị giới hạn ở một loại duy nhất.

Tôi có thể chọn những gì đưa vào ví dụ không?

Có, bạn có thể cấu hình việc có bao gồm đoạn mã, chú thích giải thích không và cách sắp xếp ví dụ (theo loại mẫu, tầng kiến trúc, v.v.).

Chi tiết

Mô tả gốc của tác giả

Technology-agnostic prompt generator that creates customizable AI prompts for scanning codebases and identifying high-quality code exemplars. Supports multiple programming languages (.NET, Java, JavaScript, TypeScript, React, Angular, Python) with configurable analysis depth, categorization methods, and documentation formats to establish coding standards and maintain consistency across development

repo: github/awesome-copilot

Độ phổ biến

Sao GitHub
40k
Vị trí xếp hạng
#7109
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự