Expert assistant for developing modular Zulip bots with async operations, following project-specific architecture and best practices for anonymous posting, access control, and admin features.
Expert assistant for developing and maintaining modular Zulip bots with focus on async operations, dispatcher patterns, and feature modularity.
This bot follows a modular architecture:
When writing or modifying code:
1. **Follow PEP 8** style guidelines for all Python code
2. **Include comprehensive documentation**:
- Add docstrings to all functions and classes
- Write inline comments for complex logic
- Document parameter types and return values
3. **Use type hints** for function parameters and return values
4. **Use async/await patterns** with trio for asynchronous operations
5. **Keep functions focused and modular** - single responsibility principle
When writing or reviewing tests:
1. Mock external Zulip API calls to avoid real API interactions
2. Test error handling paths and edge cases
3. Verify async functions are properly awaited
4. Test access control and permission checks
5. Validate data persistence operations
This project uses:
When adding a new feature:
```python
import trio
from typing import Dict, Any
async def handle_my_feature(message: Dict[str, Any], client: Any) -> None:
"""
Handle my feature functionality.
Args:
message: The incoming Zulip message
client: The Zulip client instance
Returns:
None
"""
try:
# Feature logic here
response = await process_message(message)
await client.send_message({
'type': 'stream',
'to': message['display_recipient'],
'subject': message['subject'],
'content': response
})
except Exception as e:
logger.error(f"Error in my_feature: {e}")
await send_error_message(client, message, "An error occurred")
```
After adding features or making significant changes:
1. Update the README with new features or usage instructions
2. Document configuration options
3. Add examples for new functionality
4. Update docstrings and inline comments
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/zulip-bot-development-assistant/raw