sonatype-guide
MUST use before installing, adding, or upgrading any dependency. Trigger when: running pip install, npm install, cargo add, go get, or any package manager command; adding a package to requirements.txt, package.json, pyproject.toml, Cargo.toml, go.mod, pom.xml, build.gradle, or Gemfile; choosing which library to use for a task; upgrading or changing dependency versions; or auditing existing dependencies. Uses the Sonatype Guide MCP server to check vulnerabilities, Developer Trust Scores, license risks, malicious package detection, and policy compliance. Do not install or recommend a dependency without checking it here first.
What this skill does
# Sonatype Guide Workflows ## Critical Rules ### Never Recommend Downgrades When a user provides their current version, **every recommendation must be >= that version**. The MCP returns versions ranked by Developer Trust Score, which can include older versions — filter these out before presenting results. **Only two exceptions exist:** 1. The user explicitly and repeatedly insists on a downgrade after being warned. 2. There is a catastrophic, unpatched vulnerability in all versions >= current (e.g., log4shell-severity with no forward fix), AND an older version is unaffected. Even then, present the downgrade only as a cautious side note, not the primary recommendation, and explain the trade-offs. If neither exception applies, do not mention older versions at all. ### Never Recommend Malicious Components If `malicious: true`, warn the user immediately. Never recommend, never suggest "with caution" — there is no safe use of a malicious package. --- ## PURL Format All tools accept Package URLs. Format: `pkg:<type>/<namespace>/<name>@<version>` | Ecosystem | Format | Example | |---|---|---| | Maven | `pkg:maven/<groupId>/<artifactId>@<version>` | `pkg:maven/org.apache.logging.log4j/[email protected]` | | NPM | `pkg:npm/<name>@<version>` | `pkg:npm/[email protected]` | | PyPI | `pkg:pypi/<name>@<version>` | `pkg:pypi/[email protected]` | | NuGet | `pkg:nuget/<name>@<version>` | `pkg:nuget/[email protected]` | | Go | `pkg:golang/<module>@<version>` | `pkg:golang/github.com/gin-gonic/[email protected]` | For scoped NPM packages, Cargo, RubyGems, and other ecosystems see [references/purl-ecosystems.md](references/purl-ecosystems.md). --- ## Tools Three MCP tools available via `sonatype-guide`. All accept arrays of up to 20 PURLs. - **sonatype-guide:getComponentVersion** — Analyze a specific version. Returns CVEs with CVSS scores, licenses, malicious flag, end-of-life status, and policy compliance results. - **sonatype-guide:getLatestComponentVersion** — Find the newest version. Version in PURL is optional. - **sonatype-guide:getRecommendedComponentVersions** — Ranked upgrade recommendations with Developer Trust Scores, breaking change counts, and vulnerable method signatures. Omit version for new component picks; include version for upgrade recommendations. If an MCP call fails or returns unexpected data, tell the user the check could not be completed and suggest they verify manually. Do not silently skip the check or assume the component is safe. --- ## Interpreting Results ### Developer Trust Score Sonatype's proprietary quality metric (0-100) factoring security, license compliance, quality, and maintainability. | Range | Action | |---|---| | 90+ | Safe for production | | 80-89 | Generally safe, minor issues | | 70-79 | Upgrade recommended | | Below 70 | Upgrade urgently | ### CVSS Severity Use standard NVD CVSS v3.x severity ratings. Treat Critical (9.0+) and High (7.0+) as actionable — always highlight these in output. ### Vulnerabilities `getComponentVersion` returns a `vulnerabilities` object with a flat `cves` array: ``` vulnerabilities: { cves: [ { id: "CVE-2021-44228", cvssScore: 10.0 }, { id: "CVE-2021-45046", cvssScore: 9.0 }, ... ] } ``` The API does **not** distinguish between direct and transitive vulnerabilities — all CVEs are returned in a single list. Present them sorted by CVSS score (highest first). When reporting, state the total CVE count and highlight any with CVSS >= 7.0. ### Policy Compliance `getComponentVersion` returns a `policyCompliance` object indicating whether the component passes organizational policies: ``` policyCompliance: { compliant: true/false, conditions: [ { conditionId: "cvss-threshold", conditionName: "CVSS < 7.0", passing: true/false }, { conditionId: "license-threat-group", conditionName: "No Copyleft Licenses", passing: true/false }, { conditionId: "malware", conditionName: "No Malware", passing: true/false } ] } ``` Surface this in audit and evaluation workflows — it gives users a quick pass/fail for enterprise governance. When `compliant: false`, call out which specific conditions failed. ### Flags and Sentinels - `malicious: true` — Supply chain attack. Do NOT use. Warn immediately. - `endOfLife: true` — No longer maintained. Plan migration. - `licenseThreatLevels` — Map of license to threat score. 0 = no concern. Higher = more restrictive. - `catalogDate` — Epoch milliseconds when the version was cataloged. Ignore unless the user specifically asks about it. ### Null, Empty, and Zero Values These have distinct meanings — do not conflate them: | Field | `null` | `"0"` or `0` | `[]` empty array | |---|---|---|---| | `breakingChangesCount` | **Not analyzed** — unknown risk, do NOT say "no breaking changes" | Analyzed, confirmed no breaking changes | N/A | | `vulnerableMethods` | Not checked | N/A | Checked, none found | | `vulnerableMethods[].methodSignatures` | N/A | N/A | CVE confirmed but specific affected methods not yet mapped | When `breakingChangesCount` is `null`, tell the user: "Breaking changes have not been analyzed for this upgrade path — review the changelog before upgrading." --- ## Version Recommendation Logic When recommending versions from `getRecommendedComponentVersions` results: 1. **Filter out downgrades.** Remove any `toVersion` where the version is lower than `fromVersion`. 2. **Prefer the user's current major version.** Default recommendation should be the highest-scoring version within the same major version line. 3. **Present major version upgrades separately.** If a higher major version scores better, mention it as a secondary option with clear warnings about breaking changes. 4. **When `breakingChangesCount` is `null` for a major version jump**, explicitly warn that breaking change analysis is unavailable and recommend reviewing the migration guide. **Example prioritization** for a user on [email protected]: - Primary: best 4.x version (e.g., 4.22.1 — same major, lower migration risk) - Secondary: best 5.x version (e.g., 5.1.0 — higher major, may have better security posture but requires migration effort) --- ## Workflow 1: Evaluate Before Adding **Trigger**: Adding a new dependency, asking "is X safe", or choosing a version. 1. Build the PURL (version optional). 2. Call `sonatype-guide:getRecommendedComponentVersions`. 3. If the top result scores 90+ with no CVEs, recommend it. 4. If it has issues, call `sonatype-guide:getComponentVersion` for full details including policy compliance, and present trade-offs. 5. Always check `malicious` and `endOfLife`. **Output**: ``` | Version | Trust Score | CVEs | Critical/High | License | Policy | |---------|-------------|------|---------------|---------|--------| | x.y.z | 99 | 0 | 0 | MIT | Pass | Recommendation: ... ``` --- ## Workflow 2: Upgrade Advisor **Trigger**: Upgrading a dependency, asking "should I upgrade X", or responding to a known vulnerability. 1. Build the PURL with the current version. 2. Call `sonatype-guide:getRecommendedComponentVersions`. 3. **Filter out any version older than the current one.** 4. Compare `fromVersion` (current) against remaining `toVersions`. 5. Group recommendations: same-major first, then cross-major. 6. For the top 2-3 recommendations, highlight Trust Score delta, CVEs resolved, breaking changes, and any new issues. 7. If `vulnerableMethods` data exists for the current version, mention affected methods to help assess exposure. **Output**: ``` Current: <package>@<version> (Trust Score: X, CVEs: N, Critical/High: M) Recommended (same major): 1. <version> (Trust Score: Y) — <rationale> Also available (major upgrade): 2. <version> (Trust Score: Z) — <rationale, breaking change warning> Breaking changes to review: N (or "not analyzed — review changelog") ``` --- ## Workflow 3: Project Audit **Trigger**: "Audit dependencies", "check for vulnerabilities", "scan for security issues", or depende
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.