Safe Skill

A simple code formatting skill. Reformats code to follow project conventions. Use when the user asks to "format code", "clean up formatting", or "fix style".

ArielSmoliar 97c59b7 803 B Updated

File contents

Code Formatter

Reformat the specified file(s) to match the project's code style conventions.

Rules

  1. Use consistent indentation (detect from existing code: tabs or spaces)
  2. Normalize trailing whitespace
  3. Ensure files end with a single newline
  4. Align object properties when they're on consecutive lines
  5. Sort imports alphabetically within each group

When to Use

  • User asks to format or clean up a file
  • As a final step after refactoring

When NOT to Use

  • During a code review (formatting changes obscure logic changes)
  • On generated files (formatters can break generated code)

ArielSmoliar/safe-agent/tree/main/tests/fixtures/safe-skill commit 97c59b76d5

Frequently asked questions

npx skillmds@latest add arielsmoliar/safe-skill