cgagentharness-optimize

Scans the CG-agent-harness Rust codebase and implements evidence-backed improvements as draft PRs.

Updated Sep 7, 2026
One-click install
npx skills add https://github.com/cgfixit/CG-agent-harness --skill cgagentharness-optimize-cgfixit
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cgagentharness-optimize
Source: https://github.com/cgfixit/CG-agent-harness/tree/main/.claude/skills/cgagentharness-optimize
Command: npx skills add https://github.com/cgfixit/CG-agent-harness --skill cgagentharness-optimize-cgfixit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Maintaining a security-sensitive Rust/axum harness requires disciplined, evidence-first optimization work; ad-hoc changes risk violating architectural invariants, weakening write gates, or duplicating open PRs. This Skill provides a structured scan-to-draft-PR workflow that keeps improvements safe and reviewable. ## Core Features & Use Cases - Time-boxed read-only scan: Sweeps src/agentic, src/server, src/shim, src/llm, CI workflows, and tests to produce 6-10 cited findings grouped into 1-4 earned PR-sized chunks. - Invariant-guarded implementation: Enforces harness guardrails (I6 shim isolation, guard chain order, write gates, clone jail) and requires explicit invariant statements for core-path changes. - Publication discipline: Dedups against open PRs, plans shared-file topology (consolidate or stack), and opens draft PRs only when authorized, verified with cargo fmt, clippy, tests, and check-pr-template.sh. - Use Case: Ask the agent to optimize the repository; it scans the default branch, reports findings with file/line citations, and—once you authorize scope—implements a focused chunk and opens a draft PR. ## Quick Start Ask the agent to run a read-only optimization scan of the CG-agent-harness repository and report grouped findings before implementing anything.

Frequently Asked Questions about cgagentharness-optimize

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely optimize a Rust axum codebase with an AI agent?▼

Run a time-boxed read-only scan first to gather cited findings, dedup them against open PRs, then implement only authorized scope in small PR-sized chunks. Verify each chunk with cargo fmt, clippy with -D warnings, and the full test suite before pushing.

How to group code improvement findings into draft PRs?▼

Group findings into only as many chunks as earn a reviewable PR, typically one to four, with each chunk covering one or two major concepts. Build a file-to-chunks map for shared files and either consolidate edits or stack branches with the parent as base.

Does this skill work on CyClaw or Python RAG projects?▼

No, it is scoped to the cgfixit/CG-agent-harness Rust repository and explicitly excludes CyClaw, soul, RAG, and LangGraph changes. Those topologies violate this repo's contract and are skipped even when mentioned in open issues.

Can the agent push branches or open PRs automatically?▼

No, publication, push, and draft PR creation happen only when explicitly authorized by the operator. Until then the skill implements locally or stops after the plan, and it never commits directly to main.

Why does clippy fail on some macOS machines during verification?▼

Some Macs need the CLIPPY environment variable pointed at /opt/homebrew/bin/cargo-clippy because the default cargo clippy shim is not on PATH. Set CLIPPY before running the verify commands.

What happens when the scan finds nothing to improve?▼

Zero kept chunks after scanning and deduplication is a valid, successful outcome. The skill confirms zero findings and stops rather than manufacturing thin or unnecessary work.