code-format
npx skills add https://github.com/icartsh/icartsh_plugin --skill code-format
Agent 安装分布
Skill 文档
Code Format Skill (Entry Map)
Goal: ìì´ì í¸ê° íìí ì íí í¬ë§·í ì 차를 ì°¾ì ì ìëë¡ ê°ì´ëí©ëë¤.
Quick Start (íë를 ì ííì¸ì)
- .NET ì½ë í¬ë§·í
(C#) â
references/dotnet-format.md - JSON/YAML/Markdown í¬ë§·í
â
references/prettier-format.md - 모ë í목 í¬ë§·í
â
references/fix-all.md
When to Use
- ì½ë ì¤íì¼ ìë° ìì (ë¤ì¬ì°ê¸°, 공백, ì¤ ë°ê¿ ë±)
- .editorconfig ê·ì¹ì ì¼ê´ëê² ì ì©
- 커ë°ì ìí ì½ë ì¤ë¹ (pre-commit hook í¬ë§·í )
- í ì½ë© íì¤ ì¤ì
- í¹ì íì¼ ëë ì ì²´ ì½ëë² ì´ì¤ í¬ë§·í
ë¤ìì ìí ê²ì´ ìë: ë¹ë (dotnet-build), í ì¤í¸ (dotnet-test), ëë 린í (code-analyze)
Inputs & Outputs
Inputs: target (dotnet/prettier/all), files (í¹ì íì¼ ëë ëë í 리), verify (ì²´í¬ ì ì© ëª¨ë)
Outputs: í¬ë§·í ë íì¼ (íì¼ ë´ìì ì§ì ìì ), exit code (0=success, non-zero=violations)
Guardrails: ë¹íê´´ì ë°©ì (ë³ê²½ ìì´ íì¸íë –verify-no-changes ê°ë¥), .editorconfig ì¡´ì¤, pre-commitê³¼ íµí©
Navigation
1. Format .NET Code â references/dotnet-format.md
- C# íì¼(.cs) í¬ë§·í , dotnet format ê·ì¹ ì ì©, ì½ë ì¤íì¼ ì´ì ìì
2. Format with Prettier â references/prettier-format.md
- JSON, YAML, Markdown, JavaScript, TypeScript íì¼ í¬ë§·í
3. Format All Code â references/fix-all.md
- 모ë í¬ë§·í°(dotnet + prettier)를 ìì°¨ì ì¼ë¡ ì¤í, í¬ê´ì ì¸ í¬ë§·í ìí
Common Patterns
Quick Format (.NET)
cd ./dotnet
dotnet format PigeonPea.sln
Quick Format (Prettier)
npx prettier --write "**/*.{json,yml,yaml,md}"
Format Everything
./.agent/skills/code-format/scripts/format-all.sh
Verify Only (ì²´í¬ ëª¨ë)
cd ./dotnet
dotnet format PigeonPea.sln --verify-no-changes
í¹ì íì¼ í¬ë§·í
# .NET
dotnet format --include ./console-app/Program.cs
# Prettier
npx prettier --write ./README.md
Troubleshooting
í¬ë§·í ì¤í¨: ìë¬ ë©ìì§ë¥¼ íì¸íììì¤. ìì¸í ìë¬ ì²ë¦¬ë ê´ë ¨ 참조 íì¼ì íì¸íì¸ì.
íì¼ì´ í¬ë§·í ëì§ ìì: .editorconfig ê·ì¹, íì¼ íì¥ì, ignore í¨í´ì íì¸íììì¤.
Pre-commit hook ì¤í¨: 먼ì í¬ë§·í°ë¥¼ ìëì¼ë¡ ì¤íí í 커ë°íììì¤. references/fix-all.md를 참조íì¸ì.
ì¤íì¼ ì¶©ë: .editorconfigê° ì°ì ìì를 ê°ì§ëë¤. êµ¬ì± íì¼ì íì¸íììì¤.
ì±ë¥ ì´ì: ì ì²´ ì루ì ëì í¹ì íë¡ì í¸ë íì¼ì ëí´ í¬ë§·í ì ìííììì¤.
Success Indicators
dotnet format
Format complete in X ms.
ì´ë¯¸ í¬ë§·í ë ê²½ì° ë³ê²½ë íì¼ì´ ìê±°ë, í¬ë§·í ë íì¼ ëª©ë¡ì´ íìë©ëë¤.
prettier
â Formatted X files
ëë 모ë íì¼ì´ ì´ë¯¸ í¬ë§·í ë ê²½ì° ì¶ë ¥ì´ ììµëë¤.
Integration
ì»¤ë° ì : pre-commit hookì ì¬ì©íì¬ ìë í¬ë§·í
(.pre-commit-config.yamlì 구ì±ë¨)
ìë í¬ë§·í
: ì½ë í¸ì ì , PR ìì± ì ì¤í
CI/CD: CIìì í¬ë§·í
ê²ì¦ (–verify-no-changes / –check 모ë ì¬ì©)
ë¤ë¥¸ SKILLê³¼ í¨ê» ì¬ì©:
- ì´ì ë¨ê³: code-analyze (ì¤íì¼ ë¨¼ì ìì )
- ë¤ì ë¨ê³: dotnet-build (ê¹ëí ì½ë ë¹ë)
Configuration Files
.editorconfig: í¬ë§·í ê·ì¹ ì ì (indent size, line endings ë±).prettierrc.json: Prettier êµ¬ì± (print width, quotes ë±).pre-commit-config.yaml: Pre-commit hook 구ì±.prettierignore: Prettier í¬ë§·í ìì ì ì¸í íì¼
Related
.editorconfig– í¬ë§·í ê·ì¹.prettierrc.json– Prettier ì¤ì .pre-commit-config.yaml– Pre-commit hookssetup-pre-commit.sh– Pre-commit ì¤ì ì¤í¬ë¦½í¸