More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    PowerShell Script Safety Check

    1

    | iex runs whatever a server sends, with no file to review and no execution policy check.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    PowerShell Script Safety Check

    PowerShell Script Safety Check

    Example session with this skill installed

    Check this project with powershell-script-safety-check.

    • Read your context and instructions
    • Compiled the powershell script safety

    $ python3 scripts/check_powershell.py examples/risky
    BLOCK config/AppSettings.psd1:4 P03 SECRET_IN_SCRIPT
    ApiKey = '<redacted>'
    Why: A password, token or key is written in the script: ConvertTo-SecureString '...' -AsPlainText, a $Password, $ApiKey or $env:..._TOKEN variable or hashtable key set to a literal, a -Password or -ApiKey parameter, an Authorization header, a NetworkCredential, a connection string or a URL with a password. Everyone with the repository can use it, and Microsoft notes that plain text in scripts can show up in event logs (script block logging) and command history.
    Safer: Read secrets at run time: Get-Secret (Microsoft.PowerShell.SecretManagement), Get-Credential or Read-Host -AsSecureString when someone is present, an environment variable filled by your CI secret store, or Import-Clixml of a credential exported by the same account on the same Windows machine. Change the secret that was committed.

    BLOCK deploy/Deploy-WebApp.ps1:11 P03 SECRET_IN_SCRIPT
    BLOCK deploy/Deploy-WebApp.ps1:12 P03 SECRET_IN_SCRIPT
    BLOCK deploy/Deploy-WebApp.ps1:21 P04 REMOVE_RECURSE_CAN_HIT_ROOT
    BLOCK deploy/Deploy-WebApp.ps1:28 P01 EXPRESSION_FROM_VARIABLE
    BLOCK deploy/Install-BuildTools.ps1:6 P02 DOWNLOAD_RUN_AS_CODE
    REVIEW deploy/Deploy-WebApp.ps1:9 P11 EXECUTION_POLICY_LOOSENED
    REVIEW deploy/Deploy-WebApp.ps1:15 P12 TLS_OR_HOST_CHECK_OFF
    REVIEW deploy/Deploy-WebApp.ps1:17 P16 SECRET_PRINTED_OR_TRACED
    REVIEW deploy/Deploy-WebApp.ps1:19 P14 PLAIN_HTTP_TRANSFER
    REVIEW deploy/Deploy-WebApp.ps1:23 P18 LOCATION_NOT_CHECKED
    REVIEW deploy/Deploy-WebApp.ps1:26 P13 COMMAND_BUILT_FROM_STRING
    REVIEW deploy/Install-BuildTools.ps1:9 P15 ENCODED_COMMAND
    REVIEW deploy/Install-BuildTools.ps1:11 P17 MODULE_NOT_PINNED

    (Each finding also has Why and Safer lines, as in the first one.)
    Verdict: BLOCK. Checked 3 files, 3 with PowerShell content.
    This is a static check of file text. NOT FLAGGED is not a guarantee.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Remove-Item "$Staging*" -Recurse -Force deletes everything at the root of the drive when $Staging is empty, and one irm https://... | iex runs whatever a server sends, with no file to review and no execution policy check. This skill finds those and ten other PowerShell script mistakes before you run or ship your scripts, and tells you how to fix each one.

    Your agent runs a scanner on .ps1 scripts, .psm1 modules and .psd1 data files, including the build/ and dist/ folders where CI scripts often live. It skips comments, knows single-quoted, double-quoted and here-strings and which of them expand $variables, follows pipelines across lines, and knows the usual guards ([Parameter(Mandatory)], IsNullOrWhiteSpace, Join-Path, -ErrorAction Stop). It never runs the script. It returns BLOCK, REVIEW, or NOT FLAGGED, with the file, line, reason, and a safer approach. Secrets are never printed.

    What it checks

    BLOCK

    • P01: Invoke-Expression (iex) of a variable, an argument or a file read through a variable path
    • P02: downloads run as code (irm | iex, iex "$(irm ...)", DownloadString, [scriptblock]::Create, piped into powershell)
    • P03: passwords and keys in ConvertTo-SecureString -AsPlainText, variables, .psd1 settings, parameters, Authorization headers and connection strings
    • P04: Remove-Item -Recurse on "$dir*" when dir may be empty, or on C:\

    REVIEW

    • P11: Set-ExecutionPolicy Bypass or Unrestricted beyond the current session
    • P12: certificate checks off (-SkipCertificateCheck, ServerCertificateValidationCallback), WinRM TrustedHosts * or curl.exe -k
    • P13: commands built from strings (cmd /c, powershell -Command, ScriptBlock::Create)
    • P14: plain http downloads and unencrypted authentication
    • P15: -EncodedCommand and Base64 text run as code
    • P16: secrets printed with Write-Host or traced with Set-PSDebug -Trace 2
    • P17: Install-Module without a pinned version, or -SkipPublisherCheck
    • P18: Set-Location without a check before Remove-Item -Recurse

    What's included

    • The scanner (Python 3.9+, standard library only)
    • A rules guide with the reason and safer approach for each rule
    • A risky and a safe example project (deploy and install scripts and a settings file), and the real report the scanner produces on the risky one

    Limits It reads each file as written: dot-sourced files, imported modules, splatted hashtables and aliases you define yourself are not followed, and PowerShell inside CI YAML, .bat or .cmd files is not read. NOT FLAGGED is not a guarantee.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.

    Static check of PowerShell script text. Dot-sourced files, imported modules and values built across functions are not followed. NOT FLAGGED is not a guarantee.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 5 days ago

    Permissions

    Terminal / Shell
    Read Files

    Runs one local Python script in the terminal. It reads your project's files, writes nothing, and makes no network calls. The example scripts include clearly fake, inert secrets (NOTREAL, not-a-real-..., EXAMPLE) and URLs on the reserved .invalid domain for the scanner to find. They are never run.

    Listed5 days ago

    What's inside

    Frequently Asked Questions

    No. The script reads local files only and makes no network calls.

    No. It only reports. Your agent changes files only if you ask it to.

    Any agent that supports SKILL.md skills and can run a terminal command, such as Claude Code. It needs Python 3.9 or newer and nothing else.

    No. It reads .ps1, .psm1 and .psd1 files as text. It never runs PowerShell or any command in them.

    BLOCK: fix it before you ship. REVIEW: check it before release. NOT FLAGGED: no rule matched. It is a static check, so NOT FLAGGED is not a guarantee.

    New in Security