tres-cost-basis
БесплатноБез исполняемых скриптовНе проверенManage cost basis calculation in TRES Finance: check status, view/change strategy (FIFO, LIFO, AVG, MAX_GAINS, MAX_LOSSES, FIFO_IMPAIRMENT), trigger…
от anthropics★ 4 977 звёзд на GitHubОб этом скилле
TRES Finance — Cost Basis Management
End-to-end skill for managing cost basis calculation, strategy configuration, reevaluations, financial issue review, and related operations in TRES Finance.
MCP Server
All calls use the user-tres-finance MCP server (the TRES Finance MCP connector).
All variable keys and nested input fields MUST use camelCase (e.g. assetClassId, not asset_class_id).
Step 1 — Authenticate and confirm org
Call get_viewer with no arguments. Confirm the org name with the user if there
is any ambiguity.
Step 2 — Ensure a cost basis strategy is defined (gate before calculation)
Before any cost basis calculation can run, the organization must have a strategy defined. This step is a prerequisite gate — run it automatically whenever the user wants to calculate cost basis (Section D), or when they first ask for help with cost basis.
Fetch the current strategy using the query in Section B.
If
defaultStrategyis returned (any valid value like FIFO, LIFO, etc.), the strategy is already set — skip ahead and inform the user:"Your cost basis strategy is set to [STRATEGY]. Proceeding."
If no strategy is configured (the query returns null or an error), present the user with all available methods and ask them to choose:
"Before calculating cost basis, you need to choose a costing method. Here are the available strategies:
- FIFO — First-in, first-out. Earliest acquired lots are disposed first. The most common method.
- LIFO — Last-in, first-out. Most recently acquired lots are disposed first.
- AVG — Weighted average cost across all lots.
- MAX_GAINS — Disposes lowest-cost lots first, maximizing realized gains.
- MAX_LOSSES — Disposes highest-cost lots first, maximizing realized losses (useful for tax-loss harvesting).
- FIFO_IMPAIRMENT — FIFO with impairment accounting support (for orgs using impairment write-downs).
Which method would you like to use?"
Once the user picks a strategy, set it using the mutation in Section C (with an empty
strategyPeriodsarray if they just want a single default).Then proceed to the requested operation (typically Section D — trigger calculation).
This gate ensures no calculation runs without an explicit strategy choice.
Step 3 — Run cost basis calculation
After confirming strategy, check the current calculation status (Section A) and offer to run or re-run the calculation:
- Fetch status using the query in Section A.
- If
statusisIN_PROGRESS, inform the user it's already running and offer to wait:"Cost basis calculation is currently in progress (started at [time]). Would you like me to wait for it to finish?"
- If
statusisDONE, show when it last ran and ask:"Cost basis was last calculated on [lastFinishedAt]. Would you like to recalculate now, or view the existing results?"
- If
statusisITEM_NOT_FOUND, this org has never calculated — proceed directly to trigger. - When the user confirms (or on first-time run), trigger the calculation using the mutation in Section D.
- Poll status every ~10 seconds until
status = "DONE". - Once done, automatically proceed to show results per asset (Section E) and financial issues (Section F).
This step ensures the user always has fresh results and understands the calculation state before viewing data.
Available operations
Based on the user's request, follow the appropriate section below. Many users will come in with a general question like "help me with cost basis" — in that case, run Steps 1–3 (authenticate, check strategy, run calculation), then show results.
A. Check cost basis calculation status
Use this when the user asks whether cost basis is running, done, or when it last ran.
query CostBasisGetStatus {
costBasisGetStatus {
status
firstStartedAt
lastFinishedAt
updatedAt
}
}
status values: DONE, IN_PROGRESS, ITEM_NOT_FOUND (never calculated).
Report the status clearly. If IN_PROGRESS, let the user know it's still running
and they should wait. If DONE, report when it last finished.
B. View current cost basis strategy
Fetches the default strategy and any date-specific strategy overrides.
query GetCostBasisStrategyByDate {
getCostBasisStrategyByDate {
response {
strategyPeriods {
startDate
endDate
strategy
}
defaultStrategy
}
}
}
Present the default strategy and any period overrides clearly. Strategies:
FIFO, LIFO, AVG, MAX_GAINS, MAX_LOSSES, FIFO_IMPAIRMENT.
Explain what each means if the user asks:
- FIFO — First-in, first-out. Earliest acquired lots are sold first.
- LIFO — Last-in, first-out. Most recently acquired lots are sold first.
- AVG — Weighted average cost across all lots.
- MAX_GAINS — Sells lowest-cost
Установить tres-cost-basis в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл tres-cost-basis?
Manage cost basis calculation in TRES Finance: check status, view/change strategy (FIFO, LIFO, AVG, MAX_GAINS, MAX_LOSSES, FIFO_IMPAIRMENT), trigger recalculation, review financial issues, manage reevaluations/impairments, set bulk fiat prices, configure spec-ID lot disposal rules, view per-asset cost basis results, and export cost basis reports. Trigger this skill whenever the user asks about cost basis, gains/losses, realized gains, unrealized gains, COGS, inventory lots, tax lots, cost basis strategy, reevaluation, impairment, fiat value override, spec-ID rules, financial issues (negative balance, missing fiat), or anything related to how their crypto assets are costed. Also trigger when the user says "calculate cost basis", "what is my cost basis strategy", "show me financial issues", "create a reevaluation", "run cost basis", "change strategy to LIFO", or similar.
Как установить скилл tres-cost-basis?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл tres-cost-basis запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
gtm-enterprise-account-planning
Strategic account planning and execution for enterprise deals. Use when planning complex sales cycles, managing multiple stakeholders, applying MEDDICC…
от GitHubgtm-partnership-architecture
Build and scale partner ecosystems that drive revenue and platform adoption. Use when building partner programs from scratch, tiering partnerships, managing…
от GitHublanding-page-conversion-audit
Audit a landing page, sales page or checkout page for conversion leaks and return a fix list ordered by expected revenue impact. Use when asked to review…
от GitHubpower-platform-architect
Use this skill when the user needs to transform business requirements, use case descriptions, or meeting transcripts into a technical Power Platform solution…
от GitHub