Back to directory

pi-rtk-optimizer

An extension for the Pi coding agent that rewrites bash commands to their faster rtk equivalents and compacts noisy tool output from commands such as bash, read and grep, to reduce how much context window a session consumes.

pi-rtk-optimizer

pi-rtk-optimizer delegates the decision of how to rewrite a bash command to an installed rtk rewrite command, so rtk stays the single source of truth for which commands it supports, how it parses the shell, and compound-command behavior; it offers both automatic rewriting and a suggestion-only mode, with a runtime guard that lets raw commands run unchanged if the rtk binary is not available.

Its output compaction pipeline runs in stages: stripping ANSI color codes, summarizing test runner output into pass and fail counts, extracting errors and warnings from build output, condensing git status, log and diff output, summarizing linter output, grouping grep or ripgrep matches by file, filtering source code comments and whitespace at configurable levels, and finally applying smart or hard truncation that preserves file boundaries and, for anchored read output, keeps complete edit anchors intact. A tabbed settings interface opened with a slash command lets a user change these settings without restarting, and it tracks compaction savings per tool type.

More in Agent skills

See all 581
  • Provenance gate

    github.com

    A deterministic authorization gateway that sits between an AI agent and its tools, tracing where each parameter of a side-effect call came from, and blocking the call or asking a human when the source does not check out.

  • A markdown framework of system rules that restates Isaac Asimov's Four Laws of Robotics as a set of prioritized loss calculations for large-language-model agents to follow, published as a discovery file for agents and crawlers to read.

  • Vitruvius

    github.com

    An engineering research agent that runs a discover, read, synthesize, verify and review loop over technical questions, reading sources directly rather than inferring from titles, and publishing its own scored verifier benchmark, weaknesses included.