{"owner":"ricequant","repo":"rqalpha","hasSkills":true,"totalSkillsCount":1,"totalTokensCount":1042,"categories":["claude-rule"],"hasMcp":false,"mcpConfig":null,"found":["CLAUDE.md"],"skills":{"CLAUDE.md":"# CLAUDE.md\n\nRQAlpha is an algorithmic trading system for quantitative trading with backtesting and live trading capabilities.\n\n**License**: Non-commercial use only (Apache 2.0). Commercial use requires authorization from Ricequant.\n\n## Quick Commands\n\n```bash\n# Run backtest\nrqalpha run -f strategy.py -s 2014-01-01 -e 2016-01-01 --account stock 100000\n\n# With RQData connection\nrqalpha run --rqdatac-uri tcp://user:password@host:port -f strategy.py -s 2014-01-01 -e 2016-01-01 --account stock 100000\n\n# Download bundle data\nrqalpha download-bundle\n\n# Update bundle\nrqalpha update-bundle --rqdatac-uri tcp://user:password@host:port\n\n# Generate examples\nrqalpha examples -d ./examples\n\n# Run tests\npytest\npytest tests/unittest/\npytest tests/integration_tests/\n```\n\n## Project-Specific Rules\n\n### When Writing Strategies\n\n1. **Always consult documentation first**: Read `docs/source/intro/tutorial.rst` and `docs/source/api/base_api.rst` before writing strategies\n2. **Use correct API signatures**: Check `docs/source/api/base_api.rst` for function parameters and return types\n3. **Follow strategy lifecycle**: Implement `init()`, `before_trading()`, `handle_bar()`, `after_trading()` in correct order\n4. **Stock code format**: Always use format like \"000001.XSHE\" (code + exchange)\n5. **Date format**: Use 'YYYY-MM-DD' format for dates\n\n### When Debugging/Testing\n\n1. **Write minimal reproducible examples**: Create smallest possible strategy that reproduces the bug\n2. **Use logger, not print**: Use `logger.info()` instead of `print()` in strategies\n3. **Add assertions**: Verify expected behavior with assertions in test code\n4. **Short date ranges**: Use 1-3 month ranges for faster iteration during testing\n\n### Code Modifications\n\n1. **Chinese comments OK**: Domain-specific logic can use Chinese comments\n2. **Follow PEP 8**: Standard Python style guide\n3. **Test before commit**: Run pytest to ensure tests pass and follow the static-check workflow below for Python changes\n4. **If translatable strings change**: sync Babel artifacts using the commands in `babel.cfg`\n   `pybabel extract -F babel.cfg --input-dirs rqalpha/ -o messages.pot`\n   `pybabel update -i messages.pot -d rqalpha/utils/translations`\n   update `rqalpha/utils/translations/zh_Hans_CN/LC_MESSAGES/messages.po` as needed, then run\n   `pybabel compile -d rqalpha/utils/translations`\n\n### Static Checks for Python Changes\n\n1. Identify all added or modified Python files in the current change, including staged, unstaged, and untracked new files. Skip deleted files.\n2. From the repository root, pass those file paths explicitly to mypy and Ruff. Replace the example paths below with the actual changed files:\n\n   ```bash\n   python -m mypy path/to/changed_file.py path/to/another_changed_file.py\n   python -m ruff check path/to/changed_file.py path/to/another_changed_file.py\n   ```\n\n3. Focus on diagnostics in the changed files and fix issues introduced by the current change. Unrelated historical errors, including errors in unchanged files, may be deferred; briefly report any deferred errors rather than expanding the scope to clean up the whole repository.\n4. mypy checks types; Ruff currently enables B909 to detect collection mutation during iteration. Keep file and directory scope in the commands, not in `pyproject.toml`. Do not weaken check rules or add blanket suppressions to hide new errors.\n\n## Key Architecture Points\n\n- **Environment singleton**: Access via `Environment.get_instance()` - central registry for all components\n- **Event-driven**: Mods subscribe to events (BAR, TICK, BEFORE_TRADING, etc.)\n- **Mod system**: Extensibility through `AbstractMod` interface\n- **Data bundle**: HDF5 format stored in `~/.rqalpha/bundle/`\n- **Config hierarchy**: CLI args > strategy `__config__` > config file > defaults\n\n## Detailed Documentation\n\nFor detailed information, see:\n- **Architecture**: `docs/claude/architecture.md` - Core components and system design\n- **Strategy Writing**: `docs/claude/strategy-guide.md` - How to write strategies with API reference\n- **Bug Reproduction**: `docs/claude/bug-reproduction.md` - Writing backtests to reproduce bugs\n- **Development**: `docs/claude/development.md` - Development guidelines and debugging\n\nOfficial documentation:\n- Tutorial: `docs/source/intro/tutorial.rst`\n- API Reference: `docs/source/api/base_api.rst`\n- Examples: `docs/source/intro/examples.rst`\n"},"files":{"CLAUDE.md":"# CLAUDE.md\n\nRQAlpha is an algorithmic trading system for quantitative trading with backtesting and live trading capabilities.\n\n**License**: Non-commercial use only (Apache 2.0). Commercial use requires authorization from Ricequant.\n\n## Quick Commands\n\n```bash\n# Run backtest\nrqalpha run -f strategy.py -s 2014-01-01 -e 2016-01-01 --account stock 100000\n\n# With RQData connection\nrqalpha run --rqdatac-uri tcp://user:password@host:port -f strategy.py -s 2014-01-01 -e 2016-01-01 --account stock 100000\n\n# Download bundle data\nrqalpha download-bundle\n\n# Update bundle\nrqalpha update-bundle --rqdatac-uri tcp://user:password@host:port\n\n# Generate examples\nrqalpha examples -d ./examples\n\n# Run tests\npytest\npytest tests/unittest/\npytest tests/integration_tests/\n```\n\n## Project-Specific Rules\n\n### When Writing Strategies\n\n1. **Always consult documentation first**: Read `docs/source/intro/tutorial.rst` and `docs/source/api/base_api.rst` before writing strategies\n2. **Use correct API signatures**: Check `docs/source/api/base_api.rst` for function parameters and return types\n3. **Follow strategy lifecycle**: Implement `init()`, `before_trading()`, `handle_bar()`, `after_trading()` in correct order\n4. **Stock code format**: Always use format like \"000001.XSHE\" (code + exchange)\n5. **Date format**: Use 'YYYY-MM-DD' format for dates\n\n### When Debugging/Testing\n\n1. **Write minimal reproducible examples**: Create smallest possible strategy that reproduces the bug\n2. **Use logger, not print**: Use `logger.info()` instead of `print()` in strategies\n3. **Add assertions**: Verify expected behavior with assertions in test code\n4. **Short date ranges**: Use 1-3 month ranges for faster iteration during testing\n\n### Code Modifications\n\n1. **Chinese comments OK**: Domain-specific logic can use Chinese comments\n2. **Follow PEP 8**: Standard Python style guide\n3. **Test before commit**: Run pytest to ensure tests pass and follow the static-check workflow below for Python changes\n4. **If translatable strings change**: sync Babel artifacts using the commands in `babel.cfg`\n   `pybabel extract -F babel.cfg --input-dirs rqalpha/ -o messages.pot`\n   `pybabel update -i messages.pot -d rqalpha/utils/translations`\n   update `rqalpha/utils/translations/zh_Hans_CN/LC_MESSAGES/messages.po` as needed, then run\n   `pybabel compile -d rqalpha/utils/translations`\n\n### Static Checks for Python Changes\n\n1. Identify all added or modified Python files in the current change, including staged, unstaged, and untracked new files. Skip deleted files.\n2. From the repository root, pass those file paths explicitly to mypy and Ruff. Replace the example paths below with the actual changed files:\n\n   ```bash\n   python -m mypy path/to/changed_file.py path/to/another_changed_file.py\n   python -m ruff check path/to/changed_file.py path/to/another_changed_file.py\n   ```\n\n3. Focus on diagnostics in the changed files and fix issues introduced by the current change. Unrelated historical errors, including errors in unchanged files, may be deferred; briefly report any deferred errors rather than expanding the scope to clean up the whole repository.\n4. mypy checks types; Ruff currently enables B909 to detect collection mutation during iteration. Keep file and directory scope in the commands, not in `pyproject.toml`. Do not weaken check rules or add blanket suppressions to hide new errors.\n\n## Key Architecture Points\n\n- **Environment singleton**: Access via `Environment.get_instance()` - central registry for all components\n- **Event-driven**: Mods subscribe to events (BAR, TICK, BEFORE_TRADING, etc.)\n- **Mod system**: Extensibility through `AbstractMod` interface\n- **Data bundle**: HDF5 format stored in `~/.rqalpha/bundle/`\n- **Config hierarchy**: CLI args > strategy `__config__` > config file > defaults\n\n## Detailed Documentation\n\nFor detailed information, see:\n- **Architecture**: `docs/claude/architecture.md` - Core components and system design\n- **Strategy Writing**: `docs/claude/strategy-guide.md` - How to write strategies with API reference\n- **Bug Reproduction**: `docs/claude/bug-reproduction.md` - Writing backtests to reproduce bugs\n- **Development**: `docs/claude/development.md` - Development guidelines and debugging\n\nOfficial documentation:\n- Tutorial: `docs/source/intro/tutorial.rst`\n- API Reference: `docs/source/api/base_api.rst`\n- Examples: `docs/source/intro/examples.rst`\n"},"items":[{"name":"CLAUDE.md","path":"CLAUDE.md","rawUrl":"https://raw.githubusercontent.com/ricequant/rqalpha/HEAD/CLAUDE.md","title":"Claude Agent Guidelines & System Prompt","category":"claude-rule","format":"markdown","content":"# CLAUDE.md\n\nRQAlpha is an algorithmic trading system for quantitative trading with backtesting and live trading capabilities.\n\n**License**: Non-commercial use only (Apache 2.0). Commercial use requires authorization from Ricequant.\n\n## Quick Commands\n\n```bash\n# Run backtest\nrqalpha run -f strategy.py -s 2014-01-01 -e 2016-01-01 --account stock 100000\n\n# With RQData connection\nrqalpha run --rqdatac-uri tcp://user:password@host:port -f strategy.py -s 2014-01-01 -e 2016-01-01 --account stock 100000\n\n# Download bundle data\nrqalpha download-bundle\n\n# Update bundle\nrqalpha update-bundle --rqdatac-uri tcp://user:password@host:port\n\n# Generate examples\nrqalpha examples -d ./examples\n\n# Run tests\npytest\npytest tests/unittest/\npytest tests/integration_tests/\n```\n\n## Project-Specific Rules\n\n### When Writing Strategies\n\n1. **Always consult documentation first**: Read `docs/source/intro/tutorial.rst` and `docs/source/api/base_api.rst` before writing strategies\n2. **Use correct API signatures**: Check `docs/source/api/base_api.rst` for function parameters and return types\n3. **Follow strategy lifecycle**: Implement `init()`, `before_trading()`, `handle_bar()`, `after_trading()` in correct order\n4. **Stock code format**: Always use format like \"000001.XSHE\" (code + exchange)\n5. **Date format**: Use 'YYYY-MM-DD' format for dates\n\n### When Debugging/Testing\n\n1. **Write minimal reproducible examples**: Create smallest possible strategy that reproduces the bug\n2. **Use logger, not print**: Use `logger.info()` instead of `print()` in strategies\n3. **Add assertions**: Verify expected behavior with assertions in test code\n4. **Short date ranges**: Use 1-3 month ranges for faster iteration during testing\n\n### Code Modifications\n\n1. **Chinese comments OK**: Domain-specific logic can use Chinese comments\n2. **Follow PEP 8**: Standard Python style guide\n3. **Test before commit**: Run pytest to ensure tests pass and follow the static-check workflow below for Python changes\n4. **If translatable strings change**: sync Babel artifacts using the commands in `babel.cfg`\n   `pybabel extract -F babel.cfg --input-dirs rqalpha/ -o messages.pot`\n   `pybabel update -i messages.pot -d rqalpha/utils/translations`\n   update `rqalpha/utils/translations/zh_Hans_CN/LC_MESSAGES/messages.po` as needed, then run\n   `pybabel compile -d rqalpha/utils/translations`\n\n### Static Checks for Python Changes\n\n1. Identify all added or modified Python files in the current change, including staged, unstaged, and untracked new files. Skip deleted files.\n2. From the repository root, pass those file paths explicitly to mypy and Ruff. Replace the example paths below with the actual changed files:\n\n   ```bash\n   python -m mypy path/to/changed_file.py path/to/another_changed_file.py\n   python -m ruff check path/to/changed_file.py path/to/another_changed_file.py\n   ```\n\n3. Focus on diagnostics in the changed files and fix issues introduced by the current change. Unrelated historical errors, including errors in unchanged files, may be deferred; briefly report any deferred errors rather than expanding the scope to clean up the whole repository.\n4. mypy checks types; Ruff currently enables B909 to detect collection mutation during iteration. Keep file and directory scope in the commands, not in `pyproject.toml`. Do not weaken check rules or add blanket suppressions to hide new errors.\n\n## Key Architecture Points\n\n- **Environment singleton**: Access via `Environment.get_instance()` - central registry for all components\n- **Event-driven**: Mods subscribe to events (BAR, TICK, BEFORE_TRADING, etc.)\n- **Mod system**: Extensibility through `AbstractMod` interface\n- **Data bundle**: HDF5 format stored in `~/.rqalpha/bundle/`\n- **Config hierarchy**: CLI args > strategy `__config__` > config file > defaults\n\n## Detailed Documentation\n\nFor detailed information, see:\n- **Architecture**: `docs/claude/architecture.md` - Core components and system design\n- **Strategy Writing**: `docs/claude/strategy-guide.md` - How to write strategies with API reference\n- **Bug Reproduction**: `docs/claude/bug-reproduction.md` - Writing backtests to reproduce bugs\n- **Development**: `docs/claude/development.md` - Development guidelines and debugging\n\nOfficial documentation:\n- Tutorial: `docs/source/intro/tutorial.rst`\n- API Reference: `docs/source/api/base_api.rst`\n- Examples: `docs/source/intro/examples.rst`\n","isInternal":false,"tokens":1042,"sizeBytes":4395}],"systemPromptSnippet":"<yakaai_skills repo=\"ricequant/rqalpha\">\n<!-- File: CLAUDE.md (Tokens: ~1042 | Category: claude-rule) -->\n# CLAUDE.md\n\nRQAlpha is an algorithmic trading system for quantitative trading with backtesting and live trading capabilities.\n\n**License**: Non-commercial use only (Apache 2.0). Commercial use requires authorization from Ricequant.\n\n## Quick Commands\n\n```bash\n# Run backtest\nrqalpha run -f strategy.py -s 2014-01-01 -e 2016-01-01 --account stock 100000\n\n# With RQData connection\nrqalpha run --rqdatac-uri tcp://user:password@host:port -f strategy.py -s 2014-01-01 -e 2016-01-01 --account stock 100000\n\n# Download bundle data\nrqalpha download-bundle\n\n# Update bundle\nrqalpha update-bundle --rqdatac-uri tcp://user:password@host:port\n\n# Generate examples\nrqalpha examples -d ./examples\n\n# Run tests\npytest\npytest tests/unittest/\npytest tests/integration_tests/\n```\n\n## Project-Specific Rules\n\n### When Writing Strategies\n\n1. **Always consult documentation first**: Read `docs/source/intro/tutorial.rst` and `docs/source/api/base_api.rst` before writing strategies\n2. **Use correct API signatures**: Check `docs/source/api/base_api.rst` for function parameters and return types\n3. **Follow strategy lifecycle**: Implement `init()`, `before_trading()`, `handle_bar()`, `after_trading()` in correct order\n4. **Stock code format**: Always use format like \"000001.XSHE\" (code + exchange)\n5. **Date format**: Use 'YYYY-MM-DD' format for dates\n\n### When Debugging/Testing\n\n1. **Write minimal reproducible examples**: Create smallest possible strategy that reproduces the bug\n2. **Use logger, not print**: Use `logger.info()` instead of `print()` in strategies\n3. **Add assertions**: Verify expected behavior with assertions in test code\n4. **Short date ranges**: Use 1-3 month ranges for faster iteration during testing\n\n### Code Modifications\n\n1. **Chinese comments OK**: Domain-specific logic can use Chinese comments\n2. **Follow PEP 8**: Standard Python style guide\n3. **Test before commit**: Run pytest to ensure tests pass and follow the static-check workflow below for Python changes\n4. **If translatable strings change**: sync Babel artifacts using the commands in `babel.cfg`\n   `pybabel extract -F babel.cfg --input-dirs rqalpha/ -o messages.pot`\n   `pybabel update -i messages.pot -d rqalpha/utils/translations`\n   update `rqalpha/utils/translations/zh_Hans_CN/LC_MESSAGES/messages.po` as needed, then run\n   `pybabel compile -d rqalpha/utils/translations`\n\n### Static Checks for Python Changes\n\n1. Identify all added or modified Python files in the current change, including staged, unstaged, and untracked new files. Skip deleted files.\n2. From the repository root, pass those file paths explicitly to mypy and Ruff. Replace the example paths below with the actual changed files:\n\n   ```bash\n   python -m mypy path/to/changed_file.py path/to/another_changed_file.py\n   python -m ruff check path/to/changed_file.py path/to/another_changed_file.py\n   ```\n\n3. Focus on diagnostics in the changed files and fix issues introduced by the current change. Unrelated historical errors, including errors in unchanged files, may be deferred; briefly report any deferred errors rather than expanding the scope to clean up the whole repository.\n4. mypy checks types; Ruff currently enables B909 to detect collection mutation during iteration. Keep file and directory scope in the commands, not in `pyproject.toml`. Do not weaken check rules or add blanket suppressions to hide new errors.\n\n## Key Architecture Points\n\n- **Environment singleton**: Access via `Environment.get_instance()` - central registry for all components\n- **Event-driven**: Mods subscribe to events (BAR, TICK, BEFORE_TRADING, etc.)\n- **Mod system**: Extensibility through `AbstractMod` interface\n- **Data bundle**: HDF5 format stored in `~/.rqalpha/bundle/`\n- **Config hierarchy**: CLI args > strategy `__config__` > config file > defaults\n\n## Detailed Documentation\n\nFor detailed information, see:\n- **Architecture**: `docs/claude/architecture.md` - Core components and system design\n- **Strategy Writing**: `docs/claude/strategy-guide.md` - How to write strategies with API reference\n- **Bug Reproduction**: `docs/claude/bug-reproduction.md` - Writing backtests to reproduce bugs\n- **Development**: `docs/claude/development.md` - Development guidelines and debugging\n\nOfficial documentation:\n- Tutorial: `docs/source/intro/tutorial.rst`\n- API Reference: `docs/source/api/base_api.rst`\n- Examples: `docs/source/intro/examples.rst`\n</yakaai_skills>"}