Comprehensive Cursor rules for Python applications with support for JSON, HTML, Mako templates, and INI files. Includes formatting, linting, and AI-powered code analysis with Turkish language output.
This skill configures Cursor for Python-based applications with comprehensive support for multiple file types including Python, JSON, HTML, Mako templates, and INI configuration files.
When working with this codebase:
1. **Python Files (*.py, *.pyw)**
- Use 4-space indentation
- Format code using autopep8 with 120 character line length
- Lint using flake8, ignoring: E501 (line too long), W503 (line break before binary operator), F401 (unused import), F841 (unused variable)
- Enable CodeLens for enhanced code navigation
- Allow AI tools: edit_file, read_file, codebase_search, grep_search, file_search, list_dir, run_terminal_cmd, delete_file
2. **JSON Files (*.json)**
- Use 2-space indentation
- Format with Prettier
- Enable code quoting in AI responses
3. **HTML Files (*.html)**
- Use 2-space indentation
- Format with Prettier
- Treat as template files with proper structure
4. **Mako Template Files (*.mako)**
- Use 4-space indentation
- These are typically Alembic migration templates
- Handle Python code blocks within templates carefully
5. **INI Configuration Files (*.ini)**
- Use 4-space indentation
- Common for alembic.ini and similar config files
- Preserve section structure and comments
6. **AI Behavior**
- Always respond in Turkish language
- Auto-import missing modules when possible
- Respect maximum diff size of 2500 characters
- Exclude from analysis: `__pycache__/`, `*.pyc`, `*.pyo`, `*.spec`, `logs/`, `*.db`, `*.sqlite3`
7. **Formatting**
- Format on save is disabled by default
- Manually trigger formatting when needed
- Use language-specific formatters as configured
```python
def process_data(input_file: str) -> dict:
"""Process data from input file with proper formatting."""
with open(input_file, 'r') as f:
data = json.load(f)
return data
```
```json
{
"config": {
"database": "postgresql://localhost/db",
"port": 5432
}
}
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/python-multi-language-development/raw