Fix Vulnerability logo

Fix Vulnerability

OrganizationPopular
lightdash
fix-vulnerability

Fix a Snyk vulnerability PR by regenerating the pnpm lockfile, checking changelogs for breaking changes, and posting findings as a PR comment. Use when asked to fix a vulnerability PR or handle a Snyk dependency upgrade.

Overview

Publisherlightdash
Repositorylightdash
Skill namefix-vulnerability
Stars
6.2K
Forks
790
Bundled files
Instructions only
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 lightdash on GitHub. Read the source before you install it.

Installation

Install the Fix Vulnerability 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/lightdash/lightdash/tree/main/.claude/skills/fix-vulnerability
  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/lightdash/lightdash.git /tmp/lightdash
mkdir -p .claude/skills
cp -r /tmp/lightdash/.claude/skills/fix-vulnerability .claude/skills/fix-vulnerability
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Fix Vulnerability 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 Fix Vulnerability 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 Fix Vulnerability 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.

Fix Vulnerability PR

Process a Snyk (or similar) dependency upgrade PR: rename the PR, regenerate the lockfile, analyze changelogs for breaking changes, and post a summary comment.

The user must provide a PR URL or number as $ARGUMENTS. If not provided, ask for it.

Step 1: Fetch PR details

Extract the PR number from the argument and fetch the PR diff to understand what changed:

bash
# Get PR metadata
gh pr view <PR_NUMBER> --json number,title,body,headRefName,baseRefName

# Get the diff to see which dependencies changed
gh pr diff <PR_NUMBER>

Parse the diff to identify:

  • Which packages were upgraded (package name, old version, new version)
  • Which package.json files were modified
  • Whether the lockfile (pnpm-lock.yaml) is included or missing

Report the list of dependency changes to the user before proceeding.

Step 2: Rename the PR

Replace the Snyk-generated title with a descriptive one following conventional commit format:

bash
gh pr edit <PR_NUMBER> --title "fix: upgrade <package1> <oldVersion>→<newVersion> and <package2> <oldVersion>→<newVersion>"

Also update the PR description to append test trigger keywords so all test suites run on the next push:

bash
# Get current body, append test keywords
CURRENT_BODY=$(gh pr view <PR_NUMBER> --json body -q '.body')
gh pr edit <PR_NUMBER> --body "${CURRENT_BODY}

test-frontend test-backend test-cli"

Rules for the title:

  • Use fix: prefix (these are vulnerability fixes)
  • List all upgraded packages with their version ranges
  • If there are more than 3 packages, summarize: fix: upgrade 5 dependencies (security)
  • Keep it under 72 characters when possible

Step 3: Checkout the PR branch and regenerate lockfile

bash
# Fetch and checkout the PR branch
gh pr checkout <PR_NUMBER>

# Install dependencies to regenerate the lockfile (sfw blocks known-malicious packages)
# Requires `npm i -g sfw` to be installed globally once per machine.
sfw pnpm install

# Check if the lockfile was modified
git status pnpm-lock.yaml

If pnpm-lock.yaml was modified, stage and commit it:

bash
git add pnpm-lock.yaml
git commit -m "chore: regenerate pnpm-lock.yaml

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>"

Then push the changes:

bash
git push

Step 4: Analyze changelogs for breaking changes

For each upgraded dependency identified in Step 1:

  1. Fetch the changelog or release notes — try these sources in order: a. GitHub releases page: https://github.com/<owner>/<repo>/releases b. CHANGELOG.md in the repo: https://raw.githubusercontent.com/<owner>/<repo>/main/CHANGELOG.md c. npm page: https://www.npmjs.com/package/<package-name> d. Web search as a last resort: "<package-name> changelog <old-version> <new-version>"

  2. Identify the package's GitHub repo from the PR body (Snyk usually includes repo links) or from npm registry metadata:

    bash
    npm view <package-name> repository.url
  3. Review changes between the old and new versions. Focus on:

    • Breaking changes or deprecations
    • API changes that could affect our code
    • Major behavioral changes
    • Security advisories and CVE details
  4. Search our codebase for usage of each upgraded package to assess impact:

    bash
    # Check how we import/use the package

    Use Grep to search for imports and usage patterns of each package across the codebase.

  5. Assess risk for each dependency:

    • No risk: Patch version bump, no breaking changes, minimal usage in our code
    • Low risk: Minor version bump, no breaking changes in APIs we use
    • Medium risk: Breaking changes exist but don't affect our usage patterns
    • High risk: Breaking changes directly affect how we use the package

Step 5: Post PR comment with findings

Post a comment on the PR summarizing your analysis using gh pr comment:

bash
gh pr comment <PR_NUMBER> --body "$(cat <<'EOF'
## Vulnerability Fix Analysis

### Lockfile
[✅ Regenerated and pushed / ℹ️ Already up to date]

### Dependency Changes

| Package | Old Version | New Version | Risk | Notes |
|---------|------------|-------------|------|-------|
| package-name | x.y.z | a.b.c | 🟢 No risk / 🟡 Low / 🟠 Medium / 🔴 High | Brief explanation |

### Breaking Changes Analysis

[For each dependency with notable changes, provide a brief summary]

#### `package-name` (x.y.z → a.b.c)
- **Changelog**: [link to changelog/releases]
- **Breaking changes**: [None / List of breaking changes]
- **Our usage**: [How we use this package, with file paths]
- **Impact**: [Assessment of whether breaking changes affect us]

### Recommendation
[Overall assessment: safe to merge, needs code changes, needs manual testing, etc.]

---
🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"

Adapt the comment content based on your actual findings. Be concise but thorough. If there are breaking changes that affect our code, clearly list what needs to change.

Step 6: Return to original branch

After posting the comment, switch back to the original branch:

bash
git checkout main

Notes

  • If pnpm install fails, report the error — it likely means the version bump introduced an incompatibility
  • For monorepo packages (e.g., @types/*), check if the type changes affect our code
  • Snyk PRs typically include CVE details in the PR body — reference these in your analysis
  • If a dependency has many transitive dependents, note this as it increases risk surface
  • Do NOT approve or merge the PR — only analyze and comment

Frequently asked questions

What does the Fix Vulnerability AI skill do?

Fix a Snyk vulnerability PR by regenerating the pnpm lockfile, checking changelogs for breaking changes, and posting findings as a PR comment. Use when asked to fix a vulnerability PR or handle a Snyk dependency upgrade.

Why use Fix Vulnerability on TypingMind?

Because you install it once and use it with any model. Fix Vulnerability 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 Fix Vulnerability in TypingMind?

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

Which AI models can use Fix Vulnerability?

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 Fix Vulnerability?

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

Is the Fix Vulnerability AI skill free?

It is published on GitHub by lightdash. Check the repository for licensing terms. 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 👇