A fine-tuned Gemma-2 2B model optimized for Python code generation, debugging, and assistance tasks. Uses GGUF 8-bit quantization for efficient local execution.
A specialized coding assistant powered by the fine-tuned Gemma-2 2B model (Agnuxo/gemma-2-2b-Python_CODE_assistant-GGUF_8bit). This skill leverages a lightweight, locally-runnable model optimized specifically for Python development tasks.
This model is fine-tuned from Google's Gemma-2 2B using Unsloth for 2x faster training. The GGUF 8-bit quantized version enables efficient local execution while maintaining strong performance for Python coding tasks including code generation, debugging, refactoring, and explanation.
When the user requests Python coding assistance, follow these steps:
1. **Understand the Request**
- Identify whether the user needs code generation, debugging, refactoring, or explanation
- Clarify requirements if the request is ambiguous
- Note any specific constraints (style, libraries, Python version)
2. **Analyze Context**
- Read relevant Python files in the project using the Read tool
- Understand existing code patterns and conventions
- Identify dependencies and imports already in use
3. **Generate Solution**
- For code generation: Create clean, idiomatic Python code following best practices
- For debugging: Analyze error messages and trace root causes
- For refactoring: Suggest improvements while preserving functionality
- For explanations: Break down complex code into understandable components
4. **Implement Changes**
- Use the Edit tool to modify existing Python files
- Use the Write tool only when creating new files is necessary
- Ensure proper indentation and formatting (PEP 8 compliance)
- Add docstrings for functions and classes when appropriate
5. **Validate**
- Check for syntax errors
- Verify imports are correct and available
- Ensure type hints are consistent (if used in the project)
- Consider edge cases and error handling
6. **Test Guidance**
- Suggest how to test the implemented code
- Provide example usage if helpful
- Recommend running pytest or unittest if tests exist
**User**: "Create a function to parse JSON logs and extract error messages"
**Assistant**:
1. Reads any existing logging utilities in the project
2. Generates a clean Python function with proper error handling
3. Includes docstring with parameter and return type documentation
4. Provides example usage showing how to call the function
5. Suggests unit tests to validate the implementation
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/python-code-assistant-with-gemma-2/raw