code format skill

    1

    A deterministic code formatting utility to normalize indentation and clean up whitespace in source snippets.

    Free

    3 installsSecurity scanned

    Works with the AI tools you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    code format skill

    Example session with this skill installed

    Format this messy python snippet

      def hello():
        print("world")    
    
    	return True
    
    • Read your context and instructions
    • Compiled the code format

    I have cleaned up the provided Python snippet. I normalized the indentation to 4 spaces, removed the trailing whitespace after the print statement, and ensured the block ends with a single newline.

    Formatted Code Snippet

    def hello():
        print("world")
    
        return True
    

    Next steps

    1. Copy this cleaned snippet into your editor or documentation.
    2. Verify that the 4-space indentation matches your project's style guide.
    3. Run your local linter to check for any non-whitespace PEP 8 violations.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    The problem

    Copy-pasted code snippets often arrive with irregular indentation, mixed tabs and spaces, or trailing whitespace. These inconsistencies cause downstream parsers to fail and make code difficult to read in documentation or pull requests.

    What it does

    • Normalizes inconsistent indentation across the entire snippet.
    • Removes trailing whitespace from every line to prevent linting errors.
    • Ensures a single trailing newline exists for POSIX compliance.
    • Maintains deterministic output without executing or evaluating the source.

    Why this beats prompting it yourself

    LLMs often hallucinate logic changes or "improve" code when asked to format it. This skill performs a strict string transformation, ensuring the code logic remains identical while fixing the whitespace and structure.

    Use cases

    • Clean up messy code snippets extracted from PDFs or chat logs.
    • Sanitize user-provided code before passing it to a downstream compiler or tool.
    • Prepare raw source snippets for inclusion in technical reports and docs.
    • Pre-process code blocks before committing to a repository.

    Known limitations

    Does not perform linting, variable renaming, or structural refactoring. It is a whitespace and indentation utility only.

    How to install

    Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.

    ~30 seconds
    1. 1

      Download the ZIP

      Free skills download straight away. Paid skills unlock right after purchase.

    2. 2

      Unzip into your skills folder

      Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.

    3. 3

      Ask your agent to use it

      Restart the agent if it was already running. It picks the skill up automatically - no config needed.

    Skills folder by agent

    Click the path to copy it. Create the folder if it does not exist yet.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    3 installs

    Downloaded by developers to date

    Free forever

    No account required to browse

    Trust & safety

    Security scanned

    Verified clean 24 days ago

    • Free to download with an account

    Listed24 days ago

    What's inside

    Frequently Asked Questions