code

Enforce coding guidelines for clean Python and JavaScript code.

11|Updated Apr 4, 2025
One-click install
npx skills add https://github.com/sanand0/scripts --skill code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code
Source: https://github.com/sanand0/scripts/tree/main/agents/code
Command: npx skills add https://github.com/sanand0/scripts --skill code

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill ensures consistent, high-quality code across Python and JavaScript projects by enforcing best practices, preferred libraries, and efficient coding patterns. It reduces technical debt, improves maintainability, and accelerates development by standardizing code style.

Core Features & Use Cases

  • Language-Specific Guidelines: Provides detailed style guides and library recommendations for both Python and JavaScript, including uv run for Python and modern browser APIs for JS.
  • Efficiency & Readability: Emphasizes short, readable, and performant code with principles like early returns, DRY (Don't Repeat Yourself), and YAGNI (You Aren't Gonna Need It).
  • Testing & Debugging: Guides on writing fast tests (e.g., pytest, vitest) and debugging front-end applications with Playwright.
  • Use Case: Automatically refactor a Python script to use httpx instead of requests and add type hints, ensuring it adheres to the team's coding standards and is ready for production deployment.

Quick Start

Refactor the attached Python script 'data_processor.py' to follow the recommended Python style, using uv run and httpx.

Frequently Asked Questions about code

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

FAQPage Schema
How do I refactor Python code to follow coding standards and best practices?

Refactor Python code by applying style guidelines: use modern libraries like `httpx` instead of `requests`, add type hints and docstrings, follow DRY principles, and use `uv run` for execution. This ensures consistency, improves readability, and reduces technical debt across your project.

What coding standards should I enforce for JavaScript and Python projects?

Enforce language-specific standards: for Python, use type hints, docstrings, minimal comments, and preferred libraries; for JavaScript, use modern browser APIs and efficient patterns. Both should follow DRY, early returns, YAGNI principles, and include fast test coverage with `pytest` or `vitest`.

Can I automatically enforce code quality and style compliance across my team's codebase?

Yes. Apply coding guidelines to identify style violations and enforce best practices for clean, compliant Python and JavaScript code. This standardizes patterns, reduces technical debt, and accelerates development by catching issues early in code generation and review workflows.

How do I structure Python code with type hints and documentation for production readiness?

Add type hints to all functions, include docstrings for non-obvious logic, redact PII with realistic dummy data, document contracts, enable progress logging, and design for fast re-runs. These practices ensure maintainability and production-grade quality.

What's the best way to write and test efficient, readable code in Python and JavaScript?

Write short, performant code using early returns and minimal dependencies. Test with fast frameworks like `pytest` for Python or `vitest` for JavaScript, and debug front-end applications with Playwright. This reduces bugs and speeds up development cycles.

Do I need to know specific libraries to apply these coding standards?

Familiarity with `httpx`, `uv run` for Python, and modern browser APIs for JavaScript helps, but the standards guide you on preferred libraries and patterns. The focus is on consistency and best practices rather than memorizing syntax.