← 返回 Skills 市场
patello

Avanza Investment Tracker

作者 Patrik Ekenberg · GitHub ↗ · v2.0.2 · MIT-0
cross-platform ✓ 安全检测通过
211
总下载
0
收藏
0
当前安装
15
版本数
在 OpenClaw 中安装
/install avanza-investment-tracker
功能描述
Process Avanza CSV exports, calculate TWRR/Modified Dietz returns, and track portfolio performance. Use when importing stock transactions, calculating invest...
使用说明 (SKILL.md)

Avanza Investment Tracker

Parse transaction CSVs and compute portfolio performance metrics.

Quick Start

Run from skill root with data paths pointing to your workspace:

# Import transactions (data lives outside skill)
python scripts/cli.py import ../data/avanza/transactions.csv

# Calculate stats with auto price update
python scripts/cli.py stats --update-prices auto --database ../data/avanza/asset_data.db

# Or use defaults (assumes you cd into a data directory first)
cd ../data/avanza
python ../../skills/avanza-investment-tracker/scripts/cli.py import transactions.csv

Data Storage Pattern

User data lives OUTSIDE the skill directory. Recommended structure:

workspace-finance/
├── skills/avanza-investment-tracker/   # Portable skill (shareable)
│   ├── SKILL.md
│   ├── scripts/
│   └── assets/
└── data/avanza/                        # Your private data
    ├── transactions.csv
    ├── special_cases.json
    └── asset_data.db

The skill provides logic. Your data stays private and portable.

CLI Reference

Command Description
python scripts/cli.py import FILE Import transactions from CSV
python scripts/cli.py stats Show performance stats
python scripts/cli.py stats --update-prices auto Update prices, then show stats
python scripts/cli.py accounts Show account summaries
python scripts/cli.py status Check system status
python scripts/cli.py reset --confirm Clear database (DESTRUCTIVE)

All commands accept:

  • --database PATH (default: data/asset_data.db)
  • --special-cases PATH (default: data/special_cases.json)

Skill Contents

avanza-investment-tracker/
├── SKILL.md              # This file
├── requirements.txt      # pip dependencies
├── assets/               # Templates (copy to your data dir)
│   └── special_cases_template.json
├── scripts/              # Python code
│   ├── cli.py           # Main CLI entry
│   ├── data_parser.py
│   ├── database_handler.py
│   └── calculate_stats.py
└── references/           # Detailed guides (loaded as needed)
    ├── workflows.md
    └── troubleshooting.md

Dependencies

  • requests - For fetching stock prices
  • Standard library: sqlite3, csv, json, datetime, argparse

Install: pip install -r requirements.txt

Special Cases

Corporate actions (splits, spin-offs) may need manual rules:

  1. Copy template: cp assets/special_cases_template.json ../data/avanza/special_cases.json
  2. Edit with your rules
  3. Import with --special-cases ../data/avanza/special_cases.json

See Also

Account Filtering

By default, stats show all accounts. Use settings default-accounts to set your preferred accounts:

# Set default accounts (your main portfolio)
python scripts/cli.py --database ../data/avanza/asset_data.db settings default-accounts "1234567,Savings Account,9876543"

# View stats for default accounts only
python scripts/cli.py --database ../data/avanza/asset_data.db stats --account default

# Or specify accounts directly
python scripts/cli.py stats --account "1234567,Savings Account"

# View all accounts
python scripts/cli.py stats --account all
安全使用建议
This skill appears coherent for importing Avanza CSVs and computing returns. Before installing: 1) Review the implementation of the price-update code (StatCalculator.update_prices) to confirm which external API/URL it calls and whether that endpoint is acceptable — the package uses 'requests' to fetch prices but the SKILL.md does not list the provider. 2) Keep your data directories outside the skill folder (as documented) and back up your asset_data.db before running destructive commands; 'reset --confirm' is destructive. 3) Run pip install in a virtualenv (requirements.txt only lists 'requests'). 4) Inspect or test SpecialCases JSON templates carefully: they transform CSV rows and can change parsed fields; malformed rules could produce incorrect data. 5) If you need a stricter security posture, run the price-update step in an offline or sandboxed environment until you've verified the external endpoints and behavior.
功能分析
Type: OpenClaw Skill Name: avanza-investment-tracker Version: 2.0.2 The Avanza Investment Tracker skill is a legitimate tool for processing financial transaction CSVs and calculating portfolio performance metrics (TWRR/Modified Dietz). The code uses standard libraries (sqlite3, csv, json) and the 'requests' library to fetch stock prices from a known public endpoint (avanza.se). No evidence of data exfiltration, malicious execution, or prompt injection was found; all database operations use parameterized queries to prevent SQL injection, and the logic strictly follows the stated purpose in SKILL.md.
能力标签
cryptocan-make-purchases
能力评估
Purpose & Capability
The name/description (import Avanza CSVs, compute TWRR/Modified Dietz, track portfolio) match the provided scripts. The only external dependency is 'requests' which is appropriate for fetching prices. No unrelated credentials, binaries, or config paths are requested.
Instruction Scope
SKILL.md instructs running the included CLI scripts against user-provided data directories and explicitly states data should live outside the skill directory. Commands, options (database path, special_cases path), and the destructive 'reset --confirm' action are documented. The runtime instructions do not instruct reading unrelated system files or environment variables.
Install Mechanism
This is an instruction-only skill (no install spec). requirements.txt only lists 'requests'. No downloads from arbitrary URLs or archive extraction are present.
Credentials
The skill requires no environment variables or external credentials. Its use of 'requests' is consistent with price lookups; nothing in the manifest asks for unrelated secrets or elevated access.
Persistence & Privilege
always:false and model invocation is not disabled (the default). The skill does not request permanent platform-wide privileges. It stores and manipulates data only in user-specified SQLite databases and metadata tables within those databases.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install avanza-investment-tracker
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /avanza-investment-tracker 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.2
Fix: ensure transfer_net code included in published package
v2.0.1
Republish: ensure transfer_net code is included in package
v2.0.0
Version 2.0.0 - No file changes detected in this release. - Skill functionality, usage, and documentation remain unchanged.
v1.0.1
- Added _meta.json file for improved metadata management. - Updated scripts (calculate_stats.py, cli.py, database_handler.py) with minor changes and adjustments. - Removed version field from SKILL.md and made other editorial updates. - No breaking changes; core functionality remains the same.
v1.0.0
Nickname support, versioning, cleanup
v1.2.3
- Internal structure updates: removed unused _meta.json metadata file. - scripts/calculate_stats.py, scripts/cli.py, and scripts/database_handler.py updated, likely minor code and maintenance improvements. - No changes to user-facing commands or documentation.
v1.2.2
No functional or documentation changes; only metadata updated. - Internal metadata file (_meta.json) changed. - No user-facing code or documentation modifications.
v1.2.1
Added account nickname feature from PR #47
v1.2.0
No major changes in this release. - Internal metadata updated in _meta.json. - No changes to functionality or user-facing documentation.
v1.1.1
Documentation update
v1.1.0
Documentation cleanup
v0.1.0
Documentation update with cleaner example placeholders
v0.0.3
Account nicknames feature (PR #47): set/remove/list account display names. Updated all scripts from main.
v0.0.2
Synced with master branch (PR #45: Autogiroinsättning, Avkastningsskatt, Uttag av riskkostnad handlers)
v0.0.1
Initial release of avanza-investment-tracker. - Import and parse Avanza CSV transaction exports. - Calculate portfolio performance using TWRR and Modified Dietz methods. - Track holdings and transactions via a local SQLite database. - Handle corporate actions with a customizable special cases config. - CLI commands for importing data, updating prices, viewing stats, and account summaries.
元数据
Slug avanza-investment-tracker
版本 2.0.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 15
常见问题

Avanza Investment Tracker 是什么?

Process Avanza CSV exports, calculate TWRR/Modified Dietz returns, and track portfolio performance. Use when importing stock transactions, calculating invest... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 211 次。

如何安装 Avanza Investment Tracker?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install avanza-investment-tracker」即可一键安装,无需额外配置。

Avanza Investment Tracker 是免费的吗?

是的,Avanza Investment Tracker 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Avanza Investment Tracker 支持哪些平台?

Avanza Investment Tracker 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Avanza Investment Tracker?

由 Patrik Ekenberg(@patello)开发并维护,当前版本 v2.0.2。

💬 留言讨论