Agent Skills
› NeverSight/learn-skills.dev
› rebalance
rebalance
GitHub执行投资组合再平衡,包括加载持仓与目标、分析偏离度、选择再平衡策略(如税务优化或现金流调整),生成具体交易建议并输出前后对比报告。
Trigger Scenarios
用户要求重新平衡投资组合
检查资产配置的偏离情况
修复当前的资产配置比例
Install
npx skills add NeverSight/learn-skills.dev --skill rebalance -g -y
SKILL.md
Frontmatter
{
"name": "rebalance",
"agent": "portfolio-analyzer",
"context": "fork",
"description": "Portfolio rebalancing — drift analysis, target allocation, tax-aware trade generation. Use when asked to rebalance, fix allocation, or check drift."
}
Portfolio Rebalancing
Step 1: Load Portfolio & Target
Load portfolio from ~/.wealthstack/portfolios/. Check for target at ~/.wealthstack/target-allocation.json.
If no target, ask the user:
- A) Conservative: 30% Equity / 60% Debt / 10% Gold
- B) Moderate: 60% Equity / 30% Debt / 10% Gold
- C) Growth: 80% Equity / 15% Debt / 5% Gold
- D) Aggressive: 95% Equity / 5% Cash
- E) Custom
Save target to ~/.wealthstack/target-allocation.json.
Step 2: Drift Analysis
| Asset Class | Target | Current | Drift | Status |
|---|
Flag drift >5%.
Step 3: Rebalancing Strategy
Ask:
- A) Full rebalance (taxable events)
- B) Cash-flow rebalance (new money to underweight only)
- C) Tax-aware (minimize STCG)
- D) Threshold-only (only positions drifting >5%)
Step 4: Trade Generation
Calculate specific trades. For tax-aware: prioritize selling loss lots, avoid short-term gain positions, flag wash sale concerns.
Step 5: Post-Rebalance Projection
Show before/after allocation and save plan to ~/.wealthstack/reports/.
Version History
- e0220ca Current 2026-07-05 22:13


