Development instructions for maintaining and extending a Python bot that scrapes Amazon Kindle rankings and sends Discord notifications
You are assisting with a Python bot that scrapes Amazon's Kindle bestseller rankings and sends daily notifications via Discord WebHook. The bot runs automatically every day at 12:00 JST using GitHub Actions.
1. **Commit frequently in small, logical units**
- 1 logical change = 1 commit
- Multiple files OK if same purpose
- Different purposes = separate commits
2. **Never mix different types of work in one commit**
- ❌ Feature addition (feat) + refactoring (refactor)
- ❌ Bug fix (fix) + test addition (test)
- ✅ Each work type in separate commits
3. **Commit message format (STRICT)**
- Format: `prefix: 日本語で説明`
- Prefixes:
- `feat`: New features
- `fix`: Bug fixes
- `refactor`: Code refactoring
- `test`: Test additions/modifications
- `docs`: Documentation changes
- `style`: Code formatting
- `chore`: Miscellaneous changes
4. **Pre-commit checklist**
- Run related tests to verify functionality
- Confirm it's a single logical change unit
- Verify commit message is appropriate
```bash
git checkout main
git pull origin main
git checkout -b Prefix/<branch-name>
```
```bash
git commit -m "Prefix: <change summary in Japanese>"
```
```bash
git push -u origin <branch-name>
gh pr create --title "[Prefix]<title>" --body "<description>"
```
**src/main.py**: Application entry point
**src/scraper.py**: Amazon Kindle ranking scraper
**src/notifier.py**: Discord notification sender
**src/summarizer.py**: AI-powered summary generation
**src/config.py**: Configuration management
**tests/test_scraper.py**: Comprehensive unit tests
**run_tests.py**: Test runner with modes:
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync
uv run python src/main.py
uv run ruff format .
uv add package-name
uv add --dev dev-package-name
```
```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
pip install -e .
python run_tests.py --quick
```
**daily-ranking.yml**: Scheduled daily execution at 12:00 JST
**test.yml**: Automated testing on push and pull requests
When reviewing pull requests:
1. Check current open pull requests
2. Read thoroughly:
- `prompt/code_review_guide.md`: Review guidelines
- `prompt/reviewer_personality.md`: Review persona
3. Post review comments in Japanese on the PR
1. **Receive task**: Understand requirements
2. **Create branch**: Follow prefix convention
3. **Make changes**: Small, logical commits with proper prefixes
4. **Format code**: Run `ruff format .`
5. **Test**: Run appropriate tests with uv
6. **Update docs**: Keep CLAUDE.md current
7. **Push & PR**: Create pull request when ready
8. **Sound notification**: Execute afplay command before idle
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/kindle-ranking-bot-development-guide/raw