Automatically fix pylint issues in azure-ai-ml package following Azure SDK Python guidelines and existing code patterns. Expects GitHub issue URL and optional virtual env path in the request. Format "fix pylint issue <issue-url> [using venv <path>]
npx skills add https://github.com/Azure/azure-sdk-for-python --skill fix-pylint
This skill automatically fixes pylint warnings in the azure-ai-ml package by analyzing existing code patterns and applying fixes with 100% confidence based on GitHub issues.
> Scope: Fix only mandatory/blocking issues — warnings that will cause CI to fail. Leave optional/informational warnings as-is.
Intelligently fixes pylint issues by:
10. Providing a summary of what was fixed
Command:
cd sdk/ml/azure-ai-ml
azpysdk pylint .
> Note: azpysdk runs at the package level only. To focus on specific files, run the full check and filter the output by file path.
Check if user provided in their request:
https://github.com/Azure/azure-sdk-for-python/issues/... in user's message)If GitHub issue URL is missing:
Ask: "Please provide the GitHub issue URL for the pylint problems you want to fix."
If virtual environment is missing:
Ask: "Do you have an existing virtual environment path, or should I create 'env'?"
Once you have the issue URL:
Read the issue to understand which files/modules and specific warnings to fix.
IMMEDIATELY activate the virtual environment before ANY other command:
# Activate the provided virtual environment (e.g., envml, env, venv)
.\<venv-name>\Scripts\Activate.ps1
# If creating new virtual environment:
python -m venv env
.\env\Scripts\Activate.ps1
⚠️ IMPORTANT: ALL subsequent commands MUST run within the activated virtual environment. Never run commands outside the venv.
# Navigate to azure-ai-ml directory (within activated venv)
cd sdk/ml/azure-ai-ml
# Install dev dependencies from dev_requirements.txt (within activated venv)
pip install -r dev_requirements.txt
# Install the package in editable mode (within activated venv)
pip install -e .
Based on the GitHub issue details, determine which files to check:
Option A - Run pylint on the package and filter output:
# Ensure you're in azure-ai-ml directory (within activated venv)
cd sdk/ml/azure-ai-ml
# Run pylint on the full package, then filter output for files from the issue
azpysdk pylint .
# Review output for warnings in the specific files/modules mentioned in the issue
Option B - Check modified files (if no specific target):
git diff --name-only HEAD | Select-String "sdk/ml/azure-ai-ml"
git diff --cached --name-only | Select-String "sdk/ml/azure-ai-ml"
⚠️ Ensure virtual environment is still activated before running:
# Navigate to azure-ai-ml directory
cd sdk/ml/azure-ai-ml
# Run pylint on the package (within activated venv)
azpysdk pylint .
# Filter output for the specific files/modules from the issue
Parse the pylint output to identify:
Before fixing, search the codebase for how similar issues are handled:
# Example: Search for similar function patterns
grep -r "pattern" sdk/ml/azure-ai-ml/
Use the existing code patterns to ensure consistency.
> Fix only mandatory/blocking issues. Skip optional or informational warnings that do not cause CI failure.
ALLOWED ACTIONS:
Fix warnings with 100% confidence
Use existing file patterns as reference
Follow Azure SDK Python guidelines
Make minimal, targeted changes
FORBIDDEN ACTIONS:
Fix warnings without complete confidence
Create new files for solutions
Import non-existent modules
Add new dependencies or imports
Make unnecessary large changes
Change code style without clear reason
Delete code without clear justification
Re-run pylint to ensure:
Provide a summary:
Warning: C0111: Missing module/function/class docstring
Fix: Add proper docstring following Azure SDK style:
def function_name(param: str) -> None:
"""Brief description of function.
:param param: Description of parameter
:type param: str
:return: None
"""
Warning: R0913: Too many arguments
Fix: Consider grouping related parameters into a configuration object or using keyword-only arguments.
Warning: C0301: Line too long
Fix: Break line at logical points following PEP 8 style.
Warning: W0611: Unused import
Fix: Remove the unused import statement.
Warning: C0103: Invalid name
Fix: Rename to follow snake_case for functions/variables, PascalCase for classes.
# 0. Get issue details
# User provides: https://github.com/Azure/azure-sdk-for-python/issues/12345
# Issue mentions: pylint warnings in azure/ai/ml/operations/job_operations.py
# 1. CRITICAL - Activate virtual environment FIRST
.\<venv-name>\Scripts\Activate.ps1 # Use the venv name provided by user
cd sdk/ml/azure-ai-ml
pip install -r dev_requirements.txt
pip install -e .
# 2. Identify target from issue
$targetFile = "azure/ai/ml/operations/job_operations.py"
# 3. Run pylint on the package and check output for target file
azpysdk pylint .
# Filter output for warnings in $targetFile
# 4. Analyze output and identify fixable issues
# Cross-reference with GitHub issue #12345
# 5. Search for existing patterns in codebase
Get-ChildItem -Recurse azure/ai/ml/ | Select-String "similar_pattern"
# 6. Apply fixes to identified files
# 7. Re-run pylint to verify
azpysdk pylint .
# 8. Report results
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Take azure/azure-sdk-for-python-fix-pylint from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference pip.
Without those the skill loads but fails at the first command.