스킬 code-formatter

code-formatter

안전 🌐 네트워크 접근⚙️ 외부 명령어

格式化多種程式語言的程式碼

不一致的程式碼格式會減慢程式碼審查速度並增加合併衝突。此技能使用業界最佳實踐和現有專案配置來格式化 10 多種程式語言的程式碼。

지원: Claude Codex Code(CC)
⚠️ 68 나쁨
1

스킬 ZIP 다운로드

2

Claude에서 업로드

설정 → 기능 → 스킬 → 스킬 업로드로 이동

3

토글을 켜고 사용 시작

테스트해 보기

"code-formatter" 사용 중입니다. Format the src/components directory

예상 결과:

  • 使用 2 空格縮排格式化了 5 個 JavaScript 檔案
  • 應用了 StandardJS 風格(無分號)
  • 在多行物件中添加了尾隨逗號
  • 遵循了現有的 .prettierrc 配置

"code-formatter" 사용 중입니다. Format all Python files with check-only mode

예상 결과:

  • 找到 12 個需要格式化的 Python 檔案
  • 將修正 847 個行長度違規
  • 將在多行定義中添加 234 個尾隨逗號
  • 遵循了 pyproject.toml Black 配置

보안 감사

안전
v5 • 1/16/2026

All 14 static findings are false positives. The scanner misidentified metadata URLs as network threats, git tree hashes as C2 communication, and benign text descriptions (including tool names like Black and Prettier) as cryptographic algorithms. This is a prompt-only skill containing only AI instructions in SKILL.md with no executable code, file operations, network calls, or command execution.

2
스캔된 파일
238
분석된 줄 수
2
발견 사항
5
총 감사 수

위험 요인

🌐 네트워크 접근 (1)
⚙️ 외부 명령어 (1)
감사자: claude 감사 이력 보기 →

품질 점수

38
아키텍처
100
유지보수성
85
콘텐츠
20
커뮤니티
100
보안
83
사양 준수

만들 수 있는 것

標準化團隊程式碼風格

遵循已建立的風格指南(如 PEP 8 和 Google Style Guide)確保整個程式碼庫的格式一致性。

快速格式驗證

檢查程式碼是否遵循專案風格慣例,並在審查期間建議格式化改進。

符合專案慣例

格式化貢獻以符合不熟悉的開源專案的現有程式碼風格。

이 프롬프트를 사용해 보세요

格式化當前目錄
Format all code files in this directory using appropriate styles for each language detected.
格式化特定路徑
Format the src/ directory. Check for existing config files first and apply their rules.
僅檢查模式
Check code formatting without making changes. Report which files would be modified and what changes would be made.
按語言格式化
Format all Python files in this project using Black style. Respect pyproject.toml if present.

모범 사례

  • 在應用預設設定之前,先讓技能偵測現有的配置檔案
  • 調用技能時指定目標路徑或語言
  • 使用僅檢查模式在應用更改之前預覽它們
  • 遵循 .gitignore 模式以跳過 vendor 和生成的目錄

피하기

  • 在沒有檢查現有專案配置的情況下運行
  • 格式化整個 vendor 或 node_modules 目錄
  • 期望技能自動安裝格式化工具
  • 在沒有檢查檔案類型的情況下用於二進位檔案或鎖定檔案

자주 묻는 질문

支援哪些語言?
JavaScript、TypeScript、Python、Go、Rust、Java、CSS、SCSS、LESS、HTML、JSON、YAML 和 Markdown。
這會安裝 Prettier 或 Black 嗎?
否。這是一個提示技能,向 AI 指導格式化概念。您需要單獨安裝工具。
它如何處理專案配置?
該技能首先檢查 .prettierrc、.editorconfig、pyproject.toml 和其他配置檔案。
我的資料安全嗎?
是的。此技能僅包含 AI 指令。不會讀取、寫入或向外部發送任何檔案。
它可以僅格式化特定檔案類型嗎?
是的。使用 --language python 或指定語言以僅格式化匹配的檔案。
這與 Prettier 有何不同?
Prettier 是一個格式化磁碟上檔案的工具。此技能提供 AI 提示以應用格式化概念。

개발자 세부 정보

파일 구조

📄 SKILL.md