windows-powershell-rules

Enforce native PowerShell cmdlets and UTF8 encoding for Windows command execution.

Updated Feb 23, 2026
One-click install
npx skills add https://github.com/masakinihirota/vns-masakinihirota-better-old --skill windows-powershell-rules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: windows-powershell-rules
Source: https://github.com/masakinihirota/vns-masakinihirota-better-old/tree/main/.agent/skills/windows-powershell-rules
Command: npx skills add https://github.com/masakinihirota/vns-masakinihirota-better-old --skill windows-powershell-rules

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill ensures that AI agents execute commands correctly within a Windows PowerShell environment, preventing errors caused by incompatible Unix commands and promoting the use of native PowerShell cmdlets or provided tools.

Core Features & Use Cases

  • Enforces PowerShell Native Commands: Strictly prohibits the use of Unix-like commands (e.g., rm, ls, grep) and mandates the use of their PowerShell equivalents (e.g., Remove-Item, Get-ChildItem, Select-String).
  • Prioritizes Agent Tools: Directs agents to use built-in tools like grep_search, list_dir, and view_file over direct command-line execution whenever possible.
  • Handles Encoding: Provides guidance on setting UTF8 encoding for command output to prevent garbled text, especially with Japanese characters.
  • Use Case: An AI agent needs to list files in a directory and then search for a specific string within a file. Instead of using ls and grep, it should use the list_dir tool and the grep_search tool, respectively, to ensure compatibility and reliability in the Windows PowerShell environment.

Quick Start

Use the windows-powershell-rules skill to ensure all commands are executed using native PowerShell cmdlets or provided agent tools.

Frequently Asked Questions about windows-powershell-rules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent AI agents from using Unix commands in Windows PowerShell?

To prevent garbled Japanese text in Windows PowerShell command output, set UTF8 encoding to ensure proper character handling and prevent compatibility issues during native cmdlet execution.

What is the best way to execute file operations in a Windows PowerShell environment?

The best way to execute file operations in a Windows PowerShell environment is to prioritize built-in agent tools like list_dir and view_file over direct command-line execution, ensuring compatibility and reliable native command usage.

How do I handle Japanese character encoding issues in Windows PowerShell?

To handle Japanese character encoding issues in Windows PowerShell, set UTF8 encoding for command output to prevent garbled text and ensure proper character handling during native cmdlet execution.

Does Windows PowerShell support standard Unix commands like ls and grep?

Windows PowerShell does not natively support standard Unix commands like ls and grep for reliable execution. You must use native PowerShell cmdlets like Get-ChildItem and Select-String to avoid compatibility errors.

Why do Unix-like commands fail when automating tasks in Windows PowerShell?

Unix-like commands fail in Windows PowerShell because of inherent compatibility issues between the environments. Using native PowerShell cmdlets or provided agent tools resolves these execution errors and ensures reliable scripting.