From 813cc2fa32a1fc27b5f462b2542e627c8ac8aeb3 Mon Sep 17 00:00:00 2001 From: "jacky.cheng" Date: Mon, 20 Jul 2026 12:36:00 +0000 Subject: [PATCH] [Chore] Remove deprecated frontend-design and gh-setup skills --- skills/frontend-design/SKILL.md | 44 --------- skills/gh-setup/SKILL.md | 148 ---------------------------- skills/gh-setup/scripts/setup_gh.sh | 99 ------------------- 3 files changed, 291 deletions(-) delete mode 100644 skills/frontend-design/SKILL.md delete mode 100644 skills/gh-setup/SKILL.md delete mode 100755 skills/gh-setup/scripts/setup_gh.sh diff --git a/skills/frontend-design/SKILL.md b/skills/frontend-design/SKILL.md deleted file mode 100644 index 79fd1e9..0000000 --- a/skills/frontend-design/SKILL.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -name: frontend-design -description: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics. ---- - -This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices. - -The user provides frontend requirements: a component, page, application, or interface to build. They may include context about the purpose, audience, or technical constraints. - -## Design Thinking - -Before coding, understand the context and commit to a BOLD aesthetic direction: - -- **Purpose**: What problem does this interface solve? Who uses it? -- **Tone**: Pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, etc. There are so many flavors to choose from. Use these for inspiration but design one that is true to the aesthetic direction. -- **Constraints**: Technical requirements (framework, performance, accessibility). -- **Differentiation**: What makes this UNFORGETTABLE? What's the one thing someone will remember? - -**CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work - the key is intentionality, not intensity. - -Then implement working code (HTML/CSS/JS, React, Vue, etc.) that is: - -- Production-grade and functional -- Visually striking and memorable -- Cohesive with a clear aesthetic point-of-view -- Meticulously refined in every detail - -## Frontend Aesthetics Guidelines - -Focus on: - -- **Typography**: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics; unexpected, characterful font choices. Pair a distinctive display font with a refined body font. -- **Color & Theme**: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes. -- **Motion**: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions. Use scroll-triggering and hover states that surprise. -- **Spatial Composition**: Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density. -- **Backgrounds & Visual Details**: Create atmosphere and depth rather than defaulting to solid colors. Add contextual effects and textures that match the overall aesthetic. Apply creative forms like gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, custom cursors, and grain overlays. - -NEVER use generic AI-generated aesthetics like overused font families (Inter, Roboto, Arial, system fonts), cliched color schemes (particularly purple gradients on white backgrounds), predictable layouts and component patterns, and cookie-cutter design that lacks context-specific character. - -Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices (Space Grotesk, for example) across generations. - -**IMPORTANT**: Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. Elegance comes from executing the vision well. - -Remember: Claude is capable of extraordinary creative work. Don't hold back, show what can truly be created when thinking outside the box and committing fully to a distinctive vision. diff --git a/skills/gh-setup/SKILL.md b/skills/gh-setup/SKILL.md deleted file mode 100644 index 2ee68d4..0000000 --- a/skills/gh-setup/SKILL.md +++ /dev/null @@ -1,148 +0,0 @@ ---- -name: gh-setup -description: "Make the GitHub CLI (`gh`) usable in non-interactive shells. Installs `gh` to `~/bin` (no sudo) when missing and exports `GH_TOKEN` from `~/.git-credentials` so commands like `gh run list` work without `gh auth login`. Use whenever a script or skill (e.g. `inferencex-table`) fails with `command not found: gh`, `gh: To use GitHub CLI in automation, set the GH_TOKEN environment variable`, or `gh auth login` prompts." ---- - -# gh-setup - -Most boxes here do **not** have `gh` pre-installed and have no passwordless `sudo` for general install paths, but they do have a long-lived PAT in `~/.git-credentials`. This skill is the canonical way to make `gh` work in those environments without touching root. - -## When to use - -Trigger this skill whenever you hit any of: - -- `FileNotFoundError: ... 'gh'` from a Python `subprocess` -- Shell error: `gh: command not found` -- `gh: To use GitHub CLI in automation, set the GH_TOKEN environment variable.` -- `gh auth status` says "You are not logged into any GitHub hosts" -- Any other skill/script (most commonly `inferencex-table`) fails because `gh` is missing or unauthenticated. - -Do **not** use this for repo-level git auth (cloning, pushing) — `~/.git-credentials` already handles HTTPS for `git`. This skill is specifically for the `gh` CLI. - ---- - -## Two entry points - -| Entry point | When it runs | What it does | -|---|---|---| -| **Auto-setup** — `~/agent-box/gh-setup.sh` (chained from `run_docker.sh`) | Once, at Docker container launch | Installs `gh` to `${HOST_HOME}/bin/gh` (host-mounted, persistent across containers) and appends a managed block to `~/.bashrc` so every interactive shell in the container has `gh` on `PATH` and `GH_TOKEN` exported. | -| **On-demand fix** — `scripts/setup_gh.sh` (this skill) | Manually, when an agent shell hits the failure modes below | Same install + token-export, but for the current shell only. Use when working on a host without the `agent-box` chain or when troubleshooting. | - -### Auto-setup at Docker launch - -`run_docker.sh` chains it into the container init line, e.g.: - -```bash -bash -c "echo '' | bash $HOME/agent-box/claude-code.sh \ - && bash $HOME/agent-box/claude-code-key.sh \ - && bash $HOME/agent-box/gh-setup.sh \ - && pip install openpyxl \ - && exec bash" -``` - -After `exec bash`, the new interactive shell sources `~/.bashrc`, which puts `${HOST_HOME}/bin` on `PATH` and resolves `GH_TOKEN` from `$HOME/.git-credentials` (or `${HOST_HOME}/.git-credentials` as fallback for in-container shells where `$HOME=/root`). - -### On-demand fix (one-liner) - -If `gh` is missing in the current shell session — e.g. on a host that didn't run through `run_docker.sh`, or in an existing container that pre-dates this skill — source the bootstrap script: - -```bash -source ~/agent-box/skills/gh-setup/scripts/setup_gh.sh -``` - -That script is idempotent and does the following: - -1. Skips install if `gh` is already on `PATH` or already at `~/bin/gh`. -2. Otherwise downloads the pinned `gh` tarball, extracts the binary into `~/bin/gh`, makes it executable. -3. Prepends `~/bin` to `PATH` for the current shell. -4. Exports `GH_TOKEN` by parsing the PAT out of `~/.git-credentials`. -5. Verifies with `gh --version` and `gh auth status` (best effort). - -After sourcing, the same shell can run `gh run list -R SemiAnalysisAI/InferenceX ...` directly, and any Python script that shells out to `gh` (e.g. `inferencex-table/scripts/search_bmk.py`) will work. - -> **Important — invoking from another skill:** subprocesses inherit `PATH` and `GH_TOKEN` only if they're set in the **current** shell *before* the subprocess is spawned. Always `source` (not just run) the script in the same shell that will launch the downstream command. - ---- - -## Manual fallback (when the bootstrap script is unavailable) - -Run these by hand. They're the exact steps the script automates. - -### Step 1: Install `gh` to `~/bin` (no sudo required) - -```bash -GH_VERSION=2.62.0 -mkdir -p ~/bin -cd /tmp -curl -fsSL "https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_amd64.tar.gz" -o gh.tar.gz -tar xzf gh.tar.gz -cp "gh_${GH_VERSION}_linux_amd64/bin/gh" ~/bin/gh -chmod +x ~/bin/gh -export PATH="$HOME/bin:$PATH" -gh --version -``` - -Pinned to `v2.62.0` — known to work with the `inferencex-table` scripts. Bump only if a newer feature is required. - -### Step 2: Export `GH_TOKEN` from `~/.git-credentials` - -`gh auth login` requires an interactive browser flow, which won't work in agent shells. Skip it and feed `gh` the PAT we already have: - -```bash -export GH_TOKEN=$(grep -oP 'https://[^:]+:\K[^@]+' ~/.git-credentials | head -1) -gh auth status # should now say "Logged in to github.com" -``` - -The token must have at minimum `repo` and `actions:read` scopes (the `inferencex-table` skill needs these to list workflow runs and download artifacts). - -### Step 3 (optional): Make it permanent - -If you don't want to re-source on every new shell, append to `~/.bashrc`: - -```bash -cat >> ~/.bashrc <<'EOF' - -# gh-setup: PAT-based auth for the GitHub CLI -export PATH="$HOME/bin:$PATH" -if [ -f "$HOME/.git-credentials" ] && [ -z "$GH_TOKEN" ]; then - export GH_TOKEN=$(grep -oP 'https://[^:]+:\K[^@]+' "$HOME/.git-credentials" | head -1) -fi -EOF -``` - ---- - -## Diagnosing common failure modes - -| Symptom | Cause | Fix | -|---|---|---| -| `gh: command not found` | binary not installed or not on PATH | Source the bootstrap script (Step 1) | -| `To use GitHub CLI in automation, set the GH_TOKEN environment variable.` | `gh` installed but no auth context | Run Step 2 to export `GH_TOKEN` | -| `HTTP 401: Bad credentials` | PAT in `~/.git-credentials` is expired or has wrong scopes | Rotate the PAT; ensure scopes `repo` + `actions:read` | -| `gh: HTTP 403: Resource not accessible by personal access token` | PAT missing `actions:read` (private repos need this even for public-style endpoints) | Re-issue PAT with `actions:read` | -| `FileNotFoundError: ... 'gh'` from Python subprocess | Python child process didn't inherit the updated `PATH` | Make sure `~/bin` is on `PATH` **before** launching the Python script in the same shell | -| `gh auth login` opens a browser prompt and hangs | Don't use `gh auth login` here — it requires interactive flow | Use `GH_TOKEN` env var instead (Step 2) | -| `gh run list failed: gh: To use GitHub CLI in automation...` from `inferencex-table` | Script invoked `gh` without `GH_TOKEN` in env | `source` this skill's setup script before running | - ---- - -## Verification - -After setup, all of these should succeed without prompting: - -```bash -gh --version -gh auth status -gh run list -R SemiAnalysisAI/InferenceX --limit 1 -``` - -If `gh run list` returns a non-empty list, downstream skills like `inferencex-table` will work end-to-end. - ---- - -## Notes - -- The bootstrap script writes the binary to `~/bin/gh` only — it does not touch `/usr/local/bin` or anything that needs root. -- `GH_TOKEN` takes precedence over `gh auth login` state, so it's safe to set even if someone has run `gh auth login` previously. -- This skill assumes Linux x86_64 (the environments we run in). For other architectures, change the asset name (e.g. `gh_${GH_VERSION}_linux_arm64.tar.gz`). -- Do not commit `~/.git-credentials` or `GH_TOKEN` anywhere; these are user-local secrets. diff --git a/skills/gh-setup/scripts/setup_gh.sh b/skills/gh-setup/scripts/setup_gh.sh deleted file mode 100755 index 77d7a8c..0000000 --- a/skills/gh-setup/scripts/setup_gh.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/env bash -# gh-setup: ensure `gh` is installed (~/bin) and GH_TOKEN is exported from ~/.git-credentials. -# -# Designed to be SOURCED, not executed: -# source ~/agent-box/skills/gh-setup/scripts/setup_gh.sh -# -# Idempotent: safe to source multiple times. -# Requires: curl, tar, grep -P, write access to $HOME/bin, and a valid PAT in ~/.git-credentials. - -# Pinned gh version known to work with inferencex-table. -GH_VERSION="${GH_VERSION:-2.62.0}" -GH_ARCH="linux_amd64" -GH_BIN_DIR="$HOME/bin" -GH_BIN="$GH_BIN_DIR/gh" - -_gh_log() { printf '[gh-setup] %s\n' "$*"; } -_gh_err() { printf '[gh-setup] ERROR: %s\n' "$*" >&2; } - -# --------------------------------------------------------------------------- -# Step 1: install gh if missing -# --------------------------------------------------------------------------- - -# Make sure ~/bin is on PATH first so an existing ~/bin/gh is discoverable. -case ":$PATH:" in - *":$GH_BIN_DIR:"*) ;; - *) export PATH="$GH_BIN_DIR:$PATH" ;; -esac - -if command -v gh >/dev/null 2>&1; then - _gh_log "gh already on PATH ($(command -v gh))" -elif [ -x "$GH_BIN" ]; then - _gh_log "gh already at $GH_BIN" -else - _gh_log "Installing gh v${GH_VERSION} to $GH_BIN_DIR (no sudo)" - mkdir -p "$GH_BIN_DIR" || { _gh_err "could not create $GH_BIN_DIR"; return 1 2>/dev/null || exit 1; } - - _gh_tmp="$(mktemp -d)" - _gh_url="https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_${GH_ARCH}.tar.gz" - - if ! curl -fsSL "$_gh_url" -o "$_gh_tmp/gh.tar.gz"; then - _gh_err "download failed: $_gh_url" - rm -rf "$_gh_tmp" - return 1 2>/dev/null || exit 1 - fi - - if ! tar -xzf "$_gh_tmp/gh.tar.gz" -C "$_gh_tmp"; then - _gh_err "tar extraction failed" - rm -rf "$_gh_tmp" - return 1 2>/dev/null || exit 1 - fi - - cp "$_gh_tmp/gh_${GH_VERSION}_${GH_ARCH}/bin/gh" "$GH_BIN" \ - && chmod +x "$GH_BIN" \ - || { _gh_err "install copy failed"; rm -rf "$_gh_tmp"; return 1 2>/dev/null || exit 1; } - - rm -rf "$_gh_tmp" - _gh_log "gh installed at $GH_BIN" -fi - -# --------------------------------------------------------------------------- -# Step 2: export GH_TOKEN from ~/.git-credentials (if not already set) -# --------------------------------------------------------------------------- - -if [ -n "$GH_TOKEN" ]; then - _gh_log "GH_TOKEN already set in env (length ${#GH_TOKEN})" -elif [ -n "$GITHUB_TOKEN" ]; then - export GH_TOKEN="$GITHUB_TOKEN" - _gh_log "GH_TOKEN set from GITHUB_TOKEN (length ${#GH_TOKEN})" -elif [ -f "$HOME/.git-credentials" ]; then - _gh_token="$(grep -oP 'https://[^:]+:\K[^@]+' "$HOME/.git-credentials" 2>/dev/null | head -1)" - if [ -n "$_gh_token" ]; then - export GH_TOKEN="$_gh_token" - _gh_log "GH_TOKEN set from ~/.git-credentials (length ${#GH_TOKEN})" - else - _gh_err "could not parse a PAT from ~/.git-credentials" - fi - unset _gh_token -else - _gh_err "no GH_TOKEN/GITHUB_TOKEN env var and no ~/.git-credentials — gh will not authenticate" -fi - -# --------------------------------------------------------------------------- -# Step 3: best-effort verification -# --------------------------------------------------------------------------- - -if command -v gh >/dev/null 2>&1; then - _gh_log "$(gh --version | head -1)" - if [ -n "$GH_TOKEN" ]; then - if gh auth status >/dev/null 2>&1; then - _gh_log "gh auth status OK" - else - _gh_log "gh auth status reported issues (PAT may be expired or missing scopes: repo, actions:read)" - fi - fi -else - _gh_err "gh still not on PATH after setup" -fi - -unset _gh_log _gh_err _gh_tmp _gh_url