format-js
Format JavaScript/TypeScript code with Prettier
Best use case
format-js is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Format JavaScript/TypeScript code with Prettier
Teams using format-js should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/format-js/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How format-js Compares
| Feature / Agent | format-js | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Format JavaScript/TypeScript code with Prettier
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# JavaScript/TypeScript Format Skill
## 📋 Overview
Use **Prettier** to automatically format JavaScript and TypeScript code:
- 🎨 **Consistent style**: Unified formatting across multiple file types
- ⚡ **Fast execution**: Millisecond-level formatting speed
- 🔧 **Out of the box**: Reasonable default configuration
- 🌈 **Wide support**: JS, TS, JSX, TSX, JSON, CSS, etc.
## 🔧 Prerequisites
| Tool | Min Version | Check Command | Installation |
|------|-------------|---------------|--------------|
| Node.js | 16+ | `node --version` | [nodejs.org](https://nodejs.org) |
| Prettier | 2.8+ | `prettier --version` | `npm install -g prettier` |
## 🚀 Usage
### Method 1: AI Assistant
```
"Use format-js to format my JavaScript code"
```
### Method 2: Run Script Directly
```powershell
# Windows
.\.agents\skills\format-js\scripts\format.ps1
# Linux/Mac
./.agents/skills/format-js/scripts/format.sh
```
### Method 3: With Parameters
```powershell
# Check without modifying
.\.agents\skills\format-js\scripts\format.ps1 -Check
# Format specific file types
.\.agents\skills\format-js\scripts\format.ps1 -Extensions "js,ts,jsx,tsx"
```
## 🎯 What It Formats
- ✅ Indentation and spacing
- ✅ Quote unification (single/double)
- ✅ Line length limits
- ✅ Semicolon add/remove
- ✅ Bracket and comma normalization
- ✅ Arrow function formatting
> **Safety Gate**: By default, this skill skips protected folders (`.agents/`, `bmad/`) and `README.md`.
## ⚙️ Configuration
```json
// .prettierrc
{
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"printWidth": 80,
"arrowParens": "avoid"
}
```
## 🔗 Related Resources
- [Prettier Documentation](https://prettier.io/)
- [Prettier Playground](https://prettier.io/playground/)Related Skills
format-python
Format Python code with Black
vuln-scan
Multi-language dependency security scan - Use Safety CLI and OSV-Scanner to quickly detect dependency vulnerabilities in Python/JS/Java projects
SKILL_ONBOARDING.md
> **Purpose**: Conduct a one-time "Handshake Interview" with the user to establish their Developer Persona.
usb-debug
No description provided.
sql-lint
SQL code style check - Use SQLFluff to check SQL statement style and syntax (supports PostgreSQL, MySQL, SQLite, etc.)
serial-debug
No description provided.
security-check
Check dependency security vulnerabilities
rust-lint
Rust code quality check - Use Clippy and Rustfmt to ensure Rust code standards and performance optimization
run-tests
Run project test suite
register-debug
No description provided.
owasp-scan
OWASP dependency vulnerability scan - Use OWASP Dependency-Check to detect known CVE vulnerabilities in project dependencies
memory-guardian
Cross-platform memory monitoring and cleanup skill for AI development environments