dqx-code-standards

Enforce Python code standards for DQX projects with pre-commit tooling.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/nampham2/dqx --skill dqx-code-standards
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dqx-code-standards
Source: https://github.com/nampham2/dqx/tree/main/.opencode/skills/dqx-code-standards
Command: npx skills add https://github.com/nampham2/dqx --skill dqx-code-standards

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Concise code standards checklist for writing DQX Python code. This skill provides focused guidance without loading the full AGENTS.md document.

Core Features & Use Cases

  • Import order: Always follow a recommended import sequence (future imports, standard library, third-party, local) with clear separation and explicit typing considerations.
  • Type hints: STRICT MODE ensures complete type annotations for all functions; leverages Python 3.11 features, TYPE_CHECKING for circular imports, and Protocol for structural typing.
  • Docstrings: Google-style docstrings for all public APIs to document summaries, arguments, returns, and exceptions.
  • Naming conventions: Enforce consistent naming for classes (PascalCase), functions (snake_case), constants (UPPER_SNAKE_CASE), and private members (leading underscore).
  • Dataclasses: Prefer frozen dataclasses for immutable data structures.
  • Formatting: Align with Ruff configuration, 120-character line length, 4-space indentation, and Python 3.11 target.
  • Error handling: Use the returns library for functional error handling; define and raise descriptive custom exceptions.
  • When to use me: Ideal for teams codifying internal coding standards and for quick-reference guidance during implementation.
  • Verification: Pre-commit hooks (ruff format/check, mypy) ensure ongoing adherence to standards.
  • Reference: Directs to AGENTS.md for comprehensive guidance and testing patterns.

Quick Start

Apply these Python code standards to your DQX projects to ensure consistency and quality across modules.

Frequently Asked Questions about dqx-code-standards

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

FAQPage Schema
What are the recommended Python type hint standards for strict mode typing?

Python type hint standards for strict mode require complete annotations for all functions, leveraging Python 3.11 features, TYPE_CHECKING for circular imports, and Protocol for structural typing across the codebase.

How do I enforce Python code formatting and linting in pre-commit hooks?

To enforce Python code formatting in pre-commit hooks, configure Ruff format and check alongside mypy, ensuring 120-character line length, 4-space indentation, and Python 3.11 target compliance.

What is the correct import order for Python modules?

The correct import order for Python modules follows a specific sequence: future imports first, then standard library, third-party, and local modules, with clear separation and explicit typing considerations.

How do I document Python functions using Google-style docstrings?

To document Python functions using Google-style docstrings, format all public APIs to clearly document summaries, arguments, returns, and exceptions as required by the code standards.

Can I use mutable dataclasses for data structures in Python?

For Python data structures, you should prefer frozen dataclasses to ensure immutability rather than using mutable dataclasses, aligning with strict code standards for robust data handling.

What is the best way to handle errors functionally in Python?

The best way to handle errors functionally in Python is using the returns library for functional error handling, while defining and raising descriptive custom exceptions for specific failure scenarios.