Cheapskate

From plurigrid/asi · View interactive version

Cheapskate is an AI agent skill from the GitHub repository plurigrid/asi. Cheapskate Skill

How to use this skill

Skill file

Cheapskate Skill

Trit: -1 (MINUS - validator/constrainer)

Purpose: Minimize Amp thread costs through token efficiency


Core Principles

1. Token Conservation

2. Tool Call Efficiency

3. Subagent Economics

4. Context Window Management


Anti-Patterns (Token Wasters)

| Pattern | Cost | Fix |

|---------|------|-----|

| Reading entire files | High | Use line ranges [1, 50] |

| Sequential tool calls | Medium | Parallelize independents |

| Explaining before doing | Medium | Just do it |

| Asking permission | Low-Medium | Act, don't ask |

| Repeating user's question | Low | Skip acknowledgment |

| Long error explanations | Medium | Terse: "Error: X. Fix: Y" |

| Multiple edit iterations | High | Plan first, single edit |

| Loading unused skills | Medium | Load on-demand |


Efficient Patterns

File Operations

# Bad: Read full 2000-line file
Read("/path/to/big.py")

# Good: Read relevant section
Read("/path/to/big.py", [100, 150])

# Better: Grep first, then targeted read
Grep("def target_function", path="/path/to/big.py")
Read("/path/to/big.py", [142, 165])

Parallel Execution

# Bad: Sequential
Read(file1) → Read(file2) → Read(file3)

# Good: Parallel (single message, 3 tool calls)
Read(file1) | Read(file2) | Read(file3)

Subagent Dispatch

# Bad: Heavy work in main thread (tokens visible)
[read 10 files, analyze, generate report]

# Good: Subagent isolation (only summary returned)
Task("Analyze 10 files, return 3-line summary")

Response Length

# Bad (47 tokens)
"I'll help you implement that feature. Let me start by 
examining the codebase to understand the current architecture,
then I'll make the necessary changes..."

# Good (3 tokens)
[starts making changes]

Cost Estimation Heuristics

| Operation | ~Tokens |

|-----------|---------|

| Read 100 lines code | 400-800 |

| Grep results (10 matches) | 200-400 |

| Edit file | 100-300 |

| Skill load | 500-2000 |

| Task subagent prompt | 200-500 |

| Task subagent result | 100-500 |

| Web search result | 500-1500 |

| Mermaid diagram | 100-300 |


Cheapskate Checklist

Before responding:


GF(3) Integration

As MINUS (-1) validator:

Σ(generator_tokens) + Σ(validator_savings) ≡ 0 (mod 3)

Commands

# Analyze thread token usage
just cheapskate-analyze <thread-id>

# Estimate remaining budget
just cheapskate-budget

# Compress context
just cheapskate-compress

See Also

Scientific Skill Interleaving

This skill connects to the K-Dense-AI/claude-scientific-skills ecosystem:

Graph Theory

Bibliography References

Cat# Integration

This skill maps to Cat# = Comod(P) as a bicomodule in the equipment structure:

Trit: 0 (ERGODIC)
Home: Prof
Poly Op: ⊗
Kan Role: Adj
Color: #26D826

GF(3) Naturality

The skill participates in triads satisfying:

(-1) + (0) + (+1) ≡ 0 (mod 3)

This ensures compositional coherence in the Cat# equipment structure.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.