Skills Agentes

Socket Connect

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.

Oficial

Reemplaza a: Copiar y pegar un API token de organización desde el panel de Socket

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
1.7k tok

54 tok en reposo

Paquete
1 archivo

7 KB

Instalar

Funciona con cualquier agente que lea SKILL.md

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

Se instala solo en este repositorio.

Este skill makes network requests.

Qué hace

  • Conecta el agente a Socket mediante OAuth en el navegador, sin copiar ni pegar una API key
  • Añade el servidor Socket MCP alojado y detecta si ya está conectado
  • Lista las organizaciones de Socket a las que el usuario pertenece y permite elegir cuáles usar
  • Guía la conexión por separado del Socket CLI para escaneos y fixes

Úsalo cuando

  • El usuario quiere conectarse, iniciar sesión o hacer login en Socket desde el agente
  • Otra skill de Socket necesita acceso a la cuenta y ninguna está configurada
  • Una herramienta de Socket devuelve 401, "needs authentication" o "not connected"
  • El usuario pertenece a varias organizaciones de Socket y quiere elegir una

No lo uses cuando

    Qué lo activa

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

    • “Conéctame a Socket desde el agente”
    • “Inicia sesión en Socket sin pedirme una API key”
    • “¿Por qué me da 401 la herramienta de Socket?”
    • “Quiero elegir en qué organización de Socket trabajar”

    SKILL.md

    En inglés

    Connect to Socket

    Sign in to Socket from the agent with OAuth. The user approves access in the browser, and the agent gets a token for their own account. That token covers every organization the user belongs to, so nobody copies an organization API token out of the dashboard.

    This plugin ships the hosted Socket MCP server (https://mcp.socket.dev/). Other Socket skills install it as a dependency, so most users already have it.

    When to Use

    • The user wants to connect, sign in, or log in to Socket from the agent
    • Another Socket skill needs account access and none is configured
    • A Socket tool returns 401, "needs authentication", or "not connected"
    • The user belongs to several Socket organizations and wants to pick one
    • The user asks how to use Socket without pasting an API key

    Step 1: Check Whether Socket Is Connected

    Look for a Socket MCP tool named organizations among your available tools. The full tool name depends on how the server was added. For example, it can be mcp__plugin_socket-connect_socket__organizations, mcp__socket__organizations, or mcp__socket-mcp__organizations. Match on the server URL or the organizations suffix, never on one hard-coded prefix.

    • If the tool exists, call it. A list of organizations means the user is connected. Go to Step 3.
    • If the call fails with an authentication error, or the tool is missing, go to Step 2.

    Step 2: Sign In With the Browser

    Tell the user how to sign in for their agent. Nobody needs an API key.

    Agent How to sign in
    Claude Code Run /mcp, pick the Socket server, then choose Authenticate. A browser window opens.
    Claude Code (shell) claude mcp login <server-name>, using the name shown by /mcp. Add --no-browser over SSH.
    Cursor Open Customize in the sidebar, select the Socket server, and sign in to it.
    Gemini CLI Run /mcp auth socket.
    Codex Run /mcp login socket, or codex mcp login socket from a shell. Add --no-browser over SSH.

    If the Socket server is not listed at all, add it by URL. In Claude Code:

    claude mcp add --transport http socket https://mcp.socket.dev/
    

    The browser shows Socket's sign-in and consent pages. If the user has no account, they can create a free one there. After they approve, call organizations again to confirm.

    Non-interactive runs (claude -p, Agent SDK, CI) cannot open a browser. Sign in once interactively, or use an API token as described in Step 5.

    Step 3: Choose Which Organizations to Use

    The organizations tool returns the organizations this sign-in can reach. Which ones that is depends on what the user granted on Socket's consent page.

    • One organization: use it. If the user wants a different organization, clear the Socket server's sign-in (in Claude Code, /mcp or claude mcp logout <server-name>) and sign in again, choosing that organization on the consent page.
    • Several organizations: use all of them by default, or the ones the user selects. Remember the selection for the rest of the session, and never narrow it silently.

    Org-scoped tools such as alerts and threat_feed take one org_slug per call. To cover several organizations, call the tool once per organization and label each result with its organization.

    Step 4: Use Socket Through MCP

    Once connected, prefer the MCP tools over pasted tokens:

    • depscore - scores for one or more packages (used by /socket-inspect)
    • alerts - open alerts across the organization's monitored packages
    • threat_feed - recent malware and threat reports
    • package_files, package_file_contents, package_file_grep - read a published package's files

    Step 5: Connect the Socket CLI (Scans and Fixes)

    The MCP server does not create scans. /socket-scan and /socket-fix use the Socket CLI, which signs in separately. socket login needs an interactive terminal, so the agent cannot run it through its shell tool. Ask the user to run it themselves (in Claude Code, type ! pnpm dlx socket login):

    pnpm dlx socket login
    
    • If the CLI opens a browser and shows a device code, the user approves it the same way as Step 2. No token is pasted.
    • If the CLI instead prompts for an API token, that CLI release predates browser login. The current npm release still prompts for a token. Ask the user whether they want to create an API token in the dashboard and paste it into the masked prompt (never into the chat), or skip CLI-only features for now.

    The CLI sets its default organization to the first one it finds. If that differs from the organization chosen in Step 3, pass --org <slug> to CLI commands, or ask before changing the default with pnpm dlx socket config set defaultOrg <slug>.

    Verify the CLI without printing a credential:

    pnpm dlx socket organization list --json --no-banner --no-spinner
    

    For CI and other non-interactive environments, an organization API token in SOCKET_CLI_API_TOKEN remains the right choice. See /socket-setup for CI configuration.

    Error Handling

    • No Socket tools after installing the plugin: restart the agent or reload plugins so the bundled MCP server loads, then check /mcp.
    • Browser does not open: copy the URL the agent prints into a browser. Over SSH, use the --no-browser option and open the URL locally.
    • organizations returns an empty list: the account has no organization yet. Create one at https://socket.dev/dashboard, then call organizations again.
    • 401 after it worked before: the session expired or was revoked. Sign in again from Step 2.
    • Wrong account: clear the server's authentication in /mcp (or claude mcp logout <server-name>), then sign in again.

    Tips

    • Never ask the user to paste an API token into the chat. Browser sign-in keeps the credential out of the conversation.
    • Do not print credential values to confirm a connection. Call organizations instead.
    • Use every organization the sign-in reaches unless the user selects fewer. To reach an organization the sign-in does not cover, sign in again instead of asking for a token.
    • The MCP server and the Socket CLI sign in separately. Being connected over MCP does not make pnpm dlx socket scan create work.
    • If the user has no account and does not want one, leave Socket unconnected. Public package lookups such as depscore may still work.

    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 un navegador para aprobar el acceso OAuth; en entornos no interactivos (CI, claude -p) hace falta iniciar sesión antes o usar un token API.

    Necesita en el PATH:pnpm

    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

    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

    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.

    Costo de contexto al activarse
    3.5k 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

    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

    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