Skills Agentes

Socket Inspect

Investiga un paquete antes de depender de él: extrae señales de Socket (scores, alertas, malware, CVEs, riesgo de cadena de suministro), revisa socket.dev, evalúa alternativas y muestra parches disponibles.

Oficial
Estrellas
3

en todo el repo

Actividad
58

0–100, la ruta de este skill

Actualizado
hace 24 días

último commit aquí

Commits
2

últimos 90 días

Contexto
3.5k tok

58 tok en reposo

Paquete
1 archivo

13 KB

Instalar

Funciona con cualquier agente que lea SKILL.md

npx -y skills add SocketDev/sauce --skill socket-inspect --agent claude-code

Se instala solo en este repositorio.

Este skill makes network requests, needs API credentials.

Qué hace

  • Consulta la API Batch PURL de Socket para obtener puntuaciones, alertas, CVEs y metadatos de un paquete
  • Revisa la página de socket.dev del paquete con WebFetch para contexto adicional
  • Evalúa el riesgo de la cadena de suministro en cinco dimensiones: malware, vulnerabilidades, árbol de dependencias, mantenimiento y confianza del autor
  • Busca y compara alternativas cuando el paquete tiene problemas graves o score bajo
  • Comprueba si existen parches de Socket disponibles para el paquete

Úsalo cuando

  • Antes de instalar un paquete nuevo
  • Para investigar una dependencia marcada en un escaneo
  • Para comprobar el estado de seguridad, calidad o mantenimiento de un paquete
  • Para comparar alternativas a una dependencia o comprobar si hay parches de Socket disponibles

No lo uses cuando

    Qué lo activa

    Di cualquiera de estas frases y el agente debería cargar este skill.

    • “Investiga el paquete lodash@4.17.21 antes de añadirlo”
    • “¿Es seguro este paquete que salió marcado en el escaneo?”
    • “Compárame alternativas a este paquete npm”
    • “¿Tiene Socket algún parche disponible para esta dependencia vulnerable?”

    SKILL.md

    En inglés

    Research Inspect

    Research a package before you depend on it. This skill pulls every available signal from Socket - scores, alerts, malware verdicts, CVEs, and supply-chain risk indicators - checks the socket.dev package page for additional context, evaluates alternatives when warranted, and surfaces available Socket patches. Use it to make an informed decision before adding, keeping, or replacing any dependency.

    When to Use

    • Evaluate a package before installing it
    • Investigate a flagged dependency from a scan
    • Check the security, quality, or maintenance status of a package
    • Compare alternatives for a dependency choice
    • Check if a package is malware
    • Check if Socket has patches available for a vulnerable package
    • Get a comprehensive supply-chain risk report

    Prerequisites

    Socket CLI Setup

    Use pnpm dlx socket to run the Socket CLI - this always fetches the latest version and requires no global install. Verify it works:

    pnpm dlx socket --version
    

    All commands in this skill use the pnpm dlx socket prefix (e.g., pnpm dlx socket scan create ...).

    Account authentication and optional global install

    Optional global install: If you prefer a global socket command, install with npm install -g socket@latest (must be version 1.0.0 or higher).

    Authentication

    Commands that require authentication need a Socket account and a credential that you own. Create an account at https://socket.dev if you do not have one.

    Authenticate with one of these methods:

    • Interactive login: the user runs pnpm dlx socket login in their own terminal (it needs an interactive TTY, so the agent cannot run it). CLI releases with browser login show a device code to approve in the browser; older releases, including the current npm release, prompt for an API token. The /socket-connect skill covers signing in and choosing organizations.
    • Environment variable (CI): Set SOCKET_CLI_API_TOKEN to an organization API token in CI or other non-interactive environments

    Verify account authentication:

    pnpm dlx socket organization list
    

    If you do not want an account, leave authentication unconfigured. Commands that require authentication remain unavailable. Do not print or share credential values to verify setup.

    If authentication fails or the CLI is not installed, use the /socket-setup skill for detailed guidance including Node.js installation, PATH troubleshooting, and CI/CD token configuration.

    Prefer the Socket MCP tools when connected: if a Socket MCP depscore tool is available (installed by /socket-connect, signed in through the browser), use it for package scores instead of the Batch PURL API. It needs no API key. Use the organizations tool to find the org_slug for org-scoped tools such as alerts.

    For the Batch PURL API: SOCKET_SECURITY_API_KEY is required for direct API calls. Users with a free or enterprise account can create an API key at https://socket.dev/dashboard/org/{ORG}/settings/integrations/api-tokens.

    Step 1 - Fetch Package Data via the Socket Batch PURL API

    Query the Socket Batch PURL REST API with the package's PURL (Package URL) to retrieve scores, alerts, CVEs, and metadata.

    Supported ecosystems: npm, pypi, go, maven, nuget, rubygems, cargo

    The curl call, its auth requirements, and every field to extract

    API call:

    curl -X POST https://api.socket.dev/v0/orgs/{org_slug}/purl \
      -H "Authorization: Bearer $SOCKET_SECURITY_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"purls": ["pkg:<ecosystem>/<name>@<version>"]}'
    

    Note: This endpoint requires org access and a SOCKET_SECURITY_API_KEY. The old /v0/purl endpoint is deprecated (returns empty results since Jan 2026).

    Warning: The Batch PURL API may be intermittently unavailable (returns 401 or empty responses). If the API call fails, use the CLI fallback in Step 1b below.

    For example, to inspect lodash@4.17.21 on npm:

    curl -X POST https://api.socket.dev/v0/orgs/{org_slug}/purl \
      -H "Authorization: Bearer $SOCKET_SECURITY_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"purls": ["pkg:npm/lodash@4.17.21"]}'
    

    If SOCKET_SECURITY_API_KEY is not set, use the Socket MCP tools from /socket-connect (browser sign-in, no key) or the CLI fallback in Step 1b. Do not ask the user to paste a key into the chat.

    Extract all returned data:

    • Overall score and category scores (security, quality, maintenance, license)
    • Alerts (every alert, grouped by category)
    • Known vulnerabilities (CVEs) with severity and fix versions
    • Dependency counts (direct and transitive)
    • Maintainer and author information
    • License identifier

    Step 1b - CLI Fallback

    If the Batch PURL API is unavailable or returns an error, fall back to the CLI:

    pnpm dlx socket package score <ecosystem> <name> <version>
    

    This returns score data without requiring SOCKET_SECURITY_API_KEY.

    Step 2 - Check the socket.dev Package Page

    Construct the package URL:

    https://socket.dev/{ecosystem}/package/{name}/overview
    

    For scoped npm packages (e.g. @scope/name), encode the scope:

    https://socket.dev/npm/package/@scope/name/overview
    

    Use WebFetch to visit the page and extract:

    • Score breakdown across all categories
    • Full alert list with descriptions
    • Dependency graph summary
    • Any additional context not present in the API response

    Note: The socket.dev package page may be blocked by Cloudflare bot protection when accessed via WebFetch. The page URL should still be provided to the user as a manual link, but cannot be relied on as a programmatic data source.

    If WebFetch is unavailable or fails (including due to bot protection), note that the report is based on API data only and include the URL so the user can check manually.

    Step 3 - Evaluate Supply Chain Risk

    Analyze the package across five dimensions. Always check malware first.

    Each dimension draws from different data sources:

    • 3a. Malware - Batch PURL API alerts + socket.dev package page (WebFetch)
    • 3b. Vulnerabilities - Batch PURL API CVE data
    • 3c. Dependency Tree - Batch PURL API dependency counts + socket.dev page (WebFetch)
    • 3d. Maintenance Health - socket.dev package page (WebFetch) + GitHub API (for commit activity and issue counts)
    • 3e. Author & Maintainer Trust - Batch PURL API maintainer data + socket.dev page (WebFetch)

    3a. Malware (CHECK FIRST)

    If the package is flagged as malware, STOP and report immediately with a prominent warning. Do not continue to other dimensions until the malware finding is clearly communicated.

    Check for:

    • Explicit malware flags in Socket alerts
    • Suspicious install scripts (preinstall, postinstall)
    • Obfuscated or minified source code with no readable original
    • Unexpected network access, filesystem access, or shell execution
    • Data exfiltration patterns

    If malware is detected, the warning MUST be the first thing in the output.

    3b. Vulnerabilities

    • List all known CVEs with severity, affected version ranges, and whether a fix is available
    • Count by severity: critical, high, medium, low
    • Highlight any unpatched (no fix available) vulnerabilities
    • Note if vulnerabilities exist in transitive dependencies

    3c. Dependency Tree

    • Report direct and transitive dependency counts
    • Flag if the package has more than 100 transitive dependencies
    • Flag unusual tree depth
    • Note any flagged or problematic transitive dependencies
    • Consider whether the dependency footprint is proportional to the package's functionality

    3d. Maintenance Health

    • Last publish date and release cadence
    • Commit frequency and recent activity
    • Open issues and pull requests (ratio of open to closed)
    • Number of contributors and maintainers
    • Flag as potentially unmaintained if no publish in the last 12 months
    • Flag as potentially abandoned if no commits in the last 24 months

    3e. Author & Maintainer Trust

    • Number of maintainers (flag if single maintainer for a widely-used package)
    • Recent ownership or maintainer changes
    • Typosquatting signals (name similarity to popular packages)
    • Whether maintainers publish other well-known packages

    Step 4 - Research Alternatives

    Research alternatives when any of the following conditions are met:

    • Malware detected
    • Critical unpatched CVEs
    • Package is unmaintained (>12 months since last publish)
    • Socket score below 40
    • Excessive transitive dependencies relative to functionality
    • User explicitly asks for alternatives

    To research alternatives:

    1. Identify the package's core functionality
    2. Search for well-known alternatives providing similar functionality
    3. Query the Socket Batch PURL API for the top 3-5 alternatives (or use pnpm dlx socket package score CLI fallback)
    4. Present a comparison table:
    Package Socket Score Vulnerabilities Dependencies Last Published
    original ... ... ... ...
    alt-1 ... ... ... ...
    alt-2 ... ... ... ...

    Step 5 - Check for Socket Patches

    What are Socket patches? Socket patches are binary-level fixes applied directly to installed packages without changing their version numbers. They fix known vulnerabilities in-place, which is useful when an upstream fix doesn't exist yet or when upgrading would introduce breaking changes.

    • Check the API response data for available Socket patches or overrides
    • If patches are available, mention the patched version and link to the socket.dev page
    • Cross-reference the /socket-dep-patch and /socket-dep-upgrade skills - remind the user they can apply patches with /socket-dep-patch (binary-level, no version change) or run a security-audited upgrade with /socket-dep-upgrade (version upgrade with code migration)

    Output Format

    If Malware Is Detected

    When malware is detected, the output MUST begin with this warning before any other content:

    MALWARE DETECTED - do NOT install this package.

    Package: {name} ({ecosystem}) Malware type: {description of malware behavior}

    Recommended action: Remove this package immediately if already installed. Check for alternatives below.

    Then continue with the standard report sections.

    Standard Report

    Structure the report as follows:

    {name} v{version} ({ecosystem})

    Socket Score: {score}/100

    Alerts List all Socket alerts grouped by category (security, quality, maintenance, license, miscellaneous).

    Vulnerabilities

    CVE Severity Affected Versions Fixed In
    ... ... ... ...

    Supply Chain Risk Assessment Summarize findings across the five dimensions (malware, vulnerabilities, dependency tree, maintenance health, author trust). Call out anything that warrants concern.

    Socket Patches State whether Socket patches are available. If yes, mention the patched version and how to apply via /socket-dep-patch.

    Alternatives (if applicable) Include the comparison table from Step 4.

    Recommendation A clear, actionable recommendation: safe to use, use with caution (with reasons), or avoid (with reasons and alternatives).

    Source: socket.dev/{ecosystem}/package/{name}

    Error Handling

    • Batch PURL API returns no data: The package may not exist in the specified ecosystem, or the package name may be misspelled. Verify the exact package name and ecosystem. For scoped npm packages, include the full scope (e.g., @babel/core). If SOCKET_SECURITY_API_KEY is not set, use the /socket-setup skill to configure authentication. The Batch PURL API requires SOCKET_SECURITY_API_KEY from an account. CLI package scoring requires verified account authentication.
    • WebFetch fails on socket.dev page: Fall back to API data only. Note in the report that the review is based on API data and include the socket.dev URL for the user to check manually.
    • Package not found in Socket's database: Socket may not index all packages in all ecosystems. Note this limitation and suggest checking the package's own repository and issue tracker directly.
    • GitHub API rate limit: If GitHub API calls for maintenance data are rate-limited, skip the maintenance health dimension and note it in the report.

    Tips

    • Always review unfamiliar packages before adding them as dependencies
    • Single-maintainer packages carry higher supply-chain risk
    • Large transitive dependency trees increase attack surface
    • If a package is flagged as malware, do NOT install it - recommend immediate removal if already present
    • Use inspect results to inform decisions with the /socket-dep-upgrade, /socket-dep-patch, and /socket-scan skills
    • Weigh Socket score and maintenance health over download count alone
    • Re-review periodically - a package's security posture changes over time
    • CLI-based inspection requires verified account authentication. The Batch PURL API requires SOCKET_SECURITY_API_KEY from an account.
    • Prefer Socket patches over manual version pinning when available

    Reproducido de SocketDev/sauce bajo licencia MIT. Leer esta página en markdown.

    Archivos

    1 archivo en el paquete. Solo se lee SKILL.md al activarse — las referencias se cargan si el skill decide que las necesita.

    Antes de instalar

    Necesitas el CLI de Socket (pnpm dlx socket) y, para la API Batch PURL, la variable SOCKET_SECURITY_API_KEY o las herramientas MCP de Socket conectadas.

    Necesita en el PATH:curlpnpm

    Variables de entorno:SOCKET_SECURITY_API_KEY

    Detalles

    Creador
    SocketDev
    Categoría
    Seguridad
    Licencia
    MIT
    Recursos incluidos
    Solo SKILL.md
    Repositorio
    SocketDev/sauce
    Código fuente
    Ver SKILL.md

    Etiquetas

    Más de SocketDev/sauce

    Este repo incluye 15 skills. Si instalas uno, normalmente ya tienes los demás. Ver el pack sauce entero y su comando de instalación

    Conecta tu agente a Socket iniciando sesión por el navegador, sin copiar ni pegar una API key. Incluye el servidor Socket MCP alojado (OAuth), lista tus organizaciones y enlaza el Socket CLI para escaneos.

    Costo de contexto al activarse
    1.7k tok
    Tamaño del paquete
    1 archivo
    Última actualización
    hace 24 días
    Oficialseguridad

    Arregla problemas de seguridad en dependencias: escanea y corrige todo (requiere /socket-scan) o repara un paquete concreto, orquestando los subskills de limpieza, reemplazo, parcheo y actualización.

    Costo de contexto al activarse
    4.5k tok
    Tamaño del paquete
    1 archivo
    Última actualización
    hace 24 días
    Oficialseguridad

    Usa `socket fix` para encontrar y actualizar dependencias vulnerables, y luego corrige los cambios incompatibles en el código. Actualizaciones auditadas en seguridad con migración de código automatizada.

    Costo de contexto al activarse
    4.1k tok
    Tamaño del paquete
    1 archivo
    Última actualización
    hace 24 días
    Oficialseguridad

    Ejecuta un escaneo de dependencias con Socket CLI: pide login o cuenta si no estás autenticado, ofrece un SBOM local si lo rechazas, y añade reachability y auditoría de licencias para enterprise.

    Costo de contexto al activarse
    5.6k tok
    Tamaño del paquete
    1 archivo
    Última actualización
    hace 24 días
    Oficialseguridad

    Configura los requisitos previos para escanear con Socket: instala la CLI, inicia sesión con tu propia cuenta y verifica el acceso antes del primer escaneo o ante errores de autenticación.

    Costo de contexto al activarse
    946 tok
    Tamaño del paquete
    1 archivo
    Última actualización
    hace 24 días
    Oficialseguridad

    Configura Socket: conecta tu cuenta mediante inicio de sesión en el navegador, instala el CLI, configura políticas y tokens de CI, y prepara el CI/CD para los modos firewall o patch en GitHub, GitLab, Bitbucket y otros sistemas.

    Costo de contexto al activarse
    6.8k tok
    Tamaño del paquete
    1 archivo
    Última actualización
    hace 24 días
    Oficialdevops infraestructura

    Skills relacionados

    Conecta tu agente a Socket iniciando sesión por el navegador, sin copiar ni pegar una API key. Incluye el servidor Socket MCP alojado (OAuth), lista tus organizaciones y enlaza el Socket CLI para escaneos.

    Costo de contexto al activarse
    1.7k tok
    Tamaño del paquete
    1 archivo
    Última actualización
    hace 24 días
    Oficialseguridad

    Arregla problemas de seguridad en dependencias: escanea y corrige todo (requiere /socket-scan) o repara un paquete concreto, orquestando los subskills de limpieza, reemplazo, parcheo y actualización.

    Costo de contexto al activarse
    4.5k tok
    Tamaño del paquete
    1 archivo
    Última actualización
    hace 24 días
    Oficialseguridad

    Aplica los parches de seguridad a nivel binario de Socket sin cambiar versiones de dependencias, usando socket-patch apply, y verifica que el parcheo persista en cada instalación.

    Costo de contexto al activarse
    4k tok
    Tamaño del paquete
    1 archivo
    Última actualización
    hace 3 meses
    Oficialseguridad