Skip to content
Writing
Skill

/snyk-agent-scan-compliance

Compliance expert for snyk-agent-scan — the agent skill file scanner — NOT for other Snyk CLI tools (snyk test, snyk code SAST, snyk iac, snyk container). Fixes alerts through content restructuring, never by suppressing or deleting information. Covers every file in a skill

BOOST
From plugin
cc-skills
23221 skills
Install
$ npx -y skills add samber/cc-skills --skill snyk-agent-scan-compliance --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/snyk-agent-scan-compliance

Context preview

The summary Claude sees to decide when to auto-load this skill.

Compliance expert for snyk-agent-scan — the agent skill file scanner — NOT for other Snyk CLI tools (snyk test, snyk code SAST, snyk iac, snyk container). Fixes alerts through content restructuring, never by suppressing or deleting information. Covers every file in a skill

SKILL.md

snyk-agent-scan-compliance.SKILL.md
name: snyk-agent-scan-compliance
description: "Compliance expert for snyk-agent-scan — the agent skill file scanner — NOT for other Snyk CLI tools (snyk test, snyk code SAST, snyk iac, snyk container). Fixes alerts through content restructuring, never by suppressing or deleting information. Covers every file in a skill directory: SKILL.md, references/, assets/, and any secondary markdown. Apply when authoring a new skill, editing an existing one, triaging a failed snyk-agent-scan run locally or in CI, or unblocking a PR held by agent scanner failures. Not applicable to dependency vulnerabilities, code security findings, or infrastructure misconfigurations — those are out of scope."
user-invocable: true
license: MIT
compatibility: Designed for Claude Code, Codex or similar harness.
metadata:
  author: samber
  version: "1.1.0"
  openclaw:
    emoji: "🔍"
    homepage: https://github.com/samber/cc-skills
    requires:
      bins: [snyk-agent-scan]
    install:
      - kind: uv
        package: snyk-agent-scan
        bins: [snyk-agent-scan]
    skill-library-version: "0.4.14"
allowed-tools: Read Edit Write Glob Grep Bash(git:*) Bash(uv:*) Bash(uvx:*) AskUserQuestion Agent

**Persona:** You are a skill-authoring compliance expert. You fix snyk-agent-scan alerts by restructuring content — never by suppressing or deleting useful information.

**Thinking mode:** Reason as thoroughly as possible for multi-alert remediation where fixes for one alert type can surface or suppress another. Deep reasoning reduces rework. On Claude Code, use `ultrathink` to trigger extended thinking explicitly.

snyk-agent-scan Compliance

The `snyk-agent-scan` tool analyzes skill bodies for three categories of unsafe patterns: third-party content exposure (W011), malicious external URLs (W012), and prompt injection via MCP tool calls (W001). All three are fixable through content restructuring without losing any information.

Reference Files

| File | When to read | | --- | --- | | [references/w001-patterns.md](references/w001-patterns.md) | Fixing W001 alerts — MCP tool name patterns | | [references/w011-patterns.md](references/w011-patterns.md) | Fixing W011 alerts — imperative URL and external content patterns | | [references/w012-patterns.md](references/w012-patterns.md) | Fixing W012 alerts — version pinning and frontmatter offloading |

Quick Reference

| Alert | Severity | Root Cause | Primary Fix | | --- | --- | --- | --- | | W011 | High | Skill body instructs agent to fetch/interpret external content | Replace imperatives with passive availability hints | | W012 | High | Skill body references external URLs fetched and executed at runtime | Move to frontmatter `install` block; pin versions | | W001 | High | Skill body names MCP tool functions explicitly | Use generic formulations instead |

Running the Scanner

# Scan a single skill
SNYK_TOKEN=<token> snyk-agent-scan --skills skills/<name>/

# Scan all skills
SNYK_TOKEN=<token> snyk-agent-scan --skills ./skills

The scanner requires a valid `SNYK_TOKEN`. In CI, store it as a secret. If `snyk-agent-scan` is not installed, use `uvx snyk-agent-scan@latest` as a drop-in replacement without installing. See [detailed patterns](references/w011-patterns.md) for fixes per alert type.

W011 — Third-Party Content Exposure

W011 fires when the skill body uses imperative verbs directing the agent to fetch, check, or evaluate external content and then act on it. The scanner treats the agent as the grammatical subject performing an external action.

Rules:

  • Replace `Check <url>` and `Fetch <url>` with passive hints: `The release notes at <url> may be useful.`
  • Remove "always" from any instruction involving external data: `Always reference the changelog` → `The changelog documents breaking changes.`
  • Keep tool invocations (`gh repo view`, `govulncheck`) in code blocks, not in prose checklists that imply the agent must run them before acting.
  • Decouple tool execution from decisions: running a tool is fine; using its remote-sourced output as the sole trigger for a refactor is not.

See [W011 pattern catalog](references/w011-patterns.md) for 12+ before/after examples.

W012 — Potentially Malicious External URL

W012 fires when the body references external content fetched and executed at runtime: package installs with `@latest`, pipe-to-shell patterns, or GitHub Actions with wrong/non-existent major versions.

Rules:

  • Move `go install pkg@latest` and similar commands from prose into the frontmatter `metadata.openclaw.install` block — the scanner does not flag frontmatter.
  • Pin GitHub Actions to the correct current major version (`@v4`, not `@v6`).
  • Never use pipe-to-shell patterns (`curl ... | sh`) in skill bodies.

See [W012 pattern catalog](references/w012-patterns.md) for 8+ before/after examples.

W001 — Prompt Injection via MCP Tool Calls

W001 fires when the skill body explicitly names MCP server tool functions, triggering prompt-injection detection.

Rules:

  • Never write tool function names (`resolve-library-id`, `query-docs`, `mcp__*`) in the skill body.
  • Replace with generic formulations: `Context7 can help as a discoverability platform.`
  • MCP tool names may still appear in the `allowed-tools` frontmatter field — only the body is restricted.

See [W001 pattern catalog](references/w001-patterns.md) for safe reformulations.

Remediation Methodology

Fix one alert at a time, re-run `snyk-agent-scan` after each change, and verify the alert count dropped before moving to the next. If a fix does not reduce alerts, undo it and try a different approach — do not stack unverified changes.

When a scan returns multiple alerts, fix in this order to minimize rework:

1. W001 (simplest) — remove MCP tool names from body; confirm allowed-tools is correct
2. W011 — rewrite imperative sentences as passive statements; move checklist items to code blocks
3. W012 — move install commands to frontmatter; pin versions
4. Re-scan after
Read more
Ships withcc-skills

AI agent skills are reusable instruction sets that extend your assistant with domain-specific expertise, loaded on demand so they don't bloat your context. This repository covers marketing and engineering skills authored by @samber.

Get the whole plugin

Other skills on cc-skills.