code-format
Code Format Skill
Format and validate code in various languages.
When to Use
✅ USE this skill when:
- "Format this Python code"
- "Validate this JSON"
- "Pretty print this JavaScript"
- "Format this Markdown"
When NOT to Use
❌ DON'T use this skill when:
- Linting code → use linters directly
- Compiling code → use compilers
- Minifying code → use minifiers
Supported Languages
| Language | Formatter | Notes |
|---|---|---|
| Python | black, autopep8 | Falls back to auto-format |
| JavaScript | prettier | If installed |
| TypeScript | prettier | If installed |
| JSON | python | Built-in |
| YAML | pyyaml | If installed |
| Markdown | prettier | If installed |
| HTML | prettier | If installed |
| CSS | prettier | If installed |
| SQL | sqlparse | If installed |
| Shell | shfmt | If installed |
Commands
Format Code
{baseDir}/format-code.sh <file>
{baseDir}/format-code.sh <file> --language python
{baseDir}/format-code.sh --stdin --language js < code.js
Validate Syntax
{baseDir}/validate-code.sh <file>
{baseDir}/validate-code.sh <file> --language python
{baseDir}/validate-code.sh --stdin --language json < data.json
List Languages
{baseDir}/format-code.sh --languages
Options
--language <lang>: Specify language (auto-detect from extension)--stdin: Read from stdin--out <file>: Write to file (default: stdout)--check: Check if formatting needed (don't modify)--diff: Show diff instead of formatted output--indent <n>: Indentation size (default: language-specific)
Examples
Format Python file:
{baseDir}/format-code.py script.py
Format JSON from stdin:
cat data.json | {baseDir}/format-code.sh --stdin --language json
Check if formatting needed:
{baseDir}/format-code.sh script.py --check
# Exit 0 if formatted, 1 if needs formatting
Format with custom indent:
{baseDir}/format-code.sh config.json --indent 4
Validate code:
{baseDir}/validate-code.sh script.py
# Output: ✓ Valid Python syntax
Notes
- Uses standard formatters when available
- Falls back to built-in formatters
- Does not modify files by default
- Use
--outto save to same or different file
More from winsorllc/upgraded-carnival
vector-memory
Vector-based semantic memory using embeddings for intelligent recall. Store and search memories by meaning rather than keywords. Use when you need semantic search, similar document retrieval, or context-aware memory.
131model-router
Route requests between different LLM providers and models. Configure routing rules, fallback providers, and model-specific parameters inspired by ZeroClaw and OpenClaw model routing systems.
63rss-monitor
Monitor RSS/Atom feeds and blogs for new content using feedparser.
59rss-reader
Read and parse RSS/Atom feeds. Use when: user wants to subscribe to feeds, get latest articles, or monitor news sources.
54video-frames
Production-grade video frame extraction with thumbnail grids, GIF creation, and batch frame processing. Includes intelligent quality presets, progress tracking, and comprehensive error handling.
39elevenlabs-tts
Convert text to speech using ElevenLabs API. Use when you need to generate voice audio for messages, narrations, or accessibility.
25