スキル一覧に戻る
laurigates

ruff-integration

by laurigates

Claude Code plugins for development workflows

2🍴 0📅 2026年1月24日
GitHubで見るManusで実行

SKILL.md


model: haiku created: 2025-12-16 modified: 2026-01-24 reviewed: 2026-01-24 name: ruff Integration description: | Integrate ruff into development workflows: editor setup, pre-commit hooks, and CI/CD pipelines. Use when configuring ruff in VS Code, setting up pre-commit hooks, or adding ruff to GitHub Actions. For ruff rules/linting config see ruff-linting skill; for formatting see ruff-formatting skill. allowed-tools: Bash, Read, Edit, Write, Grep, Glob

ruff Integration

Integrate ruff into editors, pre-commit hooks, and CI/CD pipelines.

When to Use This Skill

Use this skill when...Use ruff-linting instead when...Use ruff-formatting instead when...
Setting up VS Code / editorConfiguring lint rulesConfiguring format options
Adding pre-commit hooksSelecting/ignoring rulesQuote style, line length
Adding ruff to CI/CDUnderstanding rule categoriesFormat differences
Docker/build integrationFixing lint violationsChecking format compliance

VS Code Setup

// .vscode/settings.json
{
  "[python]": {
    "editor.formatOnSave": true,
    "editor.codeActionsOnSave": {
      "source.fixAll": "explicit",
      "source.organizeImports": "explicit"
    },
    "editor.defaultFormatter": "charliermarsh.ruff"
  },
  "ruff.lint.args": ["--select=E,F,B,I"],
  "ruff.importStrategy": "fromEnvironment"
}
# Install extension
code --install-extension charliermarsh.ruff

Pre-commit Integration

# .pre-commit-config.yaml
repos:
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.14.0
    hooks:
      - id: ruff-check
        args: [--fix]
      - id: ruff-format
pre-commit install           # Install hooks
pre-commit run --all-files   # Run manually
pre-commit autoupdate        # Update versions

GitHub Actions CI

# .github/workflows/lint.yml
name: Lint
on: [push, pull_request]

jobs:
  ruff:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: astral-sh/ruff-action@v3
        with:
          args: 'check --output-format github'

Separate lint + format checks:

jobs:
  ruff-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: pip install ruff
      - run: ruff check --output-format github

  ruff-format:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: pip install ruff
      - run: ruff format --check --diff

Configuration Hierarchy

  1. Command-line arguments (highest priority)
  2. Editor LSP settings
  3. ruff.toml in current directory
  4. pyproject.toml in current directory
  5. Parent directory configs (recursive)
  6. User config: ~/.config/ruff/ruff.toml
  7. Ruff defaults (lowest priority)

Best Practices

  • Editor: Enable format-on-save, use project-specific .vscode/settings.json
  • Pre-commit: Run ruff-check --fix first, then ruff-format
  • CI/CD: Use --output-format github for PR annotations
  • Performance: Cache ruff in CI, run on changed files only in pre-commit
  • Team: Commit editor/pre-commit configs to version control

Agentic Optimizations

ContextCommand
Quick lint checkruff check --output-format github
Format checkruff format --check --diff
Auto-fix allruff check --fix && ruff format
Errors onlyruff check --select E
CI annotationsruff check --output-format github
JSON outputruff check --output-format json
Specific filesruff check --diff path/to/file.py

Quick Reference

# Editor
code --install-extension charliermarsh.ruff

# Pre-commit
pre-commit install && pre-commit run --all-files

# CI (GitHub Actions)
uses: astral-sh/ruff-action@v3

# Docker
docker run -v .:/app ghcr.io/astral-sh/ruff:0.14.0-alpine check /app

For editor configs (Neovim, Zed, Helix), GitLab/CircleCI/Jenkins CI, build system integration, Docker setup, LSP configuration, and migration guides, see REFERENCE.md.

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です