graphite-skill

Routes verbose Git and Graphite outputs to subagents for concise summaries.

5|Updated Nov 12, 2025
One-click install
npx skills add https://github.com/slamb2k/mad-skills --skill graphite-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: graphite-skill
Source: https://github.com/slamb2k/mad-skills/tree/main/graphite-skill
Command: npx skills add https://github.com/slamb2k/mad-skills --skill graphite-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, and includes references (resource) components.

What problem does it solve?

Verbose output from Git and Graphite CLI commands can quickly exhaust an AI's context window, degrading its reasoning and limiting the number of operations it can perform. This skill automatically optimizes these interactions, dramatically improving context efficiency.

Core Features & Use Cases

  • Automatic Context Optimization: Uses a SessionStart hook to inject patterns that automatically delegate verbose Git/Graphite operations to a subagent.
  • Subagent Isolation: The subagent processes large CLI outputs (e.g., gt stack JSON, git log --graph) in its isolated context, returning only concise, actionable summaries (<50 tokens) to the main agent.
  • Zero-Friction Workflow: Activates automatically at session start, requiring no manual invocation from the user.
  • Use Case: When you ask "Check my Graphite stack", instead of receiving 15KB of raw JSON, the skill automatically delegates the command, processes the output, and returns a brief summary like "✓ feature/auth | 3 PRs | Review #456", preserving your AI's context for higher-level reasoning.

Quick Start

Run the install script for the graphite-skill in your project directory. Then, start Claude Code and ask "Check my Graphite stack". Observe the concise summary returned, demonstrating automatic context optimization.

Frequently Asked Questions about graphite-skill

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

FAQPage Schema
How do Git and Graphite CLI commands affect AI context windows?

Verbose output from git and Graphite commands—like `gt stack` JSON, `git log --graph`, and PR data—quickly exhaust context tokens, degrading reasoning and limiting operations. This skill automatically delegates these to subagents, returning summaries under 50 tokens instead of raw 15KB outputs.

Can I automate Git and Graphite workflows without manual intervention?

Yes. This skill uses a SessionStart hook to automatically inject patterns that delegate verbose Git/Graphite operations to subagents. It activates at session start with zero manual invocation—just ask your normal workflow questions and receive optimized summaries.

What's the best way to reduce context pollution from Git stack and diff commands?

Delegate verbose git and Graphite operations to isolated subagents. This skill routes commands like `gt stack`, `git log`, and PR queries to subagents in Claude Code environments, processing large outputs and returning concise, actionable summaries while preserving your main context for reasoning.

Does this work with Graphite stacks and Git logs in CLI workflows?

Yes. The skill is designed for Claude Code environments handling Git/Graphite workflows. It automatically optimizes interactions with `gt stack` JSON, `git log --graph`, diffs, and PR data by using --json flags, suppressing stderr, and parsing results before returning.

What dependencies does this automation require?

The skill requires `jq` for JSON parsing. It applies automatically in Claude Code when you ask workflow questions involving Git or Graphite commands, with no additional setup beyond running the install script.