repo-optimize

Scan a GitHub repository for code, CI, security, and maintainability fixes and open focused draft pull requests.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Repositories accumulate performance issues, security gaps, CI weaknesses, and financial-risk assumptions that rarely get audited systematically. This Skill scans a repository's default branch for concrete improvements and opens a focused draft pull request only when a change is justified. ## Core Features & Use Cases - Multi-Domain Audit: Reviews code for performance, security, financial risk, auditability, and maintainability without inventing work to hit a quota. - Stack-Agnostic Analysis: Learns the actual stack from the repository tree instead of assuming a specific language or framework. - Identity Resolution from Git: Derives owner, repo, and default branch from git remotes, so nothing is hardcoded. - Use Case: Ask the agent to optimize your repo; it scans the default branch, identifies a high-leverage fix such as a missing CI security check, and opens a draft PR scoped to that single improvement. ## Quick Start Ask the agent to run repo-optimize on this repository and open a draft PR for any improvement that earns its keep.

Frequently Asked Questions about repo-optimize

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

FAQPage Schema
How do I audit a GitHub repository for improvements automatically?▼

Invoke repo-optimize with an optional topic or area to scan. It reads the repository tree to learn the stack, reviews code for performance, security, and maintainability issues, and opens a focused draft pull request only for changes that are justified.

What tools are required to run repo-optimize?▼

The Skill requires git plus either the GitHub CLI (gh) or the GitHub MCP tools. It is compatible with GitHub Copilot coding agent, Copilot CLI, and VS Code or Visual Studio agent mode.

Does repo-optimize work with any programming language?▼

Yes, it works on any GitHub repository. It learns the stack from the repository tree rather than assuming Python, FastAPI, LangGraph, or any other project's modules.

How does repo-optimize know which repository and branch to scan?▼

It resolves identity from git by parsing the origin remote URL for owner and repo, and reading the remote HEAD symbolic ref for the default branch. Owner, repo, and branch are never hardcoded.

Will repo-optimize open pull requests for every issue it finds?▼

No, it opens a focused draft pull request only when a chunk of work earns its keep. The instructions explicitly say not to invent work to hit a quota, keeping PRs scoped and justified.