$ show garrytan/gstack
Gstack is a production-grade AI agent skill framework and headless browser automation toolchain designed for Claude Code, Codex, Cursor, and other coding agents. It provides a structured skill system (50+ slash-command skills like `/ship`, `/review`, `/plan-ceo-review`) with a resolver pipeline that generates per-host `SKILL.md` templates from TypeScript sources. The repo also contains a fully functional headless browser daemon (`browse/`) with anti-bot stealth, multi-layer prompt injection defense (canary tokens, ML classifiers, URL blocklist, envelope sentinel), CDP escape hatch, SOCKS5 proxy bridge, and secure file I/O. Additional subsystems include markdown-to-PDF generation (`make-pdf/`), iOS QA automation (`ios-qa/`), design mockup generation (`design/`), a secret redaction engine, and a cross-session knowledge base (gbrain). The codebase is unusually well-tested with extensive unit, integration, and periodic paid E2E tests against real LLM APIs. While primarily an application, it includes data pipeline components like telemetry aggregation, eval result stores, and a brain cache specification with TTL-based entities and calibration weights, making it a hybrid with strong data engineering discipline.
The LLM identified 5 files worth highlighting for reuse:
A standalone, well-structured secret scanning engine with a taxonomy of sensitivity levels (LOW/MEDIUM/HIGH), auto-redact options, oversize fail-closed behavior, and structural guards. It is used by `/ship`, `/document-release`, and `/cso` skills. The engine is coupled only to `redact-patterns.ts` for pattern definitions and `jsonl-store.ts` for audit logging; it could be extracted with minimal changes into any project needing configurable secret detection.
Implements a four-layer content security defense: datamarking (invisible watermarks), hidden element stripping (ARIA regex, display:none), URL/content blocklist (L1-L3 deterministic rules), and an envelope sentinel escape detection (L4). This is a self-contained module that imports only standard library types and one internal constant (`ENVELOPE_MARKER`). The pattern is reusable for any system needing to detect prompt injection or sanitize LLM inputs.
A generic `CircularBuffer<T>` implementation with O(1) insert, fixed capacity, and efficient iteration. Used for console, network, and dialog logs in the browser subsystem. The class is standalone with zero internal dependencies and could be dropped into any TypeScript project needing a bounded buffer.
Implements a local SOCKS5 proxy (no auth) that forwards to an authenticated upstream SOCKS5 proxy. Includes pre-flight connection test, credential detection, and proper connection lifecycle. The module is self-contained (imports only Node.js net/TLS and one local config type) and demonstrates a clean tunnel pattern reusable for any proxy chaining scenario.
An append-only JSONL store with injection detection (rejects lines containing flow control characters), tolerant read (skips corrupt lines with warnings), and atomic-ish append (write to temp file, rename). Used for audit logs, telemetry, decision logs, and learnings. The module imports only Node.js fs/path and a helper from `is-conductor.ts`. It could serve as a lightweight event log for any application.