heterocat-skills / f-fund-advisor
CLAUDE.md4 starsChanged 8 months agoApache-2.0View on GitHub
fund-tools is a CLI-based fund portfolio management system (基金持仓管理系统) for managing fund holdings, importing CSV data, syncing with external MCP services, and displaying statistics. When completing a feature or fix, follow this workflow: Claude should automatically commit and push after completing tasks unless the user specifies otherwise. Important: All tests must pass before committing changes. Follow conventional commits format: - feat: - New feature - fix: - Bug fix - docs: - Documentation changes - refactor: - Code refactoring -…
- Commits and pushes
In this repository47 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .claude/skills/t-supabase/CLAUDE.mdCLAUDE.md
- agent-browserSkill
- find-skillsSkill
- skill-creatorSkill
- fund-advisorSkill
- fundamentalsSkill
- fund-assistantSkill
- fund-screenerSkill
- eastmoney_fin_dataSkill
- eastmoney_fin_searchSkill
- f-mx-select-stockSkill
- mx_self_selectSkill
- eastmoney_stock_simulatorSkill
- baoyu-article-illustratorSkill
- xhs-note-creatorSkill
- auto-wechatSkill
- auto-xSkill
- doubao-image-genSkill
- doubao-videoSkill
- minimaxSkill
- nano-banana2Skill
- remotion-best-practicesSkill
- suno-musicSkill
- whisper-subtitleSkill
- arxivSkill
- bar-chart-race-generatorSkill
- perfect-PPTmakerSkill
- tech-news-dailySkill
- x-apiSkill
- yt-dlp-downloaderSkill
- brainstormingSkill
- dispatching-parallel-agentsSkill
- executing-plansSkill
- finishing-a-development-branchSkill
- frontend-designSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- subagent-driven-developmentSkill
- supabase-postgres-best-practicesSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- using-git-worktreesSkill
- using-superpowersSkill
- verification-before-completionSkill
- writing-plansSkill
- writing-skillsSkill
The file
We split this CLAUDE.md into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
When completing a feature or fix, follow this workflow:
- Distinctive: line 55
Important: All tests must pass before committing changes.
- Distinctive: line 81
Follow conventional commits format:
- Distinctive: line 99
Follow PEP 8 naming conventions
- Distinctive: line 100
Use dataclasses for data models
- Distinctive: line 101
Use Click for CLI commands
- Distinctive: line 102
Use Rich for terminal output
≈ “Common” is an estimate: at least 1 in 5 of the 28,029 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
fund-tools is a CLI-based fund portfolio management system (基金持仓管理系统) for managing fund holdings, importing CSV data, syncing with external MCP services, and displaying statistics.
Development Commands
# Run CLI (via bash script)
bash scripts/fund-cli.sh --help
bash scripts/fund-cli.sh <command> [options]
# Common commands
bash scripts/fund-cli.sh init # Initialize environment (mcporter + qieman-mcp)
bash scripts/fund-cli.sh import-csv tools/data/sample.csv # Import holdings from CSV
bash scripts/fund-cli.sh sync --all # Sync fund data from MCP service
bash scripts/fund-cli.sh group -c fund_manager # Group by fund manager
bash scripts/fund-cli.sh query -c fund_name -v "货币" # Query funds by name
bash scripts/fund-cli.sh detail 004137 # View specific fund detail
# Run unit tests
cd tools && ./venv/bin/python -m pytest tests/ -vDevelopment Workflow
Collaborative Development Process
When completing a feature or fix, follow this workflow:
- Check current status:
git status - Stage changes:
git add <files>orgit add . - Run unit tests:
cd tools && ./venv/bin/python -m pytest tests/ -v - Commit with conventional message:
git commit -m "type: description" - Push to remote:
git push
Claude should automatically commit and push after completing tasks unless the user specifies otherwise.
Running Tests
# Run all tests
cd tools && ./venv/bin/python -m pytest tests/ -v
# Run specific test class
cd tools && ./venv/bin/python -m pytest tests/test_fund_tools.py::TestDatabase -v
# Run with coverage
cd tools && ./venv/bin/python -m pytest tests/ -v --cov=srcImportant: All tests must pass before committing changes.
Git Commands Reference
# Check status
git status
# Stage specific files
git add <file1> <file2>
# Stage all changes
git add .
# Commit with message
git commit -m "type: description"
# Push to remote
git push
# Pull latest changes
git pullCommit Message Convention
Follow conventional commits format:
feat:- New featurefix:- Bug fixdocs:- Documentation changesrefactor:- Code refactoringtest:- Adding testschore:- Maintenance tasks
Example:
feat: 添加投资类型分布统计功能
fix: 修复CSV导入列名换行符问题
docs: 更新README安装说明Code Style
- Use Python 3.10+ features
- Follow PEP 8 naming conventions
- Use dataclasses for data models
- Use Click for CLI commands
- Use Rich for terminal output
Architecture
fund-tools/
├── SKILL.md # AgentSkills skill 定义
├── scripts/ # Skill 调用脚本
│ └── fund-cli.sh # CLI 包装脚本 (bash)
├── references/ # 参考文档
├── assets/ # 静态资源
└── tools/ # Python 包 (可安装)
├── pyproject.toml # 包配置
├── requirements.txt # 依赖列表
├── venv/ # 虚拟环境
├── data/ # 数据文件
└── src/ # 源代码
├── cli.py # CLI 入口 (Click-based)
├── models.py # Data models
├── database.py # SQLite operations
├── csv_importer.py # CSV parsing
├── mcp_service.py # MCP integration
├── statistics.py # Rich-based output
└── env_checker.py # Environment validationKey Design Decisions
- SQLite database with three tables:
fund_holdings(user holdings),fund_info(fund metadata),fund_holdings_detail(stock/bond holdings) - Composite primary key for holdings:
(fund_account, trade_account, fund_code) - Upsert pattern throughout database operations for idempotent imports
- Batch processing in MCP service (max 20 funds per API call)
- Multiple encoding support for CSV import (utf-8, utf-8-sig, gbk, gb18030)
External Dependencies
- mcporter: External CLI tool required for MCP service integration
- qieman-mcp: MCP server for fund data (configured in
~/.mcporter/mcporter.json)
CSV Import Format
Required columns (Chinese names):
- 基金代码, 基金名称, 基金账户, 交易账户, 持有份额, 份额日期, 基金净值, 净值日期, 资产情况(结算币种)
Fund Types
Defined in FundType enum for future expansion: PUBLIC_FUND, ETF, LOF, CLOSED_END
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

