powershell-exact-action
Screen an exact finalized PowerShell command or batch member before execution for confirmed mechanical recurrence families, currently the invalid direct pipeline from a foreach statement and unsafe literal-dollar interpolation in metadata arguments. Use for Windows PowerShell actions after wrappers, defaults, JSON construction, member expansion, and quoting are final. It is a mechanical preflight, not semantic safety or runtime outcome proof.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-02
- Stars
- ★ 23
- Forks
- 1
01 前言 Front Matter
- name
- powershell-exact-action
- description
- Screen an exact finalized PowerShell command or batch member before execution for confirmed mechanical recurrence families, currently the invalid direct pipeline from a foreach statement and unsafe literal-dollar interpolation in metadata arguments. Use for Windows PowerShell actions after wrappers, defaults, JSON construction, member expansion, and quoting are final. It is a mechanical preflight, not semantic safety or runtime outcome proof.
02 资源文件 2
- 参考文档references/constraint-contract.md1.0 KB
- 脚本scripts/Test-PowerShellExactAction.ps16.9 KB
03 SKILL.md 正文
PowerShell Exact-Action Preflight
Use this skill only on the exact finalized PowerShell representation that would otherwise be submitted.
- For one command, run
powershell -NoProfile -File scripts/Test-PowerShellExactAction.ps1 -CommandText '<exact text>' -IncludeSourceusing a transport that preserves the literal command. For a batch, supply-InputJsonPathcontaining{ "members": [{"id":"...","command":"..."}] }and screen every independently executable member. - Exit
2anddecision=BLOCKmeans the matching candidate was not eligible for submission. Preserve its SHA-256 and source in the preflight evidence, change the representation, and screen the changed exact action once. - Exit
0means only that the currently registered mechanical families did not block the input. Continue all workflow, authority, scope, semantic, and evidence gates. - Exit
1ordecision=ERRORmeans the preflight route itself failed. Preserve it and use a constrained representation or block only the dependent PowerShell member.
The known foreach family is the parser-invalid form foreach (...) { ... } | Command. Use an intermediate array or ForEach-Object when semantics are preserved. Strings, comments, here-strings, subexpressions, and a later separate pipeline must not be falsely classified as this family.
The literal-dollar family applies when a command argument must contain a literal $skill-name or similar token. Use a non-expanding literal transport or exact post-generation patch, then read back the consumer file. Do not infer the caller's intention from a dollar sign alone; the input JSON must mark literal_dollar_required=true for this constraint to apply.
Read constraint-contract.md when adding a confirmed mechanical family. A new family requires an exact recurrence discriminator, safe counterexamples, member-level applicability, bounded proof ceiling, and master lineage.
04 同仓库更多 Skills
workflow-transition-admission
Admit or hold a source-bound same-chat correction, candidate transition, known-cause retry, finalized Skill-dependent action, external action or decision-window wait from one identity-bound receipt. Preserve independent refutation, actual allocation-result consumption and lightweight read-only work. This is structural admission only, not semantic or outcome proof. Read legacy v1 only for explicit old split-chat leases.
scenario-interaction-closure
Freeze a source-bound, blind-first harm-scenario and interaction closure before a material correction, then preserve its meaning through evidence decomposition and recomposition.
objective-supervisor-control
Turn a same-chat or legacy decision-bearing event into a bounded source-bound objective-control disposition without fixed polling or status narration. Use when consuming a result, correcting objective drift or deciding whether a wait has value; never treat this control pass as independent review or action authority.
master-guided-skill-resolver
Compile provenance-bound source and finalized action facts, then resolve exact registered workflow skills with deterministic path- and hash-bound selected/rejected receipts. Use before material work when the two masters may contain reusable skill guidance, or when diagnosing missing, near, stale, conflicting, retired, or ambiguous selection. This skill does not replace the workflow, semantic judgment, independent review, or final-consumer evidence.
master-guided-skill-lifecycle
Carry worthwhile workflow learning from a real result to an owned candidate, next use and measured disposition; retrieve source-bound master history, validate Skill effects and steward operating conditions or exact user-approved amendments. Use at material results, recurrence, useful reuse, avoidable cost, capability changes or a concrete policy-condition blocker. Do not turn ordinary reads into extra phases or treat records and invocations as benefit.
durable-supervisor-status
Recover an explicitly existing legacy split-chat Supervisor/Worker lease using Worker-local status, hash-chain history and a later bound Supervisor message. Do not use for the default same-chat workflow, which uses chat-objective-continuity. Never use as external-action authorization or prevention proof.