Skills Agentes

Financial Insights

Lee los datos financieros de Link del usuario —transacciones, saldos y fuentes de la wallet— para que los agentes puedan responder preguntas sobre gastos y las capacidades de las fuentes disponibles.

Oficial
Solicitabash(link-cli:*)bash(npx --yes @stripe/link-cli:*)bash(npx @stripe/link-cli:*)bash(npm install -g @stripe/link-cli:*)
Estrellas
771

en todo el repo

Actividad
61

0–100, la ruta de este skill

Actualizado
hace 10 días

último commit aquí

Commits
3

últimos 90 días

Contexto
3.5k tok

103 tok en reposo

Paquete
1 archivo

13 KB

Instalar

Funciona con cualquier agente que lea SKILL.md

npx -y skills add stripe/link-cli --skill financial-insights --agent claude-code

Se instala solo en este repositorio.

Qué hace

  • Responde preguntas sobre los datos financieros conectados a Link del usuario: transacciones recientes, patrones de gasto, saldos de cuentas y fuentes de la wallet.
  • Ejecuta exclusivamente comandos de solo lectura de link-cli: no mueve dinero, no inicia pagos, no modifica cuentas ni expone credenciales de pago.
  • Verifica la autenticación del usuario y solicita únicamente los source actions mínimos necesarios antes de recuperar los datos.
  • Devuelve resúmenes concisos con el período y las limitaciones de los datos, sin volcar registros crudos ni IDs de objetos salvo que se pidan.

Úsalo cuando

  • Cuando el usuario pide consultar su saldo, sus gastos, sus transacciones, sus compras recientes o su actividad financiera.
  • Cuando pregunta qué cuentas, tarjetas, bancos o fuentes de pago están conectadas a su wallet de Link.
  • Cuando quiere un resumen de su gasto, ingresos, depósitos, suscripciones o patrones de compra.
  • Cuando pregunta por las capacidades de las fuentes financieras disponibles o por los datos financieros enlazados en Link.

No lo uses cuando

  • Cuando la petición implique mover dinero, iniciar un pago o modificar fuentes financieras; el propio skill remite a skills/create-payment-credential/SKILL.md en ese caso.

Qué lo activa

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

  • ¿Cuál es mi saldo actual?
  • ¿Cuánto me he gastado este mes?
  • Muéstrame mis últimas transacciones.
  • ¿Qué cuentas tengo conectadas?
  • Resume mis compras de la semana.

SKILL.md

En inglés

Financial insights

Use this skill to answer questions about a user’s Link-connected financial data, including:

  • Recent transactions
  • Spending patterns
  • Account balances
  • Linked wallet sources
  • Basic summaries derived from the user’s financial data

All commands are read-only. They do not move money, initiate payments, modify accounts, or expose payment credentials.

Safety and privacy

Do not retrieve financial data until the user is authenticated with the required source actions.

Only retrieve the data needed to answer the user’s request. Do not run every list command by default.

Do not expose sensitive identifiers, access tokens, credentials, or payment instrument details. Summarize financial information at the level needed to answer the user’s question.

If the user asks for an action that would move money, reference skills/create-payment-credential/SKILL.md instead.

Authentication

Before retrieving financial data, check whether the user is authenticated and whether the current session has the required source actions.

link-cli auth status --format json

When present, inspect authorization_details in the response for entries with type: "source" and the required actions. The field may be absent when the token endpoint did not return authorization details or when authentication comes from LINK_ACCESS_TOKEN; in that case, run only the minimum data command needed and handle a permission error as described below.

If the user is not authenticated, start a login that requests only the source actions needed for the requested data. If the user is already authenticated but one or more required source actions are missing, use auth upgrade instead of auth login. auth upgrade preserves the current session while the user approves the additional access and replaces it only after approval succeeds.

Use the minimum required source actions:

  • Transactions processed through Link: read_link_transactions
  • Transactions imported from bank connections: read_external_transactions
  • Account balances: read_balances
  • Data source details and descriptions: read_source_details

If the user asks a question that requires multiple data types, request all relevant actions together.

Example for a new login that needs all financial data types:

link-cli auth login \
  --client-name "<your-agent-name>" \
  --source-actions read_link_transactions \
  --source-actions read_balances \
  --source-actions read_external_transactions \
  --source-actions read_source_details \
  --format json

Example for adding balance access to an existing session:

link-cli auth upgrade \
  --client-name "<your-agent-name>" \
  --source-actions read_balances \
  --format json

Replace <your-agent-name> with a clear name for the agent or application. Present the returned verification_url to the user, then follow the response's _next instruction or poll with:

link-cli auth status --interval 5 --max-attempts 60 --format json

Do not proceed until authentication or the access upgrade succeeds. If the approval expires, is denied, or times out, report that outcome instead of repeatedly starting new authorization flows.

Choosing the right command

Use the smallest command set that answers the user’s question.

User asks about Command
Recent purchases, merchants, spend, transaction history, income, deposits, subscriptions link-cli transactions list
Current available balance, account balance, cash position link-cli balances list
Connected accounts, cards, banks, wallet sources, source metadata link-cli sources list

Examples:

  • “How much did I spend on restaurants last month?” → Use transactions only.
  • “What is my current checking account balance?” → Use balances only.
  • “Which accounts are connected?” → Use sources only.
  • “Summarize my cash position and recent spending.” → Use balances and transactions.

Output format

Use JSON for agent-readable structured output.

link-cli transactions list --format json
link-cli balances list --format json
link-cli sources list --format json

The default toon format is intended for humans. Prefer --format json whenever parsing, filtering, aggregating, or summarizing results.

All monetary amounts across all endpoints are integers in the currency's smallest unit (e.g. 152340 = $1,523.40 USD). Format amounts with a currency-aware formatter that uses the currency's ISO 4217 minor-unit exponent; do not assume every currency has two decimal places or always divide by 100.

Keep sign interpretation field-specific. Only transactions.amount uses negative for money leaving the account and positive for money entering it. Do not apply transaction sign semantics to balance fields; interpret current, cash.available, and credit.used according to the balance type.

Sources (concept)

A source is a financial account connected to the user's Link wallet — a bank account, credit card, savings account, etc. Each source has a unique id (e.g. csmrpd_abc123) that other endpoints may expose as source_id:

  • In transactions list, source_id indicates which account a transaction belongs to.
  • In balances list, each balance entry includes a source_id identifying the account.
  • In sources list, the full source metadata (name, institution, type, status) is returned.

Use a source_id to correlate data across commands — for example, to find transactions for a specific account or to match a balance to its source type. Do not assign transactions with a null source_id to a source by guessing from their description.

Transactions

Use transactions to answer questions about spending, income, merchants, categories, recurring payments, deposits, or account activity.

link-cli transactions list --format json

Common options:

link-cli transactions list --format json --start-date 2025-01-01 --end-date 2025-01-31
link-cli transactions list --format json --category groceries
link-cli transactions list --format json --origin external_connection
link-cli transactions list --format json --source <source_id> --source <source_id>
Flag Description
--start-date Only transactions on or after this date (YYYY-MM-DD).
--end-date Only transactions on or before this date (YYYY-MM-DD).
--category Filter by category.
--origin Filter by origin: link or external_connection.
--source Filter by source ID (repeatable).

See Pagination for shared list controls.

Response fields

Field Note
amount Negative = money leaving the account (debit/purchase), positive = money entering (credit/deposit).
origin external_connection (from linked bank/card) or link (Link-native transaction).
category May be null if unclassified.
status API-provided status string. Do not assume a closed set of values; observed values include succeeded. Interpret or filter a status only when its meaning is known.

For transaction summaries:

  • Normalize signs consistently before calculating totals.
  • Distinguish debits from credits when possible.
  • Group by merchant, category, account, currency, or time period only when relevant.
  • Mention if the answer is based on a limited retrieved window.

Balances

Use balances to answer questions about current account balances or available funds.

link-cli balances list --format json
link-cli balances list --format json --source <source_id>
Flag Description
--source Filter by source ID (repeatable).

See Pagination for shared list controls.

Response fields

Field Note
type cash (bank/savings) or credit (credit card/line of credit). Determines which sub-object is present.
current Balance before pending transactions. Not the same as available funds.
cash.available Object mapping currency codes to available funds (current minus outbound pending plus inbound pending). Only present when type is cash.
credit.used Object mapping currency codes to credit used. Only present when type is credit.
as_of When the balance was last updated — may be stale by hours or days.

When summarizing balances:

  • Preserve currencies.
  • Do not add balances across different currencies unless the user explicitly asks and exchange-rate data is available.
  • Use the current field as the default definition of a balance, unless the user's question requires considering pending transactions.
  • If multiple sources are returned, summarize by account/source.

Sources

Use sources to answer questions about connected wallet sources, linked accounts, or available financial data sources. See Pagination for shared list controls.

link-cli sources list --format json

Response fields

Field Description
id Unique source identifier (same as source_id in other endpoints).
name Display name of the source.
type Source type (e.g. card, bank_account).
capabilities Object indicating what data is available. Each key (e.g. balances, transactions) maps to an object with a status field (e.g. eligible).
external_connection.status Connection status to the external institution.
granted_actions List of actions the user has granted for this source.

When summarizing sources:

  • Include only non-sensitive metadata needed for the answer.
  • Avoid exposing full account numbers, credentials, tokens, or payment instrument details.
  • Prefer labels such as institution, account type, source status, and last updated time when available.

Pagination

All three list commands support the same pagination flags:

Flag Description
--limit Maximum results per page (1-100). Prefer 100 when multiple pages may be needed.
--starting-after Fetch the next page after a cursor value.
--ending-before Fetch the previous page before a cursor value. Use for reverse navigation, not normal forward collection.

JSON responses contain a data array and may contain has_more. They do not provide a separate next-cursor field. When has_more is true, derive the next cursor from the final item in data:

Command Next cursor
transactions list Final transaction's id.
balances list Final balance's source_id.
sources list Final source's id.

For example:

link-cli transactions list --format json --limit 100 --starting-after <last_transaction_id>

Keep all filters identical across pages and change only --starting-after. Stop when has_more is false or absent, or when enough data has been retrieved for a non-exhaustive lookup. If has_more is true but data is empty or the required cursor is null or missing, stop and report that pagination could not continue.

Do not exhaustively paginate unless the user’s request requires a complete bounded result, such as a total for a specified time range.

Answering user questions

When answering:

  • State the direct answer first.
  • Mention the relevant time range and data source.
  • Note any limitations, such as partial pagination, missing categories, pending transactions, or unsupported currencies.
  • Avoid dumping raw records and object IDs unless the user asks for them.
  • Prefer concise summaries, totals, and notable patterns.

Example response style:

You spent $342.18 on restaurants across 12 transactions in July. The largest restaurant transaction was $86.40 at Example Bistro on July 18. This is based on the transactions returned for your connected Link sources.

Error handling

If authentication fails, ask the user to re-authenticate.

If a command returns no data, say that no matching Link financial data was available for the requested scope.

If the CLI returns an error indicating missing permissions or source actions, request only the specific missing action. Use auth upgrade when a session is already authenticated and auth login when it is not, then wait for approval before retrying the data command once.

If data is incomplete or paginated, clearly state that the answer is based on the data retrieved so far.

Guardrails

Do not:

  • Move money.
  • Initiate payments.
  • Modify financial sources.
  • Retrieve unrelated financial data.
  • Request broader source actions than needed.
  • Expose credentials, tokens, or full payment details.
  • Present uncertain derived insights as definitive.

Do:

  • Use read-only commands.
  • Authenticate before retrieval.
  • Request the minimum required source actions.
  • Use --format json for parsing.
  • Retrieve only the data needed.
  • Summarize clearly and note limitations.

Reproducido de stripe/link-cli bajo licencia Complete terms in LICENSE. 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

Requiere tener instalado link-cli (paquete npm @stripe/link-cli) y que el usuario se autentique con los source actions necesarios para los datos solicitados.

Detalles

Creador
stripe
Categoría
Finanzas
Licencia
Complete terms in LICENSE
Recursos incluidos
Solo SKILL.md
Repositorio
stripe/link-cli
Código fuente
Ver SKILL.md

Etiquetas

Más de stripe/link-cli

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

Obtiene credenciales de pago seguras y de un solo uso (tarjetas, tokens) de la cartera de Link para completar compras en nombre del usuario. Úsala cuando pida comprar, pagar, obtener una tarjeta o conectar su cuenta de Link.

Costo de contexto al activarse
7.3k tok
Tamaño del paquete
1 archivo
Última actualización
ayer
Oficialfinanzas

Instala y autentica Link CLI para pagos de agente, información financiera o ambos. Úsalo al configurarlo por primera vez, al conectar o iniciar sesión en Link, o al preparar el acceso antes de usar funciones de pago o datos financieros.

Costo de contexto al activarse
1.9k tok
Tamaño del paquete
2 archivos
Última actualización
hace 8 días
Oficialherramientas desarrollo

Lee la cuenta de Link conectada, los métodos de pago y direcciones guardados en su cartera, y el estado de las solicitudes de gasto. Para consultas sobre qué cuenta está conectada, qué hay guardado o si una compra fue aprobada.

Costo de contexto al activarse
685 tok
Tamaño del paquete
1 archivo
Última actualización
hace 13 días
Oficialfinanzas

Compra en un comercio con la cartera Link: pide al usuario autorizar una tarjeta virtual de un solo uso, recupera la credencial y la introduce al pagar. Úsalo cuando pidan comprar, pagar o hacer checkout con Link.

Costo de contexto al activarse
2k tok
Tamaño del paquete
1 archivo
Última actualización
hace 13 días
Oficialfinanzas

Skills relacionados

Lee la cuenta de Link conectada, los métodos de pago y direcciones guardados en su cartera, y el estado de las solicitudes de gasto. Para consultas sobre qué cuenta está conectada, qué hay guardado o si una compra fue aprobada.

Costo de contexto al activarse
685 tok
Tamaño del paquete
1 archivo
Última actualización
hace 13 días
Oficialfinanzas

Compra en un comercio con la cartera Link: pide al usuario autorizar una tarjeta virtual de un solo uso, recupera la credencial y la introduce al pagar. Úsalo cuando pidan comprar, pagar o hacer checkout con Link.

Costo de contexto al activarse
2k tok
Tamaño del paquete
1 archivo
Última actualización
hace 13 días
Oficialfinanzas

Obtiene credenciales de pago seguras y de un solo uso (tarjetas, tokens) de la cartera de Link para completar compras en nombre del usuario. Úsala cuando pida comprar, pagar, obtener una tarjeta o conectar su cuenta de Link.

Costo de contexto al activarse
7.3k tok
Tamaño del paquete
1 archivo
Última actualización
ayer
Oficialfinanzas