learnware-code-style

Format Python code in Learnware repositories before commits.

Updated Mar 18, 2026
One-click install
npx skills add https://github.com/ErrDivine/LiteCode --skill learnware-code-style
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: learnware-code-style
Source: https://github.com/ErrDivine/LiteCode/tree/main/skills/system/codex/learnware-code-style
Command: npx skills add https://github.com/ErrDivine/LiteCode --skill learnware-code-style

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates code restyling in the Learnware repository, ensuring uniformity and compliance with the Learnware coding standards before each commit.

Core Features & Use Cases

  • Code Restyling: Applies a predefined set of code style guidelines to the changed files in the Learnware repository.
  • Pre-commit Check: Helps maintain coding consistency by restyling files that are going to be committed.
  • Customizable Styles: Supports the Black formatter, Flake8, and isort for code style consistency.
  • Import Grouping and Naming Conventions: Ensures proper Python import ordering and class/module naming.
  • Docstring and Comment Formatting: Follows Numpydoc style for documentation and clean coding practices.

Quick Start

Run 'learnware-code-style' before committing your changes to restyle your files.

Frequently Asked Questions about learnware-code-style

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically format Python code before committing?

To automatically format Python code before committing, you run a pre-commit hook that applies style guidelines to changed files. This restyling ensures uniformity and compliance with coding standards before changes are committed to the repository.

What's the best way to enforce Python import ordering and class naming conventions?

Enforcing Python import ordering and class naming conventions is handled by automated tools like isort and Flake8. They restyle changed files to maintain proper import grouping and module naming consistency across the project.

Does this code formatting approach support Black and Numpydoc style guides?

Yes, this code formatting approach supports Black and Numpydoc style guides. It applies the Black formatter for code structure and Numpydoc style for docstring and comment formatting to ensure clean coding practices.

How do I maintain coding consistency in Learnware repositories?

To maintain coding consistency in Learnware repositories, run a pre-commit check that restyles files going to be committed. This process applies predefined coding conventions to ensure uniformity and maintainability across the project.

Why does my Python pre-commit hook not format changed files automatically?

If your Python pre-commit hook is not formatting changed files automatically, ensure the script is configured to target only staged files. This restyling process focuses specifically on files going to be committed to maintain consistency.