financial-insights
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFinancial 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 instead.
skills/create-payment-credential/SKILL.md在用户通过所需的source actions完成身份验证前,请勿获取财务数据。
仅获取回答用户请求所需的数据。默认情况下不要运行所有列表命令。
请勿暴露敏感标识符、访问令牌、凭证或支付工具详情。根据回答用户问题所需的粒度汇总财务信息。
如果用户要求执行转移资金的操作,请参考。
skills/create-payment-credential/SKILL.mdAuthentication
身份验证
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 jsonWhen present, inspect in the response for entries with and the required actions. The field may be absent when the token endpoint did not return authorization details or when authentication comes from ; in that case, run only the minimum data command needed and handle a permission error as described below.
authorization_detailstype: "source"LINK_ACCESS_TOKENIf 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 instead of . preserves the current session while the user approves the additional access and replaces it only after approval succeeds.
auth upgradeauth loginauth upgradeUse 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 jsonExample for adding balance access to an existing session:
bash
link-cli auth upgrade \
--client-name "<your-agent-name>" \
--source-actions read_balances \
--format jsonReplace with a clear name for the agent or application. Present the returned to the user, then follow the response's instruction or poll with:
<your-agent-name>verification_url_nextbash
link-cli auth status --interval 5 --max-attempts 60 --format jsonDo 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_detailstype: "source"LINK_ACCESS_TOKEN如果用户未完成身份验证,请启动仅请求所需source actions的登录流程。如果用户已完成身份验证,但缺少一项或多项所需的source actions,请使用而非。会保留当前会话,待用户批准额外访问权限后,仅在批准成功后替换会话。
auth upgradeauth loginauth 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将替换为Agent或应用的清晰名称。向用户展示返回的,然后按照响应中的指令操作,或使用以下命令轮询:
<your-agent-name>verification_url_nextbash
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 about | Command |
|---|---|
| Recent purchases, merchants, spend, transaction history, income, deposits, subscriptions | |
| Current available balance, account balance, cash position | |
| Connected accounts, cards, banks, wallet sources, source metadata | |
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.
bash
link-cli transactions list --format json
link-cli balances list --format json
link-cli sources list --format jsonThe default format is intended for humans. Prefer whenever parsing, filtering, aggregating, or summarizing results.
toon--format jsonAll monetary amounts across all endpoints are integers in the currency's smallest unit (e.g. = $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.
152340Keep sign interpretation field-specific. Only uses negative for money leaving the account and positive for money entering it. Do not apply transaction sign semantics to balance fields; interpret , , and according to the balance type.
transactions.amountcurrentcash.availablecredit.used使用JSON格式作为Agent可读的结构化输出。
bash
link-cli transactions list --format json
link-cli balances list --format json
link-cli sources list --format json默认的格式面向人类用户。当需要解析、过滤、聚合或汇总结果时,优先使用。
toon--format json所有端点的货币金额均为该货币最小单位的整数(例如: = 1,523.40美元)。使用支持ISO 4217货币小数位数的格式化工具处理金额;不要假设所有货币都有两位小数或总是除以100。
152340根据字段含义解读符号。只有使用负数表示资金流出账户(借记/消费),正数表示资金流入账户(贷记/存款)。不要将交易的符号语义应用于余额字段;根据余额类型解读、和。
transactions.amountcurrentcash.availablecredit.usedSources (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 (e.g. ) that other endpoints may expose as :
idcsmrpd_abc123source_id- In ,
transactions listindicates which account a transaction belongs to.source_id - In , each balance entry includes a
balances listidentifying the account.source_id - In , the full source metadata (name, institution, type, status) is returned.
sources list
Use a 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 to a source by guessing from their description.
source_idsource_idsource是关联到用户Link钱包的金融账户——例如银行账户、信用卡、储蓄账户等。每个source都有唯一的(例如:),其他端点可能将其作为暴露:
idcsmrpd_abc123source_id- 在中,
transactions list表示交易所属的账户。source_id - 在中,每个余额条目都包含一个
balances list,用于标识对应的账户。source_id - 在中,会返回完整的source元数据(名称、机构、类型、状态)。
sources list
使用关联不同命令的数据——例如,查找特定账户的交易记录,或匹配余额对应的source类型。请勿通过猜测描述将为null的交易分配给某个source。
source_idsource_idTransactions
交易记录
Use transactions to answer questions about spending, income, merchants, categories, recurring payments, deposits, or account activity.
bash
link-cli transactions list --format jsonCommon 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>| Flag | Description |
|---|---|
| Only transactions on or after this date (YYYY-MM-DD). |
| Only transactions on or before this date (YYYY-MM-DD). |
| Filter by category. |
| Filter by origin: |
| 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>| 标志 | 描述 |
|---|---|
| 仅包含该日期及之后的交易(格式:YYYY-MM-DD)。 |
| 仅包含该日期及之前的交易(格式:YYYY-MM-DD)。 |
| 按分类筛选。 |
| 按来源筛选: |
| 按source ID筛选(可重复使用)。 |
有关共享列表控制,请参阅分页。
Response fields
响应字段
| Field | Note |
|---|---|
| Negative = money leaving the account (debit/purchase), positive = money entering (credit/deposit). |
| |
| May be |
| API-provided status string. Do not assume a closed set of values; observed values include |
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.
| 字段 | 说明 |
|---|---|
| 负数 = 资金流出账户(借记/消费),正数 = 资金流入账户(贷记/存款)。 |
| |
| 若未分类则可能为 |
| API提供的状态字符串。不要假设值的集合是固定的;已观察到的值包括 |
对于交易记录汇总:
- 在计算总额前统一符号规则。
- 尽可能区分借记和贷记。
- 仅在相关时按商家、分类、账户、货币或时间段分组。
- 提及答案是否基于有限的检索时间范围。
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>| Flag | Description |
|---|---|
| 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 ID筛选(可重复使用)。 |
有关共享列表控制,请参阅分页。
Response fields
响应字段
| Field | Note |
|---|---|
| |
| Balance before pending transactions. Not the same as available funds. |
| Object mapping currency codes to available funds (current minus outbound pending plus inbound pending). Only present when |
| Object mapping currency codes to credit used. Only present when |
| 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 field as the default definition of a balance, unless the user's question requires considering pending transactions.
current - If multiple sources are returned, summarize by account/source.
| 字段 | 说明 |
|---|---|
| |
| 待处理交易前的余额。不等于可用资金。 |
| 货币代码到可用资金的映射对象(当前余额减去待转出金额加上待转入金额)。仅当 |
| 货币代码到已使用信用额度的映射对象。仅当 |
| 余额最后更新的时间——可能已过时数小时或数天。 |
汇总余额时:
- 保留货币信息。
- 除非用户明确要求且有汇率数据可用,否则不要跨货币相加余额。
- 默认使用字段作为余额的定义,除非用户的问题需要考虑待处理交易。
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 jsonResponse fields
响应字段
| Field | Description |
|---|---|
| Unique source identifier (same as |
| Display name of the source. |
| Source type (e.g. |
| Object indicating what data is available. Each key (e.g. |
| Connection status to the external institution. |
| 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.
| 字段 | 描述 |
|---|---|
| 唯一的source标识符(与其他端点中的 |
| source的显示名称。 |
| source类型(例如: |
| 指示可用数据的对象。每个键(例如: |
| 与外部机构的连接状态。 |
| 用户为此source授予的操作权限列表。 |
汇总来源时:
- 仅包含回答问题所需的非敏感元数据。
- 避免暴露完整的账户号码、凭证、令牌或支付工具详情。
- 如果可用,优先使用机构、账户类型、source状态和最后更新时间等标签。
Pagination
分页
All three list commands support the same pagination flags:
| Flag | Description |
|---|---|
| Maximum results per page (1-100). Prefer |
| Fetch the next page after a cursor value. |
| Fetch the previous page before a cursor value. Use for reverse navigation, not normal forward collection. |
JSON responses contain a array and may contain . They do not provide a separate next-cursor field. When is , derive the next cursor from the final item in :
datahas_morehas_moretruedata| Command | Next cursor |
|---|---|
| Final transaction's |
| Final balance's |
| Final source's |
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 . Stop when is false or absent, or when enough data has been retrieved for a non-exhaustive lookup. If is true but is empty or the required cursor is null or missing, stop and report that pagination could not continue.
--starting-afterhas_morehas_moredataDo not exhaustively paginate unless the user’s request requires a complete bounded result, such as a total for a specified time range.
三个列表命令均支持相同的分页标志:
| 标志 | 描述 |
|---|---|
| 每页最大结果数(1-100)。当可能需要多页时,优先使用 |
| 从指定游标值之后获取下一页。 |
| 从指定游标值之前获取上一页。用于反向导航,不用于常规正向收集。 |
JSON响应包含数组,可能包含。响应不提供单独的下一页游标字段。当为时,从中的最后一项推导下一页游标:
datahas_morehas_moretruedata| 命令 | 下一页游标 |
|---|---|
| 最后一条交易记录的 |
| 最后一条余额记录的 |
| 最后一个source的 |
示例:
bash
link-cli transactions list --format json --limit 100 --starting-after <last_transaction_id>跨页面保持所有筛选条件一致,仅更改。当为false或不存在,或已检索到足够数据用于非穷尽查询时,停止分页。如果为true但为空,或所需游标为null或缺失,请停止并报告无法继续分页。
--starting-afterhas_morehas_moredata除非用户的请求需要完整的限定结果(例如指定时间范围的总额),否则不要进行穷尽分页。
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 when a session is already authenticated and when it is not, then wait for approval before retrying the data command once.
auth upgradeauth loginIf data is incomplete or paginated, clearly state that the answer is based on the data retrieved so far.
如果身份验证失败,请要求用户重新验证。
如果命令未返回数据,请告知用户在请求范围内没有匹配的Link金融数据。
如果CLI返回错误指示缺少权限或source actions,请仅请求特定缺失的操作权限。当会话已验证时使用,未验证时使用,然后等待批准后重试一次数据命令。
auth upgradeauth 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 for parsing.
--format json - Retrieve only the data needed.
- Summarize clearly and note limitations.
请勿:
- 转移资金。
- 发起支付。
- 修改财务来源。
- 获取无关的财务数据。
- 请求超出需求的source actions。
- 暴露凭证、令牌或完整的支付详情。
- 将不确定的衍生洞察作为确定结论呈现。
请:
- 使用只读命令。
- 在获取数据前完成身份验证。
- 请求最低要求的source actions。
- 使用进行解析。
--format json - 仅获取所需的数据。
- 清晰汇总并注明限制。