JordanGunn/nunchuck / skills/prompt/prompt-exec
prompt-exec
VerifiedExecute the forged prompt exactly as written. Requires explicit consent and a ready artifact. Deletes artifact after successful execution.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 915 B |
| assets/observability-template.md | markdown | 1.8 KB |
| assets/prompt-artifact-schema.json | config | 2.3 KB |
| assets/prompt-artifact-schema.md | markdown | 1.3 KB |
| assets/receipt-schema.json | config | 1.1 KB |
| references/00_ROUTER.md | markdown | 476 B |
| references/01_SUMMARY.md | markdown | 694 B |
| references/02_CONTRACTS.md | markdown | 1002 B |
| references/03_TRIGGERS.md | markdown | 349 B |
| references/04_NEVER.md | markdown | 378 B |
| references/05_ALWAYS.md | markdown | 376 B |
| references/06_PROCEDURE.md | markdown | 1.2 KB |
| references/07_FAILURES.md | markdown | 522 B |
| scripts/exec.ps1executable | script | 362 B |
| scripts/exec.shexecutable | script | 320 B |
| scripts/help.shexecutable | script | 473 B |
| scripts/include/prompt_exec_cli.py | script | 2.9 KB |
| scripts/include/prompt_parse.py | script | 6.7 KB |
| scripts/validate.shexecutable | script | 658 B |
scripts/include/prompt_exec_cli.py
View on GitHub#!/usr/bin/env python3
import argparse
import importlib.util
import sys
from prompt_parse import ACTIVE_PATH, artifact_exists, delete_artifact, load_artifact, validate_artifact, write_receipt
def cmd_help() -> int:
print(
"""prompt-exec - Execute the forged prompt exactly as written
Usage:
prompt-exec [--dry-run]
prompt-exec help
prompt-exec validate
Deterministic behavior:
- Requires .prompt/active.yaml exists
- Requires artifact status is ready
- Writes receipt to .prompt/receipts/
- Deletes .prompt/active.yaml after successful execution
- Prints the prompt text to execute
"""
)
return 0
def cmd_validate() -> int:
errors: list[str] = []
if importlib.util.find_spec("yaml") is None:
errors.append("missing dependency: pyyaml")
if importlib.util.find_spec("jsonschema") is None:
errors.append("missing dependency: jsonschema")
if errors:
for e in errors:
print(f"error: {e}", file=sys.stderr)
return 1
print("ok: prompt-exec CLI is runnable")
return 0
def cmd_exec(dry_run: bool) -> int:
if not artifact_exists():
print("error: no active prompt", file=sys.stderr)
print(f"path: {ACTIVE_PATH} (does not exist)", file=sys.stderr)
print("use prompt-forge to create one first", file=sys.stderr)
return 1
artifact = load_artifact() or {}
if artifact.get("status") != "ready":
print(f"error: prompt status is '{artifact.get('status')}', not 'ready'", file=sys.stderr)
print("use prompt-forge to complete refinement first", file=sys.stderr)
return 1
errors = validate_artifact(artifact)
if errors:
print("error: artifact validation failed", file=sys.stderr)
for e in errors:
print(f" - {e}", file=sys.stderr)
return 1
if dry_run:
print("dry-run: would execute and delete artifact")
print(f"prompt: {artifact.get('prompt', '')[:100]}...")
return 0
receipt_path = write_receipt(artifact, execution_status="success")
print(f"receipt: {receipt_path}")
delete_artifact()
print(f"deleted: {ACTIVE_PATH}")
print("---")
print("PROMPT TO EXECUTE:")
print(artifact.get("prompt", ""))
return 0
def build_parser() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser(prog="prompt-exec", add_help=False)
parser.add_argument("command", nargs="?", help="help or validate")
parser.add_argument("--dry-run", action="store_true")
return parser
def main() -> int:
parser = build_parser()
args = parser.parse_args()
if args.command == "help":
return cmd_help()
if args.command == "validate":
return cmd_validate()
if args.command not in (None, ""):
print(f"error: unknown command '{args.command}'", file=sys.stderr)
return 1
return cmd_exec(dry_run=args.dry_run)
if __name__ == "__main__":
sys.exit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |