financial-insights

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

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.
使用此技能回答用户关于其Link关联金融数据的问题,包括:
  • 近期交易记录
  • 支出模式
  • 账户余额
  • 关联钱包来源
  • 从用户财务数据衍生的基础汇总信息
所有命令均为只读模式。它们不会转移资金、发起支付、修改账户或泄露支付凭证。

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.
在用户通过所需的source actions完成身份验证前,请勿获取财务数据。
仅获取回答用户请求所需的数据。默认情况下不要运行所有列表命令。
请勿暴露敏感标识符、访问令牌、凭证或支付工具详情。根据回答用户问题所需的粒度汇总财务信息。
如果用户要求执行转移资金的操作,请参考
skills/create-payment-credential/SKILL.md

Authentication

身份验证

Before retrieving financial data, check whether the user is authenticated and whether the current session has the required source actions.
bash
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:
bash
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:
bash
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:
bash
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.
在获取财务数据前,请检查用户是否已完成身份验证,以及当前会话是否具备所需的source actions。
bash
link-cli auth status --format json
若响应中存在
authorization_details
,请检查其中
type: "source"
的条目及所需的操作权限。当令牌端点未返回授权详情,或身份验证来自
LINK_ACCESS_TOKEN
时,该字段可能不存在;这种情况下,仅运行所需的最小数据命令,并按如下方式处理权限错误。
如果用户未完成身份验证,请启动仅请求所需source actions的登录流程。如果用户已完成身份验证,但缺少一项或多项所需的source actions,请使用
auth upgrade
而非
auth login
auth upgrade
会保留当前会话,待用户批准额外访问权限后,仅在批准成功后替换会话。
使用最低要求的source actions:
  • 通过Link处理的交易:
    read_link_transactions
  • 从银行连接导入的交易:
    read_external_transactions
  • 账户余额:
    read_balances
  • 数据源详情与描述:
    read_source_details
如果用户的问题需要多种数据类型,请同时请求所有相关操作权限。
需要所有财务数据类型的新登录示例:
bash
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
为现有会话添加余额访问权限的示例:
bash
link-cli auth upgrade \
  --client-name "<your-agent-name>" \
  --source-actions read_balances \
  --format json
<your-agent-name>
替换为Agent或应用的清晰名称。向用户展示返回的
verification_url
,然后按照响应中的
_next
指令操作,或使用以下命令轮询:
bash
link-cli auth status --interval 5 --max-attempts 60 --format json
在身份验证或访问权限升级成功前,请勿继续操作。如果批准过期、被拒绝或超时,请告知用户结果,而非重复启动新的授权流程。

Choosing the right command

选择合适的命令

Use the smallest command set that answers the user’s question.
User asks aboutCommand
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.
使用能回答用户问题的最小命令集。
用户询问内容命令
近期消费、商家、支出、交易历史、收入、存款、订阅
link-cli transactions list
当前可用余额、账户余额、现金头寸
link-cli balances list
关联账户、卡片、银行、钱包来源、来源元数据
link-cli sources list
示例:
  • “我上个月在餐厅花了多少钱?” → 仅使用交易命令。
  • “我的支票账户当前余额是多少?” → 仅使用余额命令。
  • “哪些账户已关联?” → 仅使用来源命令。
  • “汇总我的现金头寸和近期支出。” → 使用余额和交易命令。

Output format

输出格式

Use JSON for agent-readable structured output.
bash
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.
使用JSON格式作为Agent可读的结构化输出。
bash
link-cli transactions list --format json
link-cli balances list --format json
link-cli sources list --format json
默认的
toon
格式面向人类用户。当需要解析、过滤、聚合或汇总结果时,优先使用
--format json
所有端点的货币金额均为该货币最小单位的整数(例如:
152340
= 1,523.40美元)。使用支持ISO 4217货币小数位数的格式化工具处理金额;不要假设所有货币都有两位小数或总是除以100。
根据字段含义解读符号。只有
transactions.amount
使用负数表示资金流出账户(借记/消费),正数表示资金流入账户(贷记/存款)。不要将交易的符号语义应用于余额字段;根据余额类型解读
current
cash.available
credit.used

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.
source是关联到用户Link钱包的金融账户——例如银行账户、信用卡、储蓄账户等。每个source都有唯一的
id
(例如:
csmrpd_abc123
),其他端点可能将其作为
source_id
暴露:
  • transactions list
    中,
    source_id
    表示交易所属的账户。
  • balances list
    中,每个余额条目都包含一个
    source_id
    ,用于标识对应的账户。
  • sources list
    中,会返回完整的source元数据(名称、机构、类型、状态)。
使用
source_id
关联不同命令的数据——例如,查找特定账户的交易记录,或匹配余额对应的source类型。请勿通过猜测描述将
source_id
为null的交易分配给某个source。

Transactions

交易记录

Use transactions to answer questions about spending, income, merchants, categories, recurring payments, deposits, or account activity.
bash
link-cli transactions list --format json
Common options:
bash
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>
FlagDescription
--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.
使用交易记录回答关于支出、收入、商家、分类、 recurring payments、存款或账户活动的问题。
bash
link-cli transactions list --format json
常用选项:
bash
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>
标志描述
--start-date
仅包含该日期及之后的交易(格式:YYYY-MM-DD)。
--end-date
仅包含该日期及之前的交易(格式:YYYY-MM-DD)。
--category
按分类筛选。
--origin
按来源筛选:
link
external_connection
--source
按source ID筛选(可重复使用)。
有关共享列表控制,请参阅分页

Response fields

响应字段

FieldNote
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.
字段说明
amount
负数 = 资金流出账户(借记/消费),正数 = 资金流入账户(贷记/存款)。
origin
external_connection
(来自关联的银行/卡片)或
link
(Link原生交易)。
category
若未分类则可能为
null
status
API提供的状态字符串。不要假设值的集合是固定的;已观察到的值包括
succeeded
。仅当明确了解状态含义时才解读或筛选状态。
对于交易记录汇总:
  • 在计算总额前统一符号规则。
  • 尽可能区分借记和贷记。
  • 仅在相关时按商家、分类、账户、货币或时间段分组。
  • 提及答案是否基于有限的检索时间范围。

Balances

余额

Use balances to answer questions about current account balances or available funds.
bash
link-cli balances list --format json
link-cli balances list --format json --source <source_id>
FlagDescription
--source
Filter by source ID (repeatable).
See Pagination for shared list controls.
使用余额回答关于当前账户余额或可用资金的问题。
bash
link-cli balances list --format json
link-cli balances list --format json --source <source_id>
标志描述
--source
按source ID筛选(可重复使用)。
有关共享列表控制,请参阅分页

Response fields

响应字段

FieldNote
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.
字段说明
type
cash
(银行/储蓄账户)或
credit
(信用卡/信用额度)。决定了会出现哪个子对象。
current
待处理交易前的余额。不等于可用资金。
cash.available
货币代码到可用资金的映射对象(当前余额减去待转出金额加上待转入金额)。仅当
type
cash
时存在。
credit.used
货币代码到已使用信用额度的映射对象。仅当
type
credit
时存在。
as_of
余额最后更新的时间——可能已过时数小时或数天。
汇总余额时:
  • 保留货币信息。
  • 除非用户明确要求且有汇率数据可用,否则不要跨货币相加余额。
  • 默认使用
    current
    字段作为余额的定义,除非用户的问题需要考虑待处理交易。
  • 如果返回多个source,按账户/source汇总。

Sources

来源

Use sources to answer questions about connected wallet sources, linked accounts, or available financial data sources. See Pagination for shared list controls.
bash
link-cli sources list --format json
使用来源回答关于关联钱包来源、关联账户或可用财务数据源的问题。有关共享列表控制,请参阅分页
bash
link-cli sources list --format json

Response fields

响应字段

FieldDescription
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.
字段描述
id
唯一的source标识符(与其他端点中的
source_id
相同)。
name
source的显示名称。
type
source类型(例如:
card
bank_account
)。
capabilities
指示可用数据的对象。每个键(例如:
balances
transactions
)映射到一个包含
status
字段的对象(例如:
eligible
)。
external_connection.status
与外部机构的连接状态。
granted_actions
用户为此source授予的操作权限列表。
汇总来源时:
  • 仅包含回答问题所需的非敏感元数据。
  • 避免暴露完整的账户号码、凭证、令牌或支付工具详情。
  • 如果可用,优先使用机构、账户类型、source状态和最后更新时间等标签。

Pagination

分页

All three list commands support the same pagination flags:
FlagDescription
--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
:
CommandNext cursor
transactions list
Final transaction's
id
.
balances list
Final balance's
source_id
.
sources list
Final source's
id
.
For example:
bash
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.
三个列表命令均支持相同的分页标志:
标志描述
--limit
每页最大结果数(1-100)。当可能需要多页时,优先使用
100
--starting-after
从指定游标值之后获取下一页。
--ending-before
从指定游标值之前获取上一页。用于反向导航,不用于常规正向收集。
JSON响应包含
data
数组,可能包含
has_more
。响应不提供单独的下一页游标字段。当
has_more
true
时,从
data
中的最后一项推导下一页游标:
命令下一页游标
transactions list
最后一条交易记录的
id
balances list
最后一条余额记录的
source_id
sources list
最后一个source的
id
示例:
bash
link-cli transactions list --format json --limit 100 --starting-after <last_transaction_id>
跨页面保持所有筛选条件一致,仅更改
--starting-after
。当
has_more
为false或不存在,或已检索到足够数据用于非穷尽查询时,停止分页。如果
has_more
为true但
data
为空,或所需游标为null或缺失,请停止并报告无法继续分页。
除非用户的请求需要完整的限定结果(例如指定时间范围的总额),否则不要进行穷尽分页。

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:
text
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.
回答时:
  • 首先直接给出答案。
  • 提及相关的时间范围和数据源。
  • 注明任何限制,例如部分分页、缺失分类、待处理交易或不支持的货币。
  • 除非用户要求,否则不要输出原始记录和对象ID。
  • 优先选择简洁的汇总信息、总额和显著模式。
示例回复风格:
text
您7月在餐厅共消费342.18美元,涉及12笔交易。最大的一笔餐厅交易是7月18日在Example Bistro消费的86.40美元。此结果基于您关联的Link来源返回的交易记录。

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.
如果身份验证失败,请要求用户重新验证。
如果命令未返回数据,请告知用户在请求范围内没有匹配的Link金融数据。
如果CLI返回错误指示缺少权限或source actions,请仅请求特定缺失的操作权限。当会话已验证时使用
auth upgrade
,未验证时使用
auth login
,然后等待批准后重试一次数据命令。
如果数据不完整或已分页,请明确说明答案基于目前检索到的数据。

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.
请勿:
  • 转移资金。
  • 发起支付。
  • 修改财务来源。
  • 获取无关的财务数据。
  • 请求超出需求的source actions。
  • 暴露凭证、令牌或完整的支付详情。
  • 将不确定的衍生洞察作为确定结论呈现。
请:
  • 使用只读命令。
  • 在获取数据前完成身份验证。
  • 请求最低要求的source actions。
  • 使用
    --format json
    进行解析。
  • 仅获取所需的数据。
  • 清晰汇总并注明限制。