Skip to content
Development
Skill

/powershell-windows

PowerShell scripting rules for Windows environment. Use when running shell commands, Docker operations, or HTTP requests on Windows PowerShell.

BOOST
From plugin
ai-rules-1c
48732 skills13 agents45 commands
Install
$ npx -y skills add comol/ai_rules_1c --skill powershell-windows --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/powershell-windows

Context preview

The summary Claude sees to decide when to auto-load this skill.

PowerShell scripting rules for Windows environment. Use when running shell commands, Docker operations, or HTTP requests on Windows PowerShell.

SKILL.md

powershell-windows.SKILL.md
name: powershell-windows
description: "PowerShell scripting rules for Windows environment. Use when running shell commands, Docker operations, or HTTP requests on Windows PowerShell."

PowerShell Windows — Scripting Rules

Core Principles

1. Command Separation

  • Windows PowerShell 5.1 does not support `&&`; PowerShell 7 does.
  • For independent commands use `;`: `Set-Location "path"; Get-ChildItem`.
  • For dependent native commands preserve short-circuit semantics explicitly:
  git add .
  if ($LASTEXITCODE -eq 0) { git commit -m "message" }

2. Path Quoting

  • **Always use double quotes** for paths with spaces:
  cd "D:\My Projects\MyApp"

3. Script Execution

  • For .bat/.cmd files:
  ./gradlew clean build
  .\gradlew.bat clean build

4. Docker Commands

  • Specify full path to docker-compose files:
  docker-compose -f "D:\My Projects\app\docker-compose.yml" up -d

5. HTTP Requests

  • Prefer PowerShell-native HTTP so behavior does not depend on whether `curl`

resolves to an alias or `curl.exe`:

  Invoke-WebRequest -Uri "http://localhost:9090/status" -UseBasicParsing

6. Waiting/Delays

  • **Wrong**: `timeout 10`
  • **Correct**:
  Start-Sleep -Seconds 10

7. JSON Handling

  • JSON parsing:
  $response = Invoke-WebRequest -Uri "http://localhost:9090/status" -UseBasicParsing
  $json = $response.Content | ConvertFrom-Json
  $json | ConvertTo-Json -Depth 3

8. Process Checking

  • Process search:
  Get-Process -Name "java" -ErrorAction SilentlyContinue

9. Docker Operations

  • Stop containers:
  docker-compose -f "path\to\file.yml" down
  • Build images:
  docker-compose -f "path\to\file.yml" build --no-cache

10. Error Handling

  • Ignore errors:
  Get-Process -Name "java" -ErrorAction SilentlyContinue

Common Errors and Fixes

| Error | Cause | Fix | |-------|-------|-----| | `&& is not recognized` | Running Windows PowerShell 5.1 | Use `;` only for independent commands; use `$LASTEXITCODE` for conditional chaining | | `curl` behaves unexpectedly | Windows PowerShell alias / executable resolution differs | Use `Invoke-WebRequest`, or call `curl.exe` explicitly when its CLI semantics are required | | `timeout` behaves unexpectedly | Console utility semantics differ from shell sleep | Use `Start-Sleep` | | `Path not found` | Missing quotes on spaced path | Wrap path in double quotes |

Correct Command Examples

# Change directory and execute command
cd "D:\My Projects\MyApp"; ./gradlew clean build -x test

# Wait and make HTTP request
Start-Sleep -Seconds 10; Invoke-WebRequest -Uri "http://localhost:9090/status" -UseBasicParsing

# Docker operations
docker-compose -f "D:\My Projects\MyApp\docker-compose.yml" down
docker-compose -f "D:\My Projects\MyApp\docker-compose.yml" build --no-cache
docker-compose -f "D:\My Projects\MyApp\docker-compose.yml" up -d

# Check server status
$response = Invoke-WebRequest -Uri "http://localhost:9090/status" -UseBasicParsing
$json = $response.Content | ConvertFrom-Json
Write-Host "Transport: $($json.mcp.transport)"
Read more
Ships withai-rules-1c

Rules\skills\subagens for vibecoding in 1C(bsl)

Get the whole plugin

Other skills on ai-rules-1c.