hashgraph-online/awesome-codex-plugins / plugins/alpoxdev/hypercore/skills/hyper-design
hyper-design
Verified[Hyper] Use this skill when the user wants interface design work that must not look AI-generated - designing a new screen, page, or component, restyling an existing UI, building faux product UI for a hero, feature card, or demo, or auditing, cleaning, or verifying generic template patterns in an interface - driven by a written design direction, a numeric craft floor, static detection, and evidence-separated review, with briefs and reports saved under `.hyper/design/[slug]/`. Do not use it for backend or data work with no visual surface, accessibility-only or performance-only QA, brand strategy with no interface, or a reusable skill folder.
scripts/run-contract-evals.sh
View on GitHub#!/usr/bin/env bash
# Run the report/waiver/rendered-evidence contract cases and report per-case exit-code agreement.
set -euo pipefail
RC_SCRIPT_DIR=$(CDPATH='' cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
RC_SKILL_DIR=$(dirname -- "$RC_SCRIPT_DIR")
RC_DEFAULT_CASES="$RC_SKILL_DIR/assets/evals/contract-cases.jsonl"
RC_USAGE='Usage: bash run-contract-evals.sh [--cases <cases.jsonl>] [--json]'
rc_fail() {
printf '%s\n' "$(jq -cn --arg error "$1" '{ok: false, error: $error}')" >&2
exit 2
}
# rc_case_path <path> resolves one case row's path against the base chosen once after
# argument parsing: the skill folder for the bundled case file, whose rows are
# skill-relative, and the caller's own base otherwise. An absolute path is never
# rewritten.
rc_case_path() {
case $1 in
/*) printf '%s\n' "$1" ;;
*) printf '%s\n' "${RC_BASE:+$RC_BASE/}$1" ;;
esac
}
# rc_command_script <command> prints the script that implements one contract command.
rc_command_script() {
case "$1" in
report) printf '%s\n' "$RC_SCRIPT_DIR/validate-report.sh" ;;
waiver) printf '%s\n' "$RC_SCRIPT_DIR/validate-waivers.sh" ;;
rendered) printf '%s\n' "$RC_SCRIPT_DIR/collect-rendered-evidence.sh" ;;
*) return 1 ;;
esac
}
rc_main() {
local cases=$RC_DEFAULT_CASES json=0 help=0 line index=0 total=0 results='' output ok
local case_json case_status id command input expected case_script flag code out err work extra
while [ $# -gt 0 ]; do
case "$1" in
--cases)
shift
cases=${1-}
case "$cases" in ''|--*) rc_fail '--cases requires a path' ;; esac
if [ $# -gt 0 ]; then shift; fi ;;
--json) json=1; shift ;;
--help|-h) help=1; shift; break ;;
*) rc_fail "Unknown argument: $1" ;;
esac
done
if [ "$help" = 1 ]; then
printf '%s\n' "$RC_USAGE"
return 0
fi
[ -f "$cases" ] || rc_fail "ENOENT: no such file or directory, open '$cases'"
# Choose the row base once. The bundled case file ships skill-relative rows, so it
# resolves against the skill folder from any working directory or install location.
# Any other case file keeps the caller's own base, including a row that names a file
# which also exists inside the package.
RC_BASE="$RC_SKILL_DIR"
if ! [ "$cases" -ef "$RC_DEFAULT_CASES" ]; then RC_BASE=''; fi
work=$(mktemp "${TMPDIR:-/tmp}/slop-contracts.XXXXXX")
while IFS= read -r line || [ -n "$line" ]; do
total=$((total + 1))
index=$total
line=${line%$'\r'}
[ -n "$line" ] || continue
if ! printf '%s' "$line" | jq . > /dev/null 2>&1; then
rm -f -- "$work"
rc_fail "Invalid JSONL at line $index: invalid JSON"
fi
case_json=$(printf '%s' "$line" | jq -c .)
case_status=$(printf '%s' "$case_json" | jq -r '
if type != "object" then "invalid"
elif (.id | type) != "string" then "invalid"
elif (.command | type) != "string" then "invalid"
elif (.input | type) != "string" then "invalid"
elif (.expectedExit | type) != "number" or ((.expectedExit | floor) != .expectedExit) then "invalid"
else "ok" end')
command=$(printf '%s' "$case_json" | jq -r '.command // ""')
if [ "$case_status" != ok ] || ! case_script=$(rc_command_script "$command"); then
rm -f -- "$work"
rc_fail "Invalid case at line $index"
fi
id=$(printf '%s' "$case_json" | jq -r '.id')
input=$(printf '%s' "$case_json" | jq -r '.input')
input=$(rc_case_path "$input")
expected=$(printf '%s' "$case_json" | jq -r '.expectedExit')
if [ "$command" = report ]; then flag='--report'; else flag='--input'; fi
extra=()
if [ -n "$(printf '%s' "$case_json" | jq -r '.expectedMeasurements // ""')" ]; then extra=(--measurements); fi
set +e
bash "$case_script" "$flag" "$input" --json ${extra[@]+"${extra[@]}"} > "$work.out" 2> "$work.err"
code=$?
set -e
out=$(cat -- "$work.out")
err=$(cat -- "$work.err")
failures=''
if [ "$code" != "$expected" ]; then
failures="Expected exit $expected, received $code"
fi
local expected_error matches expected_measurements actual_measurements
expected_measurements=$(printf '%s' "$case_json" | jq -r '.expectedMeasurements // ""')
if [ -n "$expected_measurements" ]; then
actual_measurements=$(printf '%s' "$out" | jq -r '.measurements.status // ""' 2>/dev/null || true)
if [ "$actual_measurements" != "$expected_measurements" ]; then
if [ -z "$failures" ]; then failures="Expected measurements $expected_measurements, received ${actual_measurements:-missing}"; else failures="$failures; Expected measurements $expected_measurements, received ${actual_measurements:-missing}"; fi
fi
fi
expected_error=$(printf '%s' "$case_json" | jq -r '.expectedError // ""')
if [ -n "$expected_error" ]; then
matches=$(printf '%s\n%s' "$out" "$err" | LC_ALL=C grep -c -F -- "$expected_error" || true)
if [ "$matches" = 0 ]; then
if [ -z "$failures" ]; then failures="Missing expected error: $expected_error"; else failures="$failures; Missing expected error: $expected_error"; fi
fi
fi
if [ -z "$failures" ]; then
results="$results$(jq -cn --arg id "$id" '{id: $id, ok: true, failures: []}')"$'\n'
else
results="$results$(jq -cn --arg id "$id" --arg failures "$failures" '{id: $id, ok: false, failures: [$failures]}')"$'\n'
fi
done < "$cases"
rm -f -- "$work" "$work.out" "$work.err"
output=$(printf '%s' "$results" | jq -s '.')
ok=$(printf '%s' "$output" | jq '[.[] | select(.ok == false)] | length == 0')
if [ "$json" = 1 ]; then
jq -n --argjson ok "$ok" --argjson cases "$output" '{ok: $ok, cases: $cases}'
else
printf '%s' "$output" | jq -r '.[] | if .ok then "PASS \(.id)" else "FAIL \(.id): \(.failures | join("; "))" end'
fi
[ "$ok" = true ]
}
rc_main "$@"
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 468k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 468k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 468k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |