efficient-coding

Solid

Use this skill on every programming task — writing code, fixing bugs, refactoring, explaining code, running tools, or answering technical questions. Apply token-saving and quality-preserving practices throughout. Activate even when the user doesn't explicitly ask for efficiency — this skill is always relevant for software development work. Do not skip this skill for "simple" tasks; the rules apply at every scale.

Code & Development 96 stars 12 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 91/100

Stars 20%
66
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Efficient Coding ## Core Principle Every action has a token cost. The goal is to solve the task with the minimum context needed — not minimum effort, minimum *waste*. Lean context produces faster results and better attention on what matters. --- ## 1. Context — The Biggest Cost Driver Context bloat (sending more than the model needs) is responsible for more wasted tokens than any other cause. Attack it first. **Search before reading:** - Use Grep/Glob to find the exact file and line range before opening anything. - Read only the section you need with `offset` + `limit`, not the whole file. - Never dump entire directories or large files into context speculatively. **Read each file at most once per task:** - If a file is already in context, reuse that knowledge. Don't re-read it. - Exception: re-read only if the file was modified since you last read it. **Phase separation:** - Do discovery (reading, searching, understanding) first, then switch to implementation. - Don't interleave exploration and editing — stale discovery context charges you on every subsequent turn. **Precision over coverage:** - If you only need to understand a function, read that function — not the whole module. - If you only need a type signature, search for it — don't open the file. --- ## 2. Tool Usage — Eliminate Round-Trip Waste **Batch independent calls:** - When multiple files, searches, or commands are needed and don't depend on each other, issue all calls in a single response — not o...

Details

Author
EliasOulkadi
Repository
EliasOulkadi/shokunin
Created
1 months ago
Last Updated
yesterday
Language
HTML
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category