powershell-cli-contract-review

powershell-cli-contract-review is a skill for Claude Code, Codex from alonf/specrew. It costs 20 tokens per session (684 once invoked), scanned A, original, MIT.

A review method for checking that a PowerShell command-line script matches its documented options and interactive behavior.

In plain words
What is it for?
Use it to test exact command examples, inspect interactive transcripts, and compare implementation behavior with the CLI contract.
Why use it?
It catches cases where the advertised --flag syntax is ignored, prompts appear unexpectedly, or required checks are missing.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to test exact command examples, inspect interactive transcripts, and compare implementation behavior with the CLI contract.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alonf/specrew/powershell-cli-contract-review
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add alonf/specrew --skill powershell-cli-contract-review
Clone the repo
git clone --depth 1 https://github.com/alonf/specrew

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for powershell-cli-contract-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/alonf/specrew/powershell-cli-contract-review.svg)](https://agentmods.dev/skills/alonf/specrew/powershell-cli-contract-review)
Your own site
<a href="https://agentmods.dev/skills/alonf/specrew/powershell-cli-contract-review"><img src="https://agentmods.dev/badge/skills/alonf/specrew/powershell-cli-contract-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 684 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00020 $0.00684
Opus 5 $0.00010 $0.00342
Sonnet 5 $0.00004 $0.00137
Haiku 4.5 $0.00002 $0.00068

Measured 3d ago against content hash 40a51f924ffe, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

powershell-cli-contract-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.squad/skills/powershell-cli-contract-review/SKILL.md · 39 lines

How it starts

The opening of the file, as written. The whole thing — 39 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Context

Use this when reviewing a standalone PowerShell script that is presented as a contract-facing CLI. These reviews fail easily when the implementation only works via PowerShell-native switches while the documented --flag surface, prompt wording, or required probes are unverified.

Patterns

  • Validate the exact documented invocation first (for example .\script.ps1 --dry-run) before accepting equivalent PowerShell-native forms such as -DryRun.
  • For advanced scripts that support GNU-style flags, set CmdletBinding(PositionalBinding = $false) and parse ValueFromRemainingArguments explicitly so --flag tokens cannot misbind into typed positional parameters.
  • Capture a live interactive transcript and compare it to the contract fields, not just to the existence of Read-Host.
  • Prove GNU-style --flag support through the exact live script surface (& .\script.ps1 --flag ... from PowerShell), not only through nested harnesses or equivalent helper wrappers. Those wrappers can mask that the advertised surface still ignores --* arguments.
  • Search the implementation for each required external probe/API call; a missing mandated probe is a material gap even if adjacent probes succeed.
  • Separate graceful degradation from completeness: a fallback path can be correct while the overall slice still fails for missing contract behavior.
  • Confirm banned concerns (billing, cost, routing) are absent with direct code search instead of inference.

Examples

  • scripts\specrew-init.ps1 accepted -DryRun but --dry-run misbound as SpecKitVersion; that is a contract failure on the advertised standalone surface.
  • scripts\specrew-init.ps1 needed both PositionalBinding = $false and explicit CliArgs parsing so --dry-run --project-path <dir> worked on the advertised standalone surface without breaking PowerShell-native switches.
  • A re-review must re-run the exact contract surface after a parser fix; in this repo, code that looked correct still left & .\scripts\specrew-init.ps1 --dry-run --force --project-path <dir> prompting interactively and targeting the current directory.
  • The FR-022 consent prompt showed agent name plus access path, but omitted availability even though availability was required in the prompt contract.
  • A delegated-agent probe based on copilot help config degraded correctly when unavailable, but the missing gh api /user probe still blocked acceptance.

Read the full file on GitHub · 39 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 39 lines · 20 tokens per session scan A 40a51f924ffe

Subscribe to this mod's changes

powershell-cli-contract-review is a skill published in the GitHub repository alonf/specrew (54 stars, last pushed 5d ago), licensed MIT. It adds 20 tokens to every session and 684 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories