Development assistant for kindle-rank-bot - a Python bot that scrapes Amazon Kindle rankings and sends Discord notifications. Enforces strict Git workflow, testing, and formatting rules.
Development assistant for the kindle-rank-bot repository - a Python bot that scrapes Amazon's Kindle bestseller rankings and sends daily notifications via Discord WebHook using GitHub Actions.
ā **NEVER DO:**
ā **ALWAYS DO:**
Format: `prefix: ę„ę¬čŖć§čŖ¬ę`
**Prefix types:**
1. **NEVER work on main branch**
2. Always create feature branch:
```bash
git checkout main
git pull origin main
git checkout -b Prefix/<branch-name>
```
3. Branch prefix conventions:
- `feature/`: New features
- `update/`: Improvements
- `bugfix/`: Minor fixes
- `hotfix/`: Critical fixes
- `refactor/`: Code refactoring
- `test/`: Test work
- `docs/`: Documentation
- `chore/`: Maintenance
1. Create branch from main
2. Make changes with frequent commits
3. Run tests after each change
4. Format code with ruff after each change
5. Push when ready (after all commits complete)
6. Before returning to waiting state: **ALWAYS run** `afplay /Users/kimuranaoto/Music/notice.mp3`
7. Unless specified otherwise, work until just before git push (after completing all commits)
```bash
uv run ruff format .
```
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync
uv add package-name
uv add --dev package-name
```
```bash
uv run python src/main.py
```
```bash
uv run python run_tests.py
uv run python run_tests.py --quick
uv run python run_tests.py --stress 5
uv run python run_tests.py --all
```
```bash
uv run ruff format .
```
1. **src/main.py**: Entry point with orchestration
- Error handling and logging
- System exit on failure for GitHub Actions
- Gemini API integration for summaries
2. **src/scraper.py**: Amazon Kindle ranking scraper
- Fetches top 10 from https://www.amazon.co.jp/gp/bestsellers/digital-text/2275256051/
- Extracts: title, rating, review count, price, URL
- Retry mechanism (max 3 attempts, exponential backoff)
- Graceful handling of missing data
3. **src/notifier.py**: Discord WebHook sender
- Environment variable validation
- Detailed error messages
4. **src/summarizer.py**: Gemini AI summaries
- Ranking analysis and insights
- Graceful fallback on failure
- Configurable via environment variables
5. **src/config.py**: Centralized configuration
- Environment variable management
- Validation and defaults
When reviewing PRs:
1. Check current open pull requests
2. Read these files thoroughly:
- `prompt/code_review_guide.md`: Review guidelines
- `prompt/reviewer_personality.md`: Review persona
3. Post review comments in Japanese on the PR
ā Work on feature branch (not main)
ā Commit frequently in small logical units
ā Use proper commit message prefix
ā Run tests after changes
ā Format with ruff after changes
ā Keep CLAUDE.md updated
ā Play notification sound before returning to waiting state
ā Work until ready to push (unless told otherwise)
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/kindle-rank-bot-development-assistant/raw