Security Fix logo

Security Fix

Community
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.

Overview

Publisherdianyike
Repositoryclaude-code-insights
Skill namesecurity-fix
Stars
69
Forks
13
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by dianyike on GitHub. Read the source before you install it.

Installation

Install the Security Fix AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/dianyike/claude-code-insights/tree/main/examples/security-reviewer/skills/security-fix
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Security Fix in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Security Fix on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Security Fix is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

/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)

Frequently asked questions

What does the Security Fix AI skill do?

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.

Why use Security Fix on TypingMind?

Because you install it once and use it with any model. Security Fix is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Security Fix in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dianyike/claude-code-insights/tree/main/examples/security-reviewer/skills/security-fix. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Security Fix?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Security Fix?

As many as you like. As long as a model supports skills, you can use Security Fix with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Security Fix AI skill free?

Yes. It is published on GitHub by dianyike under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇