LogoAwesome Skills
  • Search
  • Category
  • Tag
  • Blog
LogoAwesome Skills
LogoAwesome Skills

Discover Open-Source Agent Skills for AI Coding Assistants

Product

  • Search
  • Category
  • Tag
  • Blog

Resources

  • Claude Skill Docs
  • Antigravity Skills Docs

Tools

  • Claude Code
  • OpenCode
  • Cursor
  • Codex
  • Antigravity

Company

  • Privacy Policy
  • Terms of Service
  • Sitemap

©2026 Awesome Skills. All rights reserved.

Privacy PolicyTerms
Back to Skills

mcore-linting-and-formatting

Linting and formatting for Megatron-LM. Covers running autoformat.sh, tools (ruff, black, isort, pylint, mypy), and code style rules.

2,759stars321forksUpdated 8/1/2026
Data Science & MLCode Review#formatting#megatron-lm#code-style#linting#developer-tools#python

Security Assessment

Safe(95/100)
Security Score95/100

About mcore-linting-and-formatting

This NVIDIA skill is a concise reference for linting and formatting code in the Megatron-LM project. It solves the common friction of getting a large machine-learning codebase to pass its style and CI checks before a pull request: it documents the single autoformat entrypoint, the exact tools involved, and the project's code-style rules so contributors do not have to reverse-engineer the pipeline.

The guidance shows how to run tools/autoformat.sh in both check mode (no changes) and fix mode via BASE_REF and CHECK_ONLY environment variables, and lists the tools it invokes: black, isort, pylint, ruff, and mypy. It explains how to set up the linting dependency group inside the container with uv sync --locked --only-group linting, how to re-run isort on edited files before committing, and the concrete style rules the project enforces: type hints on public APIs using the X | None form, Google-style docstrings, snake_case/PascalCase naming, a 119-character line length configured in pyproject.toml, and no bare except clauses.

It targets contributors and engineers working on Megatron-LM (or similar Megatron-Core codebases) who need to fix style violations, resolve pre-commit or ruff/mypy errors, and format code ahead of a PR. All documented operations are read-only or formatting-only invocations of standard, well-known Python developer tooling, and the skill's published benchmark reports a passing evaluation. It is a lightweight, guidance-focused convention reference rather than a code-generating or system-modifying tool.

FAQ

Which tools does the formatter run?

black, isort, pylint, ruff, and mypy, all invoked through tools/autoformat.sh, the same tools used by the CI linting job.

How do I check formatting without changing files?

Run the script in check mode: BASE_REF=main CHECK_ONLY=true SKIP_DOCS=false bash tools/autoformat.sh. Use CHECK_ONLY=false to apply fixes.

How do I install the linting tools?

Inside the container, run uv sync --locked --only-group linting, which installs ruff, black, isort, and pylint.

What are the key style rules?

Type hints on all public APIs using X | None (not Optional[X]), Google-style docstrings, snake_case functions and PascalCase classes, a 119-character line length, and no bare except.

Is this skill specific to one project?

Yes, it is written for Megatron-LM's toolchain and pyproject configuration, though the general tools apply broadly to Python projects.

All Files

5 files
evals/evals.json0.0 KB
View
BENCHMARK.md2.8 KB
View
skill.oms.sig4.5 KB
View
skill-card.md2.5 KB
View
SKILL.md1.6 KB
View

Install mcore-linting-and-formatting

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

nvidia/skills

Related Skills

dbt-sf-to-bq-translator

21,076

build-models

102

html-prototype

3,588

doc

448