Security Fixのロゴ

Security Fix

コミュニティ
dianyike
security-fix

Fix vulnerabilities identified by /security:review using the Fix-Verify Loop. Use when: user says "fix security findings", "remediate vulnerabilities", or invokes /security:fix with a report path. Requires an existing security review report as input. Modifies source code — explicit opt-in only.

Add to TypingMind

概要

公開者dianyike
リポジトリclaude-code-insights
スキル名security-fix
スター
69
フォーク
13
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    dianyikeがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Security Fix」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/dianyike/claude-code-insights/tree/main/examples/security-reviewer/skills/security-fix
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dianyike/claude-code-insights.git /tmp/claude-code-insights
mkdir -p .claude/skills
cp -r /tmp/claude-code-insights/examples/security-reviewer/skills/security-fix .claude/skills/security-fix
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでSecurity Fixを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にSecurity Fixを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Security Fixは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

/security:fix — Opt-In Security Remediation

Fix vulnerabilities identified in a /security:review report using the convergence-hardened Fix-Verify Loop (Section 4 of security-review-protocol).

This command modifies source code — it is never auto-triggered.

Why This Runs in Main Conversation (Not a Subagent)

Fix-verify requires:

  • User confirmation before each fix (prediction block approval)
  • Visible intermediate state (prediction vs actual comparison)
  • Full review context (findings, Codex threadId, code patterns from the report)

Delegating to a subagent would create a "telephone game" (handoff loses context fidelity) and hide the confirmation flow in a black box. Per our subagent best practices: split by context boundaries, not by roles.

Command Syntax

/security:fix <report> [options]
  <report>                     # Required: path to a security review report
  --finding <id>               # Fix only a specific finding (e.g., F-003).
                               # Note: if this finding shares a root-cause cluster
                               # with other findings, only this finding is fixed —
                               # sibling findings are skipped. The root cause may
                               # remain partially addressed.
  --deep                       # Enable round 3 of fix-verify (default: 2 rounds)
  --dry-run                    # Show fix plan without modifying files
  --yes                        # Skip per-fix confirmation prompts

Typical Workflow

1. /security:review                    # Read-only audit → produces report
2. (User reviews report)
3. /security:fix .agents-output/security/2026-03-31-auth-security-review.md
   # Or target a specific finding:
   /security:fix .agents-output/security/2026-03-31-auth-security-review.md --finding F-003

Execution

1. Parse Report

  1. Read the security review report at <report> path
  2. Extract confirmed findings (confidence >= 50%) in normalized format
  3. If --finding <id> specified, filter to that finding only
  4. If no fixable findings exist, report "Nothing to fix" and exit
  5. Extract the Codex threadId from the report (if available) for session continuity

2. Triage

Group findings by root-cause cluster. A single root cause may manifest across multiple call sites. Order clusters by severity (CRITICAL first, then HIGH, then MEDIUM).

3. Fix-Verify Loop (Per Cluster)

For each root-cause cluster, execute Section 4 of the security-review-protocol skill (4.1 through 4.7). The protocol defines the full logic — do not deviate from it.

Additional constraint for this command: Before applying each fix (after writing the prediction block per 4.2), display the prediction summary and wait for user confirmation. Skip this gate only if --yes was passed. The protocol itself does not enforce this gate — it's a command-level safety layer because /security:fix runs in the main conversation where user interaction is possible.

4. Record Results

Append the ## Fix-Verify Hypothesis Log to the original security review report per Section 4.6 of the protocol.

Dry-Run Mode

When --dry-run is specified:

  1. Parse report and triage findings as normal
  2. For each cluster, identify the fix strategy (canonical or Codex-proposed)
  3. Write the prediction block
  4. Display the plan: which files would be modified, what changes would be made
  5. Do NOT apply any changes or modify any files

User Confirmation Flow

By default, before each fix is applied:

  1. Display the prediction block summary (root cause, files to modify, expected outcome)
  2. Wait for user approval
  3. If denied, skip this finding and move to the next

With --yes, skip confirmation prompts (use for trusted canonical fixes).

Round Caps

ModeMax RoundsWhen to Use
Default2Covers ~90% of issues, low hypothesis drift risk
--deep3CRITICAL findings, Round 3 uses fresh Codex session

Related Commands

  • /security:review — Run the read-only audit that produces the report this command consumes
  • /security:status — Check background review job status

Completion Criteria

  • Report parsed and fixable findings extracted
  • Each root-cause cluster processed through protocol Section 4
  • User confirmed (or --yes skipped) every applied fix
  • Semgrep re-scan passed after each fix (per Section 4.3)
  • Hypothesis Ledger appended to original report
  • Final summary: N fixed / N total, files modified, escalations

Gotchas

  • The report path must point to an existing .agents-output/security/*.md file — the skill parses its structured format (Executive Summary, findings sections). Arbitrary markdown files will fail silently or extract zero findings
  • If the original review's Codex threadId is not in the report, fix-verify starts a fresh Codex session. This means Round 1 loses the context continuity advantage — consider re-running /security:review first if the report is old
  • --dry-run still calls Codex to get fix proposals (read-only) — it costs tokens even though no files are modified. The savings are only in skipping the apply+verify cycle
  • --yes bypasses the user confirmation gate entirely. Only safe for well-understood canonical fixes (CWE-89, CWE-79, etc.). For Codex-proposed fixes, always let the user review the prediction block
  • When --finding <id> targets a finding that shares a root-cause cluster with other findings, only the specified finding is fixed — sibling findings in the same cluster are skipped. This may leave the root cause partially addressed
  • Protocol Section 4 has its own gotchas (absolute paths, Codex hallucination, threadId management) — refer to security-review-protocol Section 5
  • Iterate this section: After each real usage, append new gotchas here

What This Command Does NOT Do

  • Does not re-run the full security audit (use /security:review for that)
  • Does not auto-trigger from gates or hooks
  • Does not fix findings below 50% confidence (those are escalated to human)
  • Does not delegate to a subagent (runs in main conversation for user visibility)

よくある質問

AIスキル「Security Fix」では何ができますか?

Fix vulnerabilities identified by /security:review using the Fix-Verify Loop. Use when: user says "fix security findings", "remediate vulnerabilities", or invokes /security:fix with a report path. Requires an existing security review report as input. Modifies source code — explicit opt-in only.

TypingMindでSecurity Fixを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Security Fixはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにSecurity Fixをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/dianyike/claude-code-insights/tree/main/examples/security-reviewer/skills/security-fixを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Security Fixを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Security Fixで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもSecurity Fixを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Security Fix」は無料ですか?

はい。dianyikeがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇