SuperAPI AI Directory

software-design

Coding & development

View repository

Updated 10-16 01:19

About this skill

Software Design and Coding Standards Skill System

Task Objectives

This skill system provides comprehensive software design and coding standards guidance, covering a complete knowledge system from basic terminology to architectural design. It supports a beginner → advanced → architect learning path and can invoke the corresponding sub-skills according to different scenarios.

Core Capabilities

  • Terminology and Concept Analysis: Basic concepts such as scope, closures, namespaces, and variable lifecycle
  • State Management Design: Local/global/shared state, immutable state, unidirectional data flow
  • Function Design Principles: Single responsibility, pure functions, method encapsulation, high cohesion and low coupling
  • Modular Architecture: Layered architecture, directory standards, code organization structure

Merged Sub-skills

Sub-skill Source Responsibility Path
code-optimizer Original code-optimizer-skill Three-layer analysis funnel: static compliance → logical structure → performance and security View
design-pattern-advisor Original design-pattern-advisor-skill Identification/recommendation/review of 23 GoF patterns View

Usage Scenarios

Scenario 1: Beginner Learning Path

Requirement: Learn software design from scratch

Invocation Method:

调用 software-design 技能,选择"新手学习路径"

Output:

  • Explanation of basic terminology (scope, variables, functions)
  • Introduction to coding standards
  • Simple examples and exercises

Scenario 2: Code Refactoring

Requirement: Optimize existing code structure

Invocation Method:

调用 software-design 技能,选择"代码重构"场景

Output:

  • Code problem analysis
  • Refactoring solution design
  • Specific implementation steps

Scenario 3: Architecture Design

Requirement: Design architecture for large-scale projects

Invocation Method:

调用 software-design 技能,选择"架构设计"场景

Output:

  • Layered architecture design
  • Module division plan
  • Application of design patterns

Scenario 4: Performance Optimization

Requirement: Resolve performance bottlenecks

Invocation Method:

调用 software-design 技能,选择"性能优化"场景

Output:

  • Performance analysis methods
  • Optimization solution design
  • Best practice recommendations

Core Concept System

I. Basic Terminology (Every Programmer Must Know)

  • Scope: Global variables / local variables / block scope
  • Variable Lifecycle: Declaration lifecycle, memory allocation, garbage collection
  • Namespace Pollution: Global namespace management, modularization solutions
  • Closure: Lexical scope, context retention
  • State Management: Local state / global state / shared state
  • Immutable State: Data immutability, pure functions
  • Unidirectional data flow: Data flow control, state update mechanism

II. Design Principles (SOLID)

  1. Single Responsibility Principle (SRP): A class should have only one responsibility
  2. Open-Closed Principle (OCP): Open for extension, closed for modification
  3. Liskov Substitution Principle (LSP): Subclasses can replace parent classes
  4. Interface Segregation Principle (ISP): Interfaces should be small and specialized
  5. Dependency Inversion Principle (DIP): Depend on abstractions rather than concrete implementations

III. Code Quality Dimensions

  • Maintainability: Easy to understand, modify, and maintain
  • Extensibility: Easy to add new features
  • Testability: Easy to write unit tests
  • Readability: Code is clear and easy to understand
  • Decoupling: Low coupling between modules

IV. Architectural Design Patterns

  • Layered architecture: Controller / Service / DAO / Utils
  • Modular design: High cohesion, low coupling
  • Design patterns: 23 classic design patterns
  • Refactoring techniques: Code refactoring methodology

Learning Roadmap

🌱 Beginner Stage (0-6 months)

Key Learning Content:

  1. Basic terminology: variables, scope, functions
  2. Coding standards: naming, comments, formatting
  3. Simple function design: single functionality, parameter design
  4. Basic error handling: try-catch, error messages

Recommended Sub-skills:

  • terminology (terminology concepts)
  • naming (naming conventions)
  • function-design (basic function design)

🚀 Intermediate Stage (6 months - 2 years)

Key Learning Content:

  1. Advanced function design: pure functions, side effect management
  2. State management: local state, global state
  3. Modularization: code organization, directory structure
  4. Error handling: error code design, exception chains
  5. Performance basics: time complexity, space complexity

Recommended Sub-skills:

  • function-design (advanced function design)
  • state-management (state management)
  • modularization (modularization)
  • error-handling (error handling)

🏗️ Architect Stage (2+ years)

Key Learning Content:

  1. In-depth application of SOLID principles
  2. Design patterns: practical application of 23 patterns
  3. Architecture design: layered architecture, microservices
  4. Performance optimization: memory management, concurrency handling
  5. Code refactoring: refactoring methodology
  6. Engineering quality: maintainability, extensibility

Recommended Sub-skills:

  • code-quality (code quality)
  • performance (performance optimization)
  • modularization (architecture design)
  • Comprehensive application of all sub-skills

Web Search Configuration

This skill supports web search functionality, used to obtain the latest design patterns, best practices, and technology trends.

Search Trigger Conditions

  • The user explicitly requests a search for the latest practices
  • Need to verify the current usage of a certain design pattern
  • Need to understand the state management solution of a specific framework
  • Need to look up the latest techniques for performance optimization

Search keyword examples

  • "2025 state management best practices"
  • "SOLID principles real-world examples"
  • "code refactoring techniques 2025"
  • "performance optimization patterns"

Reference documents

Document Purpose When to use
references/terminology.md Detailed explanation of programming terminology When basic concepts need to be understood
references/state-management.md State management solution When designing state management logic
references/function-design.md Function design guide When writing or refactoring functions
references/modularization.md Modular design When organizing code structure
references/error-handling.md Error handling mechanism When designing exception handling
references/performance.md Performance optimization When solving performance issues
references/code-quality.md Code quality standards When improving code quality
references/naming.md Naming conventions When improving naming

Usage examples

Example 1: Querying terminology concepts

User: "What is a closure? How is it used?"

Skill invocation:

调用 software-design/terminology
查询:闭包(Closure)

Output:

  • Closure definition
  • Working principle
  • Use cases
  • Code examples
  • Notes

Example 2: State management design

User: "How should the state of this component be managed?"

Skill invocation:

调用 software-design/state-management
场景:组件状态设计

Output:

  • State analysis (local/global/shared)
  • State management solution
  • Code implementation examples
  • Best practice recommendations

Example 3: Function refactoring

User: "This function is too complex, how should it be split?"

Skill invocation:

调用 software-design/function-design
场景:函数重构
应用原则:单一职责、纯函数

Output:

  • Problem analysis
  • Splitting plan
  • Refactored code
  • Explanation of design principles

Example 4: Architecture design

User: "I want to develop an e-commerce system, how should the architecture be designed?"

Skill invocation:

调用 software-design/modularization
场景:大型项目架构设计
网络搜索:电商系统架构最佳实践

Output:

  • Layered architecture design
  • Module division plan
  • Technology selection recommendations
  • Application of design patterns

Notes

  • Sub-skill invocation: Select appropriate sub-skills according to the specific scenario, avoiding over-design
  • Web search: Enable only when the latest information is needed, avoiding unnecessary searches
  • Learning path: Recommend appropriate learning content and sub-skills according to the user's level
  • Code examples: All recommendations should provide runnable code examples
  • Application of principles: When explaining design principles, combine them with actual scenarios and avoid dogmatism
  • Version control: Important modifications require updating the version number and recording the changes

Version history

  • v1.0.0 (2025-01-XX): Initial version
    • Create a complete skill system architecture
    • Define 8 sub-skills
    • Configure web search capabilities
    • Provide a learning roadmap