• Projects
  • Service
  • About
  • branding.bz
  • Podcast
  • Tips
  • FAQ
  • Recruit
  • Download
  • Contact
  • branding.bz(ブランド構築SaaS)
  • DESIGN NOW(デザインメディア)
  • X
  • LinkedIn
  • Spotify
  • Facebook

213-0011 神奈川県川崎市高津区久本3-6-7-303

© 2026 ID INC. All rights reserved

claude-skills/スキル
SKILLOfficialdevelopment

platform-architecture-analyze

プラグイン
salesforce-development
ソース
GitHub で見る ↗
説明

Salesforce プロジェクトを Salesforce Well-Architected フレームワーク(信頼性・使いやすさ・適応性)に照らして分析します。 **次のような場合に使用:** 開発者が「アーキテクチャをレビューしてほしい」「Well-Architected チェックを実行してほしい」「このプロジェクトを監査してほしい」「このプロジェクトは Well-Architected に沿っているか」「プロジェクト全体のセキュリティ・ガバナンスの制限・パッケージ化(配布用に整理されたコード群)のリスク評価をしてほしい」と依頼したり、コードとメタデータ(設定情報)全体の健全性を総合的にレポートしてほしい場合 **機能の詳細:** コードとメタデータから確認できる項目(データ共有設定・アクセス制御・一括処理の効率化・SOQL(データ取得方法)の最適化・トリガー処理の設計・古い技術の使用・パッケージ化への対応状況)をファイルと行番号を示しながら採点します。 一方、ガバナンス・プロセスの柱のうち確認できない項目(セキュリティ管理体制・事業継続計画・技術ロードマップ・AI 運用ルール)については、人間が確認用のチェックリストを生成します。 **特徴:** `dx-code-analyzer-run`(Apex コードの単一ツール分析)とは異なり、複数の分析スキルを組み合わせた多角的なアーキテクチャレビューです。Well-Architected フレームワークに基づいた判定を行います。読み取り専用のツールであり、採点と助言のみで、コードの修正はしません。

原文を表示

Analyze a Salesforce project against the Salesforce Well-Architected framework (Trusted / Easy / Adaptable). Use when the developer asks to "review the architecture", "run a Well-Architected check", "audit this project", "is this project well-architected?", "assess security/governor-limit/packageability risk across the project", or wants a holistic code-and-metadata health report. Grades the criteria that are observable from code and metadata (sharing/FLS, bulkification, selective SOQL, trigger-handler separation, legacy tech, packageability) with file:line evidence, and emits a human checklist for governance/process pillars it cannot see (security matrix, BCP, roadmaps, AI governance). Distinct from `dx-code-analyzer-run` (single-tool Code Analyzer scan of Apex) — this skill is a multi-pillar architectural review that orchestrates several analysis skills and maps findings to Well-Architected. Read-only: it grades and advises, never edits.

ユースケース
  • アーキテクチャレビューを実施するとき
  • Well-Architected チェックを実行するとき
  • プロジェクト全体の健全性をレポートするとき
  • セキュリティ・ガバナンスのリスク評価をするとき
  • プロジェクトを監査するとき
本文(日本語訳)

アーキテクチャ分析(Well-Architected レビュー)

Salesforce DX プロジェクトを Salesforce Well-Architected フレームワーク(クラウドシステムの設計原則)に照らして評価し、根拠に基づいた正直なレポートを作成します。コードとメタデータから観察できた項目を柱ごとにスコアリングした表と、ローカルリポジトリでは判定できないガバナンス・プロセス上の課題を人手で確認するためのチェックリストを含みます。

このスキルは**オーケストレータ(複数のツールを統合・調整する中枢)**です。静的解析を自分で実装するのではなく、プラグインに搭載されている既存の分析スキルを呼び出し、その結果を Well-Architected の各柱に割り当てます。読み取り専用で、評価と改善提案はしますが、コード編集・デプロイ・削除は行いません。

また architecture-review エージェント(専用の読み取り専用レビュアー)を支えており、このワークフロー全体を実行します。エージェントを使用して包括的なレビューを実施するか、このスキルを直接使用して現在のセッション内でワークフローを実行します。

機能の使い分け

  1. スキル統合レビュー(このスキル)— 既存のスキル・MCP ツールに処理を委譲して観察可能なチェック項目を実行し、各小柱をスコアリングし、人手チェック項目を出力します。
  2. CLI / grep による直接検索 — 構造的なシグナル(キーワード、レガシー技術ファイル、デプロイ戦略)など、定義に名前が付いている軽量な検索に限定。単体で使用できますが、柱ごとのスコアリングと本スキルが提供するガバナンスチェックリストはスキップされます。
  3. API — 適用外です。

評価基準(まず以下をお読みください)

スコアリングの前に、3 つのリファレンスファイル(評価の根拠)をお読みください:

  • references/well-architected-rubric.md — 柱 → 小柱 → 評価項目の完全なツリー。各項目は [observable](観察可能)または [manual](人手判定)タグが付いています。
  • references/observable-checks.md — 各 [observable] 評価項目が、どのスキル・MCP ツール・grep パターンで検出され、どの悪いパターンが検出されるかを示します。
  • references/manual-review-checklist.md — [manual] 評価項目をガバナンスチェックリストとしてコピペできる形で提供。

ワークフロー

ステップ 1 — プロジェクトの範囲を確定する

# パッケージディレクトリ + API バージョン
cat sfdx-project.json

次の項目を確認します:

  • パッケージディレクトリ(packageDirectories[].path から)— ソースコードの格納場所
  • インベントリ(Apex クラス、トリガ、LWC(Lightning Web Components・カスタム UI コンポーネント)、Aura、フロー、オブジェクトの個数を数える):
    find <pkgdir> -name '*.cls' | wc -l
    find <pkgdir> -name '*.trigger' | wc -l
    find <pkgdir> -name '*.js-meta.xml' | wc -l   # LWC バンドル
    
  • ツール構成シグナル— テスト(*Test.cls, __tests__/)、CI(継続的インテグレーション・.github/workflows/)、リンター(eslintrc*, .prettierrc*)、package.xml 方式 vs ソース/パッケージ方式の戦略があるか
  • 組織接続 — sf org display --json が成功 → OWD(組織全体のデフォルト共有設定)、パーミッションセット(アクセス権限グループ)に関するチェックが利用可能。失敗 → これらは人手判定にマークします

レポートのヘッダーに対象範囲を記録します。

ステップ 2 — 観察可能なチェック項目を実行する(再スキャンせず委譲)

references/observable-checks.md を参照しながら進めます。重い処理は委譲します:

  • Apex のセキュリティ・パフォーマンス → dx-code-analyzer-run:sf code-analyzer を実行し、検出内容を重大度で分類します。ルールを評価基準にマップ:
    • ApexSOQLInjection、ApexCRUDViolation、ApexInsecureEndpoint、ApexBadCrypto → Secure(安全性)
    • ApexSharingViolations → Secure(共有)/ Composable(組み合わせやすさ)(分離)
    • OperationWithLimitsInLoop、OperationWithHighCostInLoop → Reliable(信頼性) / Automated(自動化対応)
    • AvoidDebugStatements → Automated
  • SOQL(Salesforce の query 言語)の解析・抽出度、コンパイル診断 → platform-lsp-integrate(apex_diagnostics、lwc_diagnostics、check_soql_selectivity)を lsp_health が正常なときに使用 → Reliable / Automated
  • OWD・共有モデル・パーミッションセット → platform-metadata-retrieve + sf org 検査。組織が接続されている場合のみ → Secure

軽量な構造シグナルについては直接 grep を使用します(パターンは references/observable-checks.md に記載):

# Secure — 共有キーワードのないクラス
grep -rLE 'with(out)? sharing|inherited sharing' --include='*.cls' <pkgdir>

# Intentional(意図的な使用) — レガシー技術がまだ存在
find <pkgdir> -name '*.workflow-meta.xml' -o -name '*.flowDefinition-meta.xml'
grep -rl '@future' --include='*.cls' <pkgdir>

# Composable — デプロイ戦略
ls manifest/package.xml 2>/dev/null            # package.xml 方式(PoC(概念実証)以降は非推奨)
grep -l '"path"' sfdx-project.json             # ソース/パッケージ方式

# Composable — カスタム設定 vs メタデータ(実行時設定)
find <pkgdir> -path '*objects*' -name '*.object-meta.xml' | xargs grep -l 'CustomSetting' 2>/dev/null

すべての検出結果を ファイル:行番号 の根拠とともに記録します。チェック項目に根拠がない場合、それは合格でも不合格でもなく「観察不可」であり、人手チェックリストに移します。

ステップ 3 — 観察可能な各小柱をスコアリングする

references/observable-checks.md の閾値に従い、小柱ごとに ✅ / ⚠️ / ❌ を割り当てます:

  • ✅ その小柱の観察可能なチェック項目で悪いパターンが見つからない
  • ⚠️ 低~中程度の検出結果、または一部の項目のみ観察可能
  • ❌ 重大度高い検出結果(例:SOQL インジェクション、FLS(Field-Level Security)回避、ループ内での大規模 SOQL)

その後、小柱の判定を柱の判定に集約します(最悪の判定を採用。注記付き)。

ステップ 4 — 人手チェックリストを出力する

references/manual-review-checklist.md から [manual] 項目をレポートにコピーします。チェック対象外のボックスとして、柱ごとにグループ化。セクションを明確に表示:「自動評価外 — チームで確認してください」。推測で埋めないこと。このセクションの目的は、開発者に構造化されたガバナンスチェックリストを提供することで、スコアを偽造することではありません。

ステップ 5 — レポートを作成する

以下の形式を使用した 1 つのレポートを作成します。柱の判定を先頭に置き、その後、観察可能な検出結果(信頼性・セキュリティを優先し、スタイル警告の下に埋めない)、人手チェックリスト、推奨される次のステップ(各修正に適用するスキル名を記載)の順にします。

Well-Architected レビュー — <プロジェクト名>
対象範囲: <パッケージディレクトリ>, <N 個 Apex クラス / M 個トリガ / K 個 LWC>, テスト: <有/無>, CI: <有/無>, 組織: <接続エイリアス / なし>

柱の判定
  🛡️ Trusted(信頼性)     <✅|⚠️|❌>  (Secure …, Compliant …, Reliable …)
  ⚡ Easy(使いやすさ)      <✅|⚠️|❌>  (Intentional …, Automated …, Engaging …)
  🔁 Adaptable(適応性)     <✅|⚠️|❌>  (Resilient …, Composable …)

観察可能な検出結果(コード・メタデータから評価)
  小柱 | 判定 | 検出内容 | 根拠(ファイル:行番号 / ツール)

人手レビュー(自動評価外 — チームで確認してください)
  [ ] <項目>  …

推奨される次のステップ
  - <最優先の修正> → `<スキル>` を使用

事例

事例 1 — 「このプロジェクトは Well-Architected に沿っていますか?」

プロジェクトの範囲を確定し、すべての観察可能なチェック項目を実行(Apex 分析は dx-code-analyzer-run に委譲)し、3 つの柱すべてをスコアリングし、完全な人手チェックリストを出力し、レポートを作成します。これがデフォルトの全体レビューです。

事例 2 — 「プロジェクトのセキュリティとガバナンス制限リスクをレビューしてほしい」

Secure と Reliable/Automated の小柱に範囲を絞ります:セキュリティ・パフォーマンス選択肢で dx-code-analyzer-run を実行し、platform-lsp-integrate の check_soql_selectivity で抽出度を確認し、共有キーワードのないクラスを grep で検索します。これらの小柱をスコアリング。Secure/Compliant の人手項目(セキュリティマトリックス、暗号化戦略)は出力します。別途要望がない限り Adaptable の深掘りはスキップ。

事例 3 — 「リリース前に Well-Architected チェックを実行する」

全体レビュー。Composable(パッケージ化対応度 — メタデータ vs カスタム設定、疎結合、LATEST エイリアス、package.xml 方式デプロイなし)と Resilient(ソース追跡対応、CI、デプロイ失敗なし)を重視。レポートの先頭にパッケージ化対応度の判定を掲載します。

障害時の対応

症状 原因 対応
dx-code-analyzer-run でアナライザーが未インストール Code Analyzer v5 がない レポートに記載。Apex・メタデータの構造チェックは grep で代替。PMD(静的コード解析ツール)のみの項目は「観察不可」とマーク
sf org display 失敗 組織が接続されていない OWD・パーミッションセット・組織メタデータの項目を人手判定にマーク。ファイルベースの項目のみ評価
LSP ツールが lsp_disabled / no_apex_workspace を返す LSP 無効またはワークスペースなし LSP ベースのチェック項目をスキップ。dx-code-analyzer-run + grep で対応。ギャップを記載
sfdx-project.json がない SFDX プロジェクトでない 停止。このスキルは SFDX プロジェクト向けです。開発者に伝えます
大規模なリポジトリでスキャンが遅い 全体 PMD・グラフ構築 dx-code-analyzer-run をパッケージディレクトリに限定。ファイル横断的(sfge)の検出は部分的な可能性を記載

ルール

  • スコアリング前に 3 つの references/*.md ファイルをお読みください — 評価基準がマスタースペックです
  • 観察可能な検出は既存のスキル・MCP ツールに委譲。
原文(English)を表示

Analyzing Architecture (Well-Architected Review)

Grade a Salesforce DX project against the Salesforce Well-Architected framework and produce an honest, evidence-backed report: a pillar-scored table for what's observable in code and metadata, plus a human checklist for the governance/process concerns a local repo can't reveal.

This skill is an orchestrator. It does not re-implement static analysis — it drives the analysis skills the plugin already ships and maps their output onto the Well-Architected pillars. It is read-only: it grades and recommends; it never edits, deploys, or deletes.

It also backs the architecture-review agent, which runs this exact workflow as a dedicated read-only reviewer. Invoke the agent for an end-to-end review; use this skill directly when you want the workflow inline in the current session.

Capability resolution

  1. Skill-orchestrated review (this skill) — runs the observable checks by delegating to existing skills/MCP tools, scores each sub-pillar, and emits the manual checklist.
  2. Direct CLI / grep — used only for the lightweight structural signals the rubric names (sharing keywords, legacy-tech file types, deploy strategy). Fine standalone, but skips the pillar scoring and the governance checklist this skill provides.
  3. API — not applicable.

The rubric (read these first)

Before scoring, read the three reference files — they are the source of truth:

  • references/well-architected-rubric.md — the full pillar → sub-pillar → criteria tree, each criterion tagged [observable] or [manual].
  • references/observable-checks.md — each [observable] criterion mapped to its detection (skill / MCP tool / grep pattern) and the anti-pattern it flags.
  • references/manual-review-checklist.md — the [manual] criteria as a copy-pasteable governance checklist.

Workflow

Step 1 — Scope the project

# Package directories + API version
cat sfdx-project.json

Establish:

  • Package dirs (from packageDirectories[].path) — where the source lives.
  • Inventory — count Apex classes, triggers, LWC bundles, Aura, Flows, objects:
    find <pkgdir> -name '*.cls' | wc -l
    find <pkgdir> -name '*.trigger' | wc -l
    find <pkgdir> -name '*.js-meta.xml' | wc -l   # LWC bundles
    
  • Tooling signals — does the repo have tests (*Test.cls, __tests__/), CI (.github/workflows/), linting (.eslintrc*, .prettierrc*), a package.xml vs source/package strategy?
  • Org connection — sf org display --json succeeds → org-dependent checks (OWD, permission sets) are in play; otherwise mark them manual.

Record the scope line for the report header.

Step 2 — Run the observable checks (delegate; don't re-scan)

Work through references/observable-checks.md. For the heavy lifting, delegate:

  • Apex security + performance → dx-code-analyzer-run. It runs sf code-analyzer and classifies findings by severity. Map its rules onto the rubric:
    • ApexSOQLInjection, ApexCRUDViolation, ApexInsecureEndpoint, ApexBadCrypto → Secure
    • ApexSharingViolations → Secure (sharing) / Composable (separation)
    • OperationWithLimitsInLoop, OperationWithHighCostInLoop → Reliable / Automated
    • AvoidDebugStatements → Automated
  • Inline SOQL parse + selectivity, compile-level diagnostics → platform-lsp-integrate (apex_diagnostics, lwc_diagnostics, check_soql_selectivity) when lsp_health is green → Reliable / Automated.
  • OWD / sharing model / permission sets → platform-metadata-retrieve + sf org inspection, only if an org is connected → Secure.

For the lightweight structural signals, grep directly (patterns in references/observable-checks.md), e.g.:

# Secure — classes missing a sharing keyword
grep -rLE 'with(out)? sharing|inherited sharing' --include='*.cls' <pkgdir>

# Intentional — legacy tech still present
find <pkgdir> -name '*.workflow-meta.xml' -o -name '*.flowDefinition-meta.xml'
grep -rl '@future' --include='*.cls' <pkgdir>

# Composable — deploy strategy
ls manifest/package.xml 2>/dev/null            # package.xml-driven (anti-pattern past PoC)
grep -l '"path"' sfdx-project.json             # source/package strategy

# Composable — runtime config in custom settings vs CMT
find <pkgdir> -path '*objects*' -name '*.object-meta.xml' | xargs grep -l 'CustomSetting' 2>/dev/null

Collect every finding with file:line evidence. A check with no evidence is not a pass and not a fail — it's "not observable" and moves to the manual checklist.

Step 3 — Score each observable sub-pillar

Assign ✅ / ⚠️ / ❌ per sub-pillar using the thresholds in references/observable-checks.md:

  • ✅ no anti-patterns found in the observable checks for that sub-pillar.
  • ⚠️ low/moderate findings, or only some criteria observable.
  • ❌ critical/high findings (e.g. SOQL injection, FLS bypass, SOQL-in-loop at scale).

Then roll the sub-pillar verdicts up to a pillar verdict (worst-of, with a note).

Step 4 — Emit the manual checklist

Copy the [manual] criteria from references/manual-review-checklist.md into the report as unchecked items, grouped by pillar. Label the section clearly: "not auto-graded — assess with your team." Do not guess at these; the point is to hand the developer a structured governance checklist, not to fake a score.

Step 5 — Report

Produce one report using the format below. Lead with pillar verdicts, then observable findings (Trusted/Secure first — never bury security under style), then the manual checklist, then recommended next steps that name the skill which would apply each fix.

Well-Architected Review — <project name>
Scope: <pkg dirs>, <N classes / M triggers / K LWC>, tests: <y/n>, CI: <y/n>, org: <connected alias / none>

PILLAR VERDICTS
  🛡️ Trusted     <✅|⚠️|❌>  (Secure …, Compliant …, Reliable …)
  ⚡ Easy         <✅|⚠️|❌>  (Intentional …, Automated …, Engaging …)
  🔁 Adaptable    <✅|⚠️|❌>  (Resilient …, Composable …)

OBSERVABLE FINDINGS  (graded from code + metadata)
  Sub-pillar | Verdict | Finding | Evidence (file:line / tool)

MANUAL REVIEW  (not auto-graded — assess with your team)
  [ ] <item>  …

RECOMMENDED NEXT STEPS
  - <highest-signal fix> → via `<skill>`

Examples

Example 1 — "Is this project well-architected?"

Scope the project, run all observable checks (delegating Apex analysis to dx-code-analyzer-run), score all three pillars, emit the full manual checklist, and report. This is the default full review.

Example 2 — "Review my project's security and governor-limit risk"

Narrow to the Secure and Reliable/Automated sub-pillars: run dx-code-analyzer-run with a security + performance selector, use platform-lsp-integrate check_soql_selectivity for selectivity, grep for missing sharing keywords. Score those sub-pillars; still emit the Secure/Compliant manual items (security matrix, encryption strategy). Skip the Adaptable deep-dive unless asked.

Example 3 — "Run a Well-Architected check before we package this for release"

Full review, weighting Composable (packageability — CMT vs custom settings, loose coupling, LATEST aliasing, no package.xml-driven deploys) and Resilient (source-tracked, CI, no failed deploys). Lead the report with the packageability readiness verdict.

Failure modes

Symptom Cause Recovery
dx-code-analyzer-run reports the analyzer isn't installed Code Analyzer v5 missing Note it in the report; fall back to grep-based structural checks for Apex and mark PMD-only criteria "not observable".
sf org display fails No org connected Mark OWD / permission-set / org-metadata criteria as manual; grade only file-based criteria.
LSP tools return lsp_disabled / no_apex_workspace LSP off or no workspace Skip the LSP-grounded checks; rely on dx-code-analyzer-run + grep. Note the gap.
No sfdx-project.json Not an SFDX project Stop — this skill reviews SFDX projects. Tell the developer.
Huge repo, scan is slow Project-wide PMD + graph build Scope dx-code-analyzer-run to the package dir; note that cross-file (sfge) findings may be partial.

Rules

  • Read the three references/*.md files before scoring — the rubric is the source of truth.
  • Delegate observable detection to existing skills/MCP tools; grep only for the lightweight structural signals the rubric names.
  • Every observable finding carries file:line (or tool-result) evidence. No evidence → manual checklist, not the scored table.
  • Never score a [manual] governance criterion from inference — list it for human review.
  • Read-only: recommend fixes and name the skill that applies them (platform-apex-generate for Apex authoring / trigger refactoring); never edit, deploy, or delete.
  • Lead with Trusted/Secure findings; don't bury security under style nits.
  • Surface zero-finding sub-pillars briefly ("no issues found in observable checks") rather than omitting them.

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。