tax-loss-harvest-scanner

扫描应税经纪账户中单个持仓的未实现亏损,并识别超过可配置阈值的收割候选。检查近期买入及未来计划买入的实质上相同证券以识别洗售风险(涵盖所有家庭成员账户,包括配偶账户),并提出收割配对方案:卖出亏损证券并立即买入类似但不完全相同的替代证券。适用于年终税务规划、月度税务亏损收割扫描、市场下跌后,或当用户提及税务亏损收割、TLH、洗售或收割候选证券时使用。

仓库最近推送
GitHub Stars
206
Forks
28
Issues / PRs
3

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "tax-loss-harvest-scanner":https://skillpi.com/zh/skills/deepskill-8c8ac4bd8a1ef3905b945099de8afda96f5c1355b2a8341a0b95ffa8b4a57ec2。安装前核对上游来源和版本:https://github.com/lyndonkl/claude。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

扫描应税经纪账户中单个持仓的未实现亏损,并识别超过可配置阈值的收割候选。检查近期买入及未来计划买入的实质上相同证券以识别洗售风险(涵盖所有家庭成员账户,包括配偶账户),并提出收割配对方案:卖出亏损证券并立即买入类似但不完全相同的替代证券。适用于年终税务规划、月度税务亏损收割扫描、市场下跌后,或当用户提及税务亏损收割、TLH、洗售或收割候选证券时使用。

0 下载

介绍来源: third_party · lyndonkl · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
输入和输出
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: tax-loss-harvest-scanner
description: Scans a taxable brokerage account for individual lots with unrealized losses above a configurable threshold, identifies wash-sale risks by checking recent buys and forward planned buys of substantially identical securities (across all household accounts including spousal), and proposes harvest pairs (sell-for-loss + immediate buy of a similar-but-not-identical replacement). Use for year-end tax planning, monthly TLH scans, after market drawdowns, or when user mentions tax-loss harvesting, TLH, wash sale, or harvest candidates.

Tax-Loss Harvest Scanner

Table of Contents

Overview

Tax-loss harvesting realizes losses in a taxable brokerage to offset gains (and up to $3,000 of ordinary income per year) without changing the household's economic position — the proceeds buy a similar-but-not-identical security, keeping market exposure intact. The hardest part is the wash-sale rule: a sale at a loss is disallowed if a substantially identical security is bought within 30 days in any household account, including a spouse's IRA.

This skill scans the taxable brokerage for harvest candidates and validates each against the wash-sale window across all household accounts.

Input contract

The caller provides:

  • taxable_holdings — lots in the taxable brokerage, ideally per-lot: {symbol, shares, cost_basis_cents, value_cents, acquisition_date}. If only aggregate position-level data is available, mark lot_resolution: aggregate and document the limitation.
  • all_account_transactions_60d — every buy/sell/dividend reinvest across every household account (taxable, 401k, IRA, spouse's IRA, HSA) in the last 60 days. Used for wash-sale detection.
  • planned_buys_30d (optional) — dividend reinvest schedules, 401k contributions, automatic deposits — anything that will buy in the next 30 days.
  • loss_threshold_cents — minimum unrealized loss to consider; default 50000 ($500).
  • today — ISO date.

Wash-sale rules

Per IRS, a wash sale is triggered when a security sold at a loss is replaced by a "substantially identical" security purchased within the 61-day window centered on the sale date (30 days before, 30 days after).

For this skill:

  1. Same ticker. Always substantially identical. Period.
  2. Same fund family, same index. VTI ↔ VFIAX ↔ FXAIX (S&P 500 / Total US trackers from different families) are generally not considered identical by IRS guidance — but the skill conservatively treats two funds tracking the same index as substantially identical.
  3. Different index, similar exposure. VTI (Total US Market) ↔ ITOT (Total US Market different family) — not substantially identical. These are valid TLH pairs.
  4. All household accounts count. Spouse's IRA, 401k auto-purchases, HSA auto-buys — all in scope.
  5. Dividend reinvestment. A dividend reinvest within the 30-day window IS a wash-sale triggering buy. Disable DRIP on the harvested security before the sale.

Workflow

TLH Scan Progress:
- [ ] Step 1: Filter taxable lots with unrealized loss >= loss_threshold
- [ ] Step 2: For each candidate, check 30-day backward wash-sale window
- [ ] Step 3: For each candidate, check 30-day forward planned-buys window
- [ ] Step 4: Identify substitute security (similar exposure, not identical)
- [ ] Step 5: Compute realized loss and tax savings estimate
- [ ] Step 6: Emit harvest proposals with explicit wash-sale guard
- [ ] Step 7: Surface candidates blocked by wash sale with the unblock date

Step 1 — Loss filter

unrealized_loss_cents = value_cents − cost_basis_cents (negative). Keep lots where |unrealized_loss_cents| ≥ loss_threshold_cents AND unrealized_loss_cents < 0.

If lot-level resolution is unavailable, fall back to position-level using weighted_avg_cost_basis. Document lot_resolution: aggregate and warn that some lots may have gains while others have losses; only the aggregate is loss-positive.

Step 2 — Backward window

For each candidate symbol, look back 30 days in all_account_transactions_60d for any buy of the same or substantially-identical security. If found, the sale would be partially or fully washed — disallow until 30 days after the most recent buy. Surface as blocked_until: YYYY-MM-DD.

Step 3 — Forward window

Look at planned_buys_30d for the same or substantially-identical security. Common cases:

  • 401k payroll contribution buys an S&P 500 index fund every 2 weeks → if harvesting S&P 500 in taxable, the next 401k buy washes the loss.
  • Dividend reinvest scheduled.
  • Automatic monthly brokerage deposit.

Resolutions:

  • For 401k payroll: if practical, change the 401k buy to a different asset class for one cycle; otherwise harvest a different security.
  • For DRIP: turn off DRIP on the harvest target ≥ 1 day before sale.
  • For automatic deposits: defer or redirect.

Step 4 — Substitute pair

Pick a substitute that maintains market exposure. The skill carries a default mapping (see Substitute pairs). The substitute must:

  • Track a similar but distinct index.
  • Be available in the destination account.
  • Have low expense ratio (ideally ≤ 0.10%).

Step 5 — Tax savings estimate

tax_savings_cents ≈ |realized_loss_cents| × marginal_rate, where marginal rate is provided or defaulted to 24% for offsetting ordinary income up to $3,000 and 15% for offsetting long-term gains. Surface both.

Step 6 — Emit proposal

Each proposal includes:

  • Sell side: account, symbol, lot(s), shares, realized loss.
  • Buy side: account, substitute symbol, shares, dollar amount.
  • Wash-sale guard: confirmed clear ±30 days.
  • Tax savings estimate.
  • Disable-DRIP step (if applicable).

Step 7 — Blocked candidates

For losses that are blocked, emit a blocked[] list with unblock_date so the user knows when the candidate becomes harvestable.

Substitute pairs

Reasonable starting pairs (skill emits these as proposed, not authoritative):

Sell Buy substitute Rationale
VTI (Total US Market) ITOT (Total US Market, iShares) Different family, similar exposure
VOO (S&P 500) VTI (Total US Market) Different index
VXUS (Total Intl) IXUS (Total Intl, iShares) Different family
BND (US Aggregate Bond) AGG (US Aggregate Bond, iShares) Different family, same exposure — borderline; prefer a slightly different index like SCHZ
IEFA (Developed Intl) VEA (Developed Intl) Different family
FXAIX (Fidelity S&P 500) FSKAX (Fidelity Total Market) Different index

Always document the substitute as a suggestion — the user verifies appropriateness for their plan.

Output contract

{
  "as_of": "2026-04-25",
  "candidates_total": 5,
  "harvest_proposals": [
    {
      "id": "tlh_20260425_001",
      "sell": {
        "account_id": "acc_inv_fid_001",
        "symbol": "VTI",
        "lots": [
          { "acquisition_date": "2024-09-12", "shares": 35, "cost_basis_cents": 985250, "value_cents": 935500 }
        ],
        "realized_loss_cents": -49750
      },
      "buy": {
        "account_id": "acc_inv_fid_001",
        "symbol": "ITOT",
        "shares": 38,
        "value_cents": 935500,
        "rationale": "Substantially similar exposure to VTI, different index family — not substantially identical per common interpretation"
      },
      "wash_sale_check": {
        "backward_30d_clear": true,
        "forward_30d_clear": false,
        "blockers": [
          { "type": "401k_payroll_buy", "symbol_substantially_identical": "FSKAX", "buy_date": "2026-05-02" }
        ],
        "remediation": "Change 401k allocation away from FSKAX for the 2026-05-02 cycle, or harvest a different security"
      },
      "tax_savings_estimate_cents": 11940,
      "drip_disable_required": true,
      "status": "remediation_required"
    }
  ],
  "blocked": [
    {
      "symbol": "VXUS",
      "reason": "spouse_ira_buy_within_30d",
      "unblock_date": "2026-05-12"
    }
  ],
  "warnings": []
}

Guardrails

  • Wash-sale check across ALL household accounts. Spousal IRAs count. 401k auto-purchases count. DRIP counts.
  • Lot-level resolution preferred. Aggregate-only data should reduce confidence and surface a warning.
  • Substitute is a proposal. The user must confirm it's not "substantially identical" per their interpretation; the IRS has not crisply defined this for all index pairs.
  • Disable DRIP before the sale. If DRIP is on for the harvested security, the next dividend washes the loss.
  • Don't pair across account types blindly. A loss harvested in taxable cannot be replaced by a buy in 401k of the same security — that's still a wash sale.
  • Track realized losses YTD. Surface running total — once the user has $3,000 of net realized losses to offset ordinary income, additional harvesting only carries forward (still useful, but lower marginal benefit).
  • Never execute. Proposals only.

版本历史

  1. 0.1 GitHub ↗
    原版更新说明

    ## What's Changed * Improve writer skill navigation and structure by @lyndonkl in https://github.com/lyndonkl/claude/pull/1 * Consolidate stickiness content and reduce revision to 3 passes by @lyndonkl in https://github.com/lyndonkl/claude/pull/2 * Update README.md to reflect current writer skill structure by @lyndonkl in https://github.com/lyndonkl/claude/pull/3 * Add explicit instructions for AI agents to follow resource file workf… by @lyndonkl in https://github.com/lyndonkl/claude/pull/4 * Change analysis files from /tmp/ to project directory by @lyndonkl in https://github.com/lyndonkl/claude/pull/5 * Add five refined skills to production by @lyndonkl in https://github.com/lyndonkl/claude/pull/6 * Add causal-inference-root-cause skill and fix missing methodology files by @lyndonkl in https://github.com/lyndonkl/claude/pull/7 * Add workflow pattern to 6 completed skills by @lyndonkl in https://github.com/lyndonkl/claude/pull/8 * Add chain-estimation and roleplay-debate skills with optimizations by @lyndonkl in https://github.com/lyndonkl/claude/pull/9 * Add 3 new skills and update writer skill workflow pattern by @lyndonkl in https://github.com/lyndonkl/claude/pull/10 * Add skills #12-13: constraint-based-creativity and data-schema-knowle… by @lyndonkl in https://github.com/lyndonkl/claude/pull/11 * Add skills #14-16: decision-matrix, decomposition-reconstruction, deliberation-debate-red-teaming by @lyndonkl in https://github.com/lyndonkl/claude/pull/12 * Add skills #17-19: design-of-experiments, dialectical-mapping-steelmanning, discovery-interviews-surveys by @lyndonkl in https://github.com/lyndonkl/claude/pull/13 * Add chef-assistant skill and update README by @lyndonkl in https://github.com/lyndonkl/claude/pull/14 * Fix README: Remove links to gitignored scratchpad files by @lyndonkl in https://github.com/lyndonkl/claude/pull/15 * Add skills #14-22: 9 new production-ready skills by @lyndonkl in https://github.com/lyndonkl/claude/pull/16 * Add skills #20-24 and workflow pattern updates by @lyndonkl in https://github.com/lyndonkl/claude/pull/17 * Add skill #25: expected-value by @lyndonkl in https://github.com/lyndonkl/claude/pull/18 * Add skills #26-28: facilitation-patterns, financial-unit-economics, focus-timeboxing-8020 by @lyndonkl in https://github.com/lyndonkl/claude/pull/19 * Add skills #29-30: heuristics-and-checklists, hypotheticals-counterfactuals by @lyndonkl in https://github.com/lyndonkl/claude/pull/20 * Add skills #31-33: information-architecture, kill-criteria-exit-ramps, layered-reasoning by @lyndonkl in https://github.com/lyndonkl/claude/pull/21 * Add Claude Code plugin support by @lyndonkl in https://github.com/lyndonkl/claude/pull/22 * Fix plugin marketplace source path by @lyndonkl in https://github.com/lyndonkl/claude/pull/23 * Add skill #34: mapping-visualization-scaffolds by @lyndonkl in https://github.com/lyndonkl/claude/pull/24 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/25 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/26 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/27 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/28 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/29 * Add skill #59: skill-extraction by @lyndonkl in https://github.com/lyndonkl/claude/pull/30 * Add skill-creator: Transform documents into actionable skills by @lyndonkl in https://github.com/lyndonkl/claude/pull/31 * Update skill count from 58 to 61 in README by @lyndonkl in https://github.com/lyndonkl/claude/pull/32 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/33 * Add d3-visualization skill: comprehensive D3.js implementation guide by @lyndonkl in https://github.com/lyndonkl/claude/pull/34 * Add comprehensive Superforecasting Toolkit with 4 skills and orchestr… by @lyndonkl in https://github.com/lyndonkl/claude/pull/35 * Add "Run in Smithery" badge by @gurdasnijor in https://github.com/lyndonkl/claude/pull/36 * Add Scientific Writing Toolkit with 6 skills and orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/37 * Improve skill invocation rules and update README by @lyndonkl in https://github.com/lyndonkl/claude/pull/38 * Add Geometric Deep Learning skill suite and orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/39 * Decompose writer skill into 4 focused skills + orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/40 * Add GraphRAG skill suite with 5 skills + orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/41 * Decompose cognitive-design skill into 3 focused skills + orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/42 ## New Contributors * @lyndonkl made their first contribution in https://github.com/lyndonkl/claude/pull/1 * @gurdasnijor made their first contribution in https://github.com/lyndonkl/claude/pull/36 **Full Changelog**: https://github.com/lyndonkl/claude/commits/0.1

当前收录版本

0.0.1

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值92/100

亮点

  • 税务亏损收割是成熟投资者的核心策略,直接解决明确的财务痛点,显著提升投资效率
  • 具有广泛受众和实际经济价值,适用于年终税务规划、月度扫描、市场下跌后等多种场景
触发精准95/100

亮点

  • 触发词精准完整,覆盖多种变体,边界清晰
  • 明确列出了适用场景和触发关键词,涵盖年终规划、月度扫描、市场下跌后等典型使用时机
结构规范90/100

亮点

  • Phase/步骤清晰,有出口条件,含端到端示例
  • frontmatter完整,单文件≤500行,文档结构完整,逻辑清晰
执行可靠88/100

亮点

  • 工具来源明确,参数正确,覆盖主要异常
  • 不可逆操作有确认机制,明确声明仅提供提案不执行
证据可验 (前四项均值)91/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。