本文へスキップ
Skillpedia
一般的なプログラミング48k · #5825

software-architecture

できること

このツールは、整理された設計の良い習慣に従って、高品質なソフトウェアを作成するためのものです。より簡潔で、理解しやすく、保守しやすいコードの書き方を教えてくれます。

使う場面

  • ✓新しいソフトウェアのプロジェクトを始めるとき。
  • ✓既存のプログラムのコードを見直すとき。
  • ✓ソフトウェアの各部分を、より整理して構成し直す必要があるとき。

スキルのリンク

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/software-architecture/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/software-architecture/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“Clean Architectureの原則に従って、Webアプリケーションの構造を整理するのを手伝ってください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このツールは、「Clean Architecture」や「Domain Driven Design」といった原則を使ってアドバイスを行います。コードを小さく整理された部品に分ける方法や、名前を明確につける方法を提案します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Software Architecture Development Skill

This skill provides guidance for quality focused software development and architecture. It is based on Clean Architecture and Domain Driven Design principles.

Code Style Rules

General Principles

  • Early return pattern: Always use early returns when possible, over nested conditions for better readability
  • Avoid code duplication through creation of reusable functions and modules
  • Decompose long (more than 80 lines of code) components and functions into multiple smaller components and functions. If they cannot be used anywhere else, keep it in the same file. But if file longer than 200 lines of code, it should be split into multiple files.
  • Use arrow functions instead of function declarations when possible

Best Practices

Library-First Approach

  • ALWAYS search for existing solutions before writing custom code
    • Check npm for existing libraries that solve the problem
    • Evaluate existing services/SaaS solutions
    • Consider third-party APIs for common functionality
  • Use libraries instead of writing your own utils or helpers. For example, use cockatiel instead of writing your own retry logic.
  • When custom code IS justified:
    • Specific business logic unique to the domain
    • Performance-critical paths with special requirements
    • When external dependencies would be overkill
    • Security-sensitive code requiring full control
    • When existing solutions don't meet requirements after thorough evaluation

Architecture and Design

  • Clean Architecture & DDD Principles:
    • Follow domain-driven design and ubiquitous language
    • Separate domain entities from infrastructure concerns
    • Keep business logic independent of frameworks
    • Define use cases clearly and keep them isolated
  • Naming Conventions:
    • AVOID generic names: utils, helpers, common, shared
    • USE domain-specific names: OrderCalculator, UserAuthenticator, InvoiceGenerator
    • Follow bounded context naming patterns
    • Each module should have a single, clear purpose
  • Separation of Concerns:
    • Do NOT mix business logic with UI components
    • Keep database queries out of controllers
    • Maintain clear boundaries between contexts
    • Ensure proper separation of responsibilities

Anti-Patterns to Avoid

  • NIH (Not Invented Here) Syndrome:
    • Don't build custom auth when Auth0/Supabase exists
    • Don't write custom state management instead of using Redux/Zustand
    • Don't create custom form validation instead of using established libraries
  • Poor Architectural Choices:
    • Mixing business logic with UI components
    • Database queries directly in controllers
    • Lack of clear separation of concerns
  • Generic Naming Anti-Patterns:
    • utils.js with 50 unrelated functions
    • helpers/misc.js as a dumping ground
    • common/shared.js with unclear purpose
  • Remember: Every line of custom code is a liability that needs maintenance, testing, and documentation

Code Quality

  • Proper error handling with typed catch blocks
  • Break down complex logic into smaller, reusable functions
  • Avoid deep nesting (max 3 levels)
  • Keep functions focused and under 50 lines when possible
  • Keep files focused and under 200 lines of code when possible

When to Use

This skill is applicable to execute the workflow or actions described in the overview.

Example

User request:

Use @software-architecture for this task: Guide for quality focused software architecture.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
よくある質問

「Clean Architecture」とは何ですか?

ソフトウェアのコードを、理解、テスト、変更しやすい形に整理する方法です。業務の中心となるロジックと、技術的な部分を分けて考えます。

「コードの重複を避ける」とはどういう意味ですか?

同じコードを何度も書かないことです。代わりに、さまざまな場所で再利用できる関数やモジュールを作成します。

既存のライブラリを使うほうがよいのはなぜですか?

既存のライブラリは、すでに他の人によってテストされ、問題が解決されているため、時間と手間を節約できます。どうしても必要な場合にだけ、自分でコードを書くようにしましょう。

詳細

作者による元の説明

Guide for quality focused software architecture. This skill should be used when users want to write code, design architecture, analyze code, in any case that relates to software development.

repo: sickn33/agentic-awesome-skills

人気

GitHubのスター
48k
ランキング
#5825
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル