Token导航 LogoToken导航TokenDH.com
开发权限需确认github未标认证来源可访问clear审计通过

powershell-utf8-fixerpowershell utf8 修复程序

Agent Skill

powershell-utf8-fixer 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

703

周安装

29

GitHub Stars

3

下载量

230
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:powershell-utf8-fixer(powershell utf8 修复程序)
来源仓库:https://github.com/mineru98/skills-store
仓库路径:skills/powershell-utf8-fixer
安装命令:
npx skills add https://github.com/mineru98/skills-store --skill powershell-utf8-fixer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/mineru98/skills-store --skill powershell-utf8-fixer

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态或代码变更进行整理时使用。

  • 适用于 PowerShell UTF8 修复相关的协作信息管理,可结合项目现有设计系统使用。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需确认权限范围和维护状态。
  • 安装前建议检查是否会触发联网、命令执行或文件读写,确保操作边界清晰。
  • powershell-utf8-fixer 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

PowerShell UTF-8 Fixer

Problem

PowerShell on Windows requires UTF-8 with BOM encoding for scripts containing non-ASCII characters (Korean, Chinese, Japanese, emoji, etc.). Without the BOM (Byte Order Mark), PowerShell interprets the file using the system's default encoding (typically CP949 on Korean Windows), causing character display issues.

Symptoms:

  • Korean text appears as ??? or garbled characters
  • Emoji and special characters don't display correctly
  • Write-Host output shows corrupted text
  • One script works fine while another with identical code shows garbled text

Root cause: File encoding mismatch

  • ✓ UTF-8 with BOM (EF BB BF): PowerShell reads correctly
  • ✗ UTF-8 without BOM: PowerShell uses system default encoding → garbled text

Quick Fix

When encountering encoding issues in PowerShell scripts:

  1. Check encoding:
node scripts/check_powershell_encoding.js <file_or_directory>
# Or with npm:
npm run check <file_or_directory>
  1. Fix encoding:
node scripts/fix_powershell_encoding.js <file_or_directory>
# Or with npm:
npm run fix <file_or_directory>

Workflow

When Creating New PowerShell Scripts

After creating any .ps1 file with non-ASCII characters:

node scripts/fix_powershell_encoding.js script.ps1

This ensures the file is saved with UTF-8 BOM from the start.

When Diagnosing Display Issues

If a PowerShell script shows garbled text:

  1. Check the encoding:
node scripts/check_powershell_encoding.js problematic_script.ps1
  1. If it shows "UTF-8 without BOM", fix it:
node scripts/fix_powershell_encoding.js problematic_script.ps1
  1. Test the script again - text should now display correctly

Batch Processing

To check/fix all PowerShell scripts in a directory:

# Check all scripts
node scripts/check_powershell_encoding.js scripts/windows/

# Fix all scripts that need it
node scripts/fix_powershell_encoding.js scripts/windows/

Prevention

To prevent encoding issues in the future:

  1. Before committing: Run the checker on modified .ps1 files
  2. In CI/CD: Add encoding validation to your pipeline
  3. Editor settings: Configure your editor to save .ps1 files as UTF-8 with BOM

Editor Configuration Examples

VS Code (settings.json):

{
  "[powershell]": {
    "files.encoding": "utf8bom"
  }
}

Cursor (settings.json):

{
  "[powershell]": {
    "files.encoding": "utf8bom"
  }
}

Scripts

check_powershell_encoding.js

Diagnoses encoding issues without modifying files.

Usage:

node scripts/check_powershell_encoding.js <file_or_directory>

Output:

  • ✓ UTF-8 with BOM: File is correctly encoded
  • ⚠ UTF-8 without BOM: File needs fixing
  • ⚠ UTF-16: File uses UTF-16 encoding
  • ✗ Unknown: Unable to detect encoding

Exit codes:

  • 0: All files have UTF-8 BOM
  • 1: Some files need fixing or have errors

fix_powershell_encoding.js

Adds UTF-8 BOM to PowerShell files that don't have it.

Usage:

node scripts/fix_powershell_encoding.js <file_or_directory>

Behavior:

  • Reads file content as UTF-8
  • Writes back with UTF-8 BOM (utf-8-sig)
  • Skips files that already have UTF-8 BOM
  • Processes .ps1 files recursively in directories

Exit codes:

  • 0: All files processed successfully
  • 1: Errors occurred during processing

Technical Details

UTF-8 BOM: The byte sequence EF BB BF at the start of a file signals UTF-8 encoding to PowerShell and other Windows applications.

Why PowerShell needs BOM:

  • Without BOM, PowerShell uses [Console]::OutputEncoding (often CP949/CP1252)
  • With BOM, PowerShell correctly identifies the file as UTF-8
  • This is specific to Windows PowerShell's file reading behavior

Alternative workarounds (not recommended):

  • Adding encoding commands to each script (verbose, error-prone)
  • Using -Encoding UTF8 parameters (doesn't help with file reading)
  • Avoiding non-ASCII characters (limits usability)

The proper solution is to save files with UTF-8 BOM.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.91%
按下载量换算66

Gemini CLI

24.34%
按下载量换算56

trae

17.98%
按下载量换算41

OpenCode

12.95%
按下载量换算30

Antigravity

6.8%
按下载量换算16

windsurf

2.89%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills