powershell-quality

Generate PowerShell scripts with headers, Shift_JIS encoding, error handling, and SQL Server patterns for GRANDIT ERP.

Updated Sep 4, 2022
One-click install
npx skills add https://github.com/yt3trees/dotfiles --skill powershell-quality
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: powershell-quality
Source: https://github.com/yt3trees/dotfiles/tree/main/.gemini/skills/powershell-quality
Command: npx skills add https://github.com/yt3trees/dotfiles --skill powershell-quality

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured, production-ready approach to creating PowerShell scripts with robust encoding handling for Japanese environments, standardized headers, error handling, and logging.

Core Features & Use Cases

  • Header-driven scripting: All scripts begin with a standard header including Synopsis, Description, Parameters, Examples, Notes, and Link.
  • Encoding discipline: Save script files containing Japanese text in Shift_JIS (SJIS) with UTF-8 outputs for logs and data.
  • Error handling & Logging: Centralized patterns for Try/Catch, error propagation, and structured log entries.
  • GRANDIT ERP SQL integration: Guidance and patterns for interacting with SQL Server and exporting data for GRANDIT ERP workflows.
  • Cross‑version compatibility: Supports both PowerShell 5.1 and PowerShell 7+ environments.

Quick Start

Create a new PowerShell script following the header structure, ensure the script is saved in Shift_JIS when it includes Japanese text, and verify that all outputs (logs and CSVs) are UTF-8 encoded.

Frequently Asked Questions about powershell-quality

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

FAQPage Schema
How do I handle Japanese encoding in PowerShell scripts without corrupting output?

To handle Japanese encoding in PowerShell scripts, save script files containing Japanese text in Shift_JIS (SJIS) while ensuring all generated outputs like logs and CSVs are encoded in UTF-8. This prevents character corruption.

Does PowerShell 5.1 support the same structured logging patterns as PowerShell 7?

Yes, structured logging patterns are designed to support both Windows PowerShell 5.1 and PowerShell 7+ environments. They utilize centralized Try/Catch error handling and structured log entries for cross-version compatibility.

What is the best way to structure a PowerShell script for GRANDIT ERP SQL Server integration?

The best way to structure a PowerShell script for GRANDIT ERP is to use a mandatory standard header, implement explicit Shift_JIS script encoding, and apply reusable SQL Server integration patterns to export data.

Why do my PowerShell scripts fail to log errors correctly in automated workflows?

PowerShell scripts fail to log errors correctly when missing centralized error handling patterns. You need structured Try/Catch blocks, explicit error propagation, and standardized log entries to ensure reliable automated logging.

How to add a standard header to a PowerShell script for production readiness?

To add a standard header to a PowerShell script for production readiness, begin all scripts with a mandatory header block including Synopsis, Description, Parameters, Examples, Notes, and Link sections.

Can I use PowerShell to export data for GRANDIT ERP workflows with proper encoding?

Yes, you can use PowerShell to export data for GRANDIT ERP workflows by applying provided SQL Server integration patterns and enforcing UTF-8 encoding for all exported logs and CSV data outputs.