Generated banner for Mcore Linting And Formatting
Generated logo for Mcore Linting And Formatting

Mcore Linting And Formatting

NVIDIAOfficialCreated by Philip PetrakianDistributed by NVIDIA

  • Skill
  • Tool integration
  • Software development
  • Apache-2.0
  • Medium risk

From the author

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

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

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/nvidia/mcore-linting-and-formatting/download
  2. Unzip 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.sh

Tools 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>.py

Setting Up the Linting Group

Inside the container:

uv sync --locked --only-group linting

This 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, not Optional[X].

  • Docstrings: Google-style on all public classes and functions.

  • Naming: follow Python conventions — snake_case for functions and variables, PascalCase for classes.

  • Line length: 119 characters (configured in pyproject.toml).

  • No bare except: always catch specific exception types.

Files

BENCHMARK.md

Evaluation Report

Evaluation of the mcore-linting-and-formatting skill before publication through NVSkills-Eval.

This benchmark summarizes 3-Tier Evaluation from NVSkills-Eval results for the skill. The goal is to document whether the skill is safe, discoverable, effective, and useful for agents before it is published for broader workflow use.

Evaluation Summary

  • Skill: mcore-linting-and-formatting

  • Evaluation date: 2026-05-29

  • NVSkills-Eval profile: external

  • Overall verdict: PASS

  • Tier 3 live agent evaluation: not available in this report

Agents Used

  • Tier 3 agent details were not available in this report.

Metrics Used

Reported benchmark dimensions:

  • Security: checks whether skill-assisted execution avoids unsafe behavior such as secret leakage, destructive commands, or unauthorized access.

  • Correctness: checks whether the agent follows the expected workflow and produces the correct final output.

  • Discoverability: checks whether the agent loads the skill when relevant and avoids using it when irrelevant.

  • Effectiveness: checks whether the agent performs measurably better with the skill than without it.

  • Efficiency: checks whether the agent uses fewer tokens and avoids redundant work.

Underlying evaluation signals used in this run:

  • No Tier 3 evaluation signal details were available in this report.

Test Tasks

Tier 3 evaluation task details were not available in this report.

Results

Tier 3 dimension rollup was not available in this report.

Tier 1: Static Validation Summary

Tier 1 validation passed with observations. NVSkills-Eval ran 9 checks and found 8 total findings.

Top findings:

  • MEDIUM QUALITY/quality_correctness: SKILL_SPEC recommended field missing: 'metadata.tags' (skills/mcore-linting-and-formatting/SKILL.md)

  • MEDIUM QUALITY/quality_discoverability: Description uses first/second person (skills/mcore-linting-and-formatting/SKILL.md)

  • MEDIUM SCHEMA/body_recommended_section: Missing recommended section: '## Instructions' (skills/mcore-linting-and-formatting/SKILL.md)

  • MEDIUM SCHEMA/body_recommended_section: Missing recommended section: '## Examples' (skills/mcore-linting-and-formatting/SKILL.md)

  • LOW QUALITY/quality_discoverability: No '## Purpose' section (skills/mcore-linting-and-formatting/SKILL.md)

Tier 2: Deduplication Summary

Tier 2 validation passed. NVSkills-Eval ran 2 checks and found 0 total findings.

Notable observations:

  • Context Deduplication: Collected 1 file(s)

  • Inter-Skill Deduplication: Parsed skill 'mcore-linting-and-formatting': 133 char description

Publication Recommendation

The skill is suitable to proceed toward NVSkills-Eval publication based on this benchmark. Skill owners should keep this file with the skill and refresh it when the evaluation dataset, skill behavior, or target agents materially change.

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