Mcore Linting And Formatting
NVIDIAOfficialCreated by Philip PetrakianDistributed by NVIDIA
- Skill
- Tool integration
- Software development
- Apache-2.0
- Medium risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides the necessary commands and style guidelines for maintaining code quality in Megatron-LM. It covers the execution of automated formatting scripts, the management of linting tools, and specific coding standards required for the codebase.
What it does
- Provides instructions for running the automated formatting script.
- Lists the specific linting tools used, including ruff, black, isort, pylint, and mypy.
- Outlines requirements for type hints and docstring formats.
- Defines naming conventions and line length constraints.
- Explains how to set up the linting environment using uv.
When to use it
- Before submitting a pull request to ensure code style consistency.
- When fixing style violations reported by CI.
- After modifying imports in Python files.
- When setting up a local development environment for linting.
Advantages
- Ensures adherence to project-specific coding standards.
- Automates the process of code formatting and linting.
- Provides a centralized reference for style rules and tool usage.
Usage examples
- “How do I run the autoformatter for Megatron-LM?”
- The agent provides the command to run tools/autoformat.sh in either check-only or fix mode.
- “What are the naming conventions for Megatron-LM?”
- The agent explains the use of snake_case for functions and variables and PascalCase for classes.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/nvidia/mcore-linting-and-formatting/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip mcore-linting-and-formatting.zip -d .agents/skills
Documentation by Philip Petrakian
Linting and Formatting
Running the Formatter
Run before opening a PR:
# Check mode (no changes applied)
BASE_REF=main CHECK_ONLY=true SKIP_DOCS=false bash tools/autoformat.sh
# Fix mode
BASE_REF=main CHECK_ONLY=false bash tools/autoformat.shTools invoked: black, isort, pylint, ruff, mypy.
Import Ordering
After editing imports in any Python files, always run uv run isort on those
files before committing:
uv run isort <file1>.py <file2>.pySetting Up the Linting Group
Inside the container:
uv sync --locked --only-group lintingThis installs ruff, black, isort, pylint — the same tools used by
tools/autoformat.sh and CI's linting job.
Code Style Rules
Type hints: required on all public API functions. Use
X | None, notOptional[X].Docstrings: Google-style on all public classes and functions.
Naming: follow Python conventions —
snake_casefor functions and variables,PascalCasefor classes.Line length: 119 characters (configured in
pyproject.toml).No bare
except: always catch specific exception types.
Files
- ATTRIBUTION.mdAdded by AutoGineer952 B
- BENCHMARK.md2.8 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md1.6 KiB
- evals/evals.json3 B
- skill-card.md2.5 KiB
- skill.oms.sig4.5 KiB
ATTRIBUTION.md
Attribution
This folder is an unmodified copy of the Agent Skill "mcore-linting-and-formatting", distributed by AutoGineer (https://autogineer.com/agent-skills).
Commit: fce3cca4170be75e82c64920654d56ee2811b005
Created by: Philip Petrakian (https://github.com/NVIDIA/skills/tree/fce3cca4170be75e82c64920654d56ee2811b005/skills/mcore-linting-and-formatting)
Publisher: NVIDIA (https://github.com/NVIDIA)
Licence: Apache License 2.0 (https://spdx.org/licenses/Apache-2.0.html)
Licence evidence: declared in the frontmatter ("license: Apache-2.0")
Retrieved: 2026-11-07
The skill's own files are unmodified copies. AutoGineer is not affiliated with or endorsed by the author or the publisher.
Files added by AutoGineer
ATTRIBUTION.md: this file, written by AutoGineer
LICENSE: copied from LICENSE-APACHE
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Python
Security
What our scanner noticed· Medium risk
- Large base64-encoded blobs
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Philip Petrakian
- Publisher
- NVIDIA (Official)
- Distributed by
- NVIDIA
- Source
- NVIDIA/skills · skills/mcore-linting-and-formatting · commit fce3cca
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE-APACHE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Philip Petrakian or NVIDIA.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download mcore-linting-and-formatting.zip