Skip to content

Bruno-Cunha-Souza/ValarMindSkills / skills/context-optimization

context-optimization

Unverified

Lifecycle context audit/optimize/plan. Audit mode (Phase 0..6) + Guide mode (catalog lookup). Targets long-conv agents, RAG pipelines, sub-agents, large-doc workflows. Detects bloat/dedup/cache/masking/partition opportunities. Emits findings (SAFE/REVIEW/BREAKING) + optimization plan + token delta. Read-only — LGTM if sound. Triggers: 'optimize context', 'compact context', 'auditar contexto', 'otimizar contexto', '/context-optimization'.

scripts/run-all.sh

View on GitHub
#!/usr/bin/env bash
# Thin shim: invoke the ctxopt Rust binary's run-all subcommand.
#
# Build/install: handled by repo-root install scripts via scripts/_lib/ensure-rust.sh
# (see scripts/README.md for manual build instructions).
#
# Usage:
#   PROJECT_ROOT=/path/to/project bash scripts/run-all.sh
#   bash scripts/run-all.sh /path/to/project          # CLI arg also accepted

set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
BIN="$SCRIPT_DIR/bin/ctxopt"

if [ ! -x "$BIN" ]; then
  cat >&2 <<EOF
[ctxopt] Binary not built at $BIN.

To build manually:
  cd $SCRIPT_DIR/ctxopt && cargo build --release
  mkdir -p $SCRIPT_DIR/bin
  cp $SCRIPT_DIR/ctxopt/target/release/ctxopt $SCRIPT_DIR/bin/

Or re-run the repo-root install for your harness:
  bash <repo>/scripts/install-plugin-claude.sh
  bash <repo>/scripts/install-codex.sh
  bash <repo>/scripts/install-antigravity.sh

These invoke scripts/_lib/ensure-rust.sh, which detects/installs Rust and
builds every skill's bin/ automatically.
EOF
  exit 1
fi

# Accept PROJECT_ROOT via CLI arg if not in env (back-compat with legacy entrypoint).
if [ -z "${PROJECT_ROOT:-}" ] && [ $# -ge 1 ]; then
  PROJECT_ROOT="$1"
  shift
fi

if [ -z "${PROJECT_ROOT:-}" ]; then
  echo "[ctxopt] PROJECT_ROOT env var or first CLI arg required." >&2
  exit 1
fi

exec "$BIN" run-all "$PROJECT_ROOT" "$@"
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: 471kUpdated Claude CodeCodexVerifiedInstall
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: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall