
🚀 Ultralytics Actions
Welcome to Ultralytics Actions - a collection of GitHub Actions for automating code quality, PR management, and CI/CD workflows across Ultralytics projects.



📦 Repository Contents
This repository provides three main components:
Ultralytics Actions (Main Action)
AI-powered formatting, labeling, and PR summaries for Python, Swift, and Markdown files.
📄 Features
- Python Code: Formatted using Ruff, an extremely fast Python linter and formatter
- Python Docstrings: Google-style formatting enforced with Ultralytics Python docstring formatter (optional)
- JavaScript/TypeScript: Formatted with Biome, an extremely fast formatter for JS, TS, JSX, TSX, and JSON (optional, auto-detected via
biome.json)
- Markdown Files: Styled with Prettier to ensure consistent documentation appearance
- Swift Code: Formatted with
swift-format (requires macos-latest runner)
- Spell Check: Common misspellings caught using codespell
- Broken Links Check: Broken links identified using Lychee
- PR Summary: Concise Pull Request summaries generated using AI
- PR Review: AI-powered code reviews identify critical bugs, security issues, and quality concerns with suggested fixes
- Auto-labeling: Applies relevant labels to issues and PRs via AI
🤖 Supported AI Providers
Choose between OpenAI or Anthropic for AI-powered features:
| OpenAI | gpt-5.3-codex | openai_api_key |
| Anthropic | claude-sonnet-4-6 | anthropic_api_key |
The model is auto-detected based on which API key you provide. Override with the model input, or use review_model to override PR review only.
🛠️ How It Works
Triggers on GitHub events to streamline workflows:
- Push Events: Automatically formats code when changes are pushed to
main
- Pull Requests: Ensures formatting standards, generates summaries, provides AI reviews, and applies labels
- Issues: Automatically applies relevant labels using AI
🔧 Setup
Create .github/workflows/ultralytics-actions.yml:
name: Ultralytics Actions
on:
issues:
types: [opened]
pull_request:
branches: [main]
types: [opened, closed, synchronize, review_requested]
permissions:
contents: write
pull-requests: write
issues: write
jobs:
actions:
runs-on: ubuntu-latest
steps:
- name: Run Ultralytics Actions
uses: ultralytics/actions@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: true
python: true
python_docstrings: false
biome: true
prettier: true
swift: false
dart: false
spelling: true
links: true
summary: true
openai_api_key: ${{ secrets.OPENAI_API_KEY }}
brave_api_key: ${{ secrets.BRAVE_API_KEY }}
Standalone Actions
Reusable composite actions for common CI/CD tasks. Each can be used independently in your workflows.
1. Retry Action
Retry failed commands with exponential backoff.
- uses: ultralytics/actions/retry@main
with:
command: npm install
max_attempts: 3
timeout_minutes: 5
📖 Full Documentation →
2. Cleanup Disk Action
Free up disk space on GitHub runners by removing unnecessary packages and files.
- uses: ultralytics/actions/cleanup-disk@main
📖 Full Documentation →
3. Scan PRs Action
List open PRs across an organization and auto-merge eligible Dependabot PRs.
- uses: ultralytics/actions/scan-prs@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
org: ultralytics
visibility: private,internal
📖 Full Documentation →
Python Package
Install ultralytics-actions for programmatic access to action utilities.

pip install ultralytics-actions
Available Modules:
actions.review_pr - AI-powered PR review
actions.summarize_pr - Generate PR summaries
actions.scan_prs - Scan and manage organization PRs
actions.first_interaction - Welcome message for new contributors
- And more in
actions/ directory
💡 Contribute
Ultralytics thrives on community collaboration, and we deeply value your contributions! Please see our Contributing Guide for details on how you can get involved. We also encourage you to share your feedback through our Survey. A huge thank you 🙏 to all our contributors!

📄 License
Ultralytics offers two licensing options:
- AGPL-3.0 License: An OSI-approved open-source license ideal for students, researchers, and enthusiasts who value open collaboration. See the LICENSE file for details.
- Enterprise License: Designed for commercial use, this license allows integrating Ultralytics software and AI models into commercial products without AGPL-3.0's open-source requirements. For enterprise solutions, contact Ultralytics Licensing.
📫 Contact
For bug reports or feature suggestions related to Ultralytics Actions, please submit an issue via GitHub Issues. Join our Discord community for discussions and support!