بنقرة واحدة
file-read
Read files efficiently to minimize token usage — use targeted reads instead of dumping entire files
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Read files efficiently to minimize token usage — use targeted reads instead of dumping entire files
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use for math calculations.
Use for date/time.
Rules to minimize token usage
Native macOS built-in screen capture. Saves directly to ~/Desktop using exact system timestamp naming, so agent can automatically detect and read the latest screenshot without manual file paths. macOS only.
Maintain a living context document (plan.md) as a self-note to preserve the original agenda, track progress, and prevent context drift during complex tasks
A meta-skill to create new skills in the default skill directory with proper YAML front matter
| name | file-read |
| description | Read files efficiently to minimize token usage — use targeted reads instead of dumping entire files |
Read files efficiently — fetch only what you need. Never cat a large file when a subset suffices.
| Situation | Command |
|---|---|
| Know what you're looking for | grep -n "symbol" file |
| Need first N lines | head -n 50 file |
| Need last N lines | tail -n 30 file |
| Need lines M–N | sed -n 'M,Np' file |
| Unknown file, check size first | wc -l file && head -n 30 file |
| File < 100 lines | cat file |
wc -l file.txt # check size before reading
grep -n "pattern" file.txt # find lines + line numbers
grep -n -A 5 -B 2 "pattern" file.txt # with surrounding context
grep "^import\|^from" file.py # filter specific line types
grep -v "^#\|^$" file.txt # skip comments/blank lines
head -n 50 file.txt # first 50 lines
tail -n 30 file.txt # last 30 lines
sed -n '10,30p' file.txt # lines 10–30
sed -n '/^## Section/,/^## /p' file.txt # between markers
grep -n "^def my_func" file.py # find block start line
sed -n '42,60p' file.py # then extract the block
{ sed -n '1,10p' f.txt; echo "---"; sed -n '80,90p' f.txt; } # non-contiguous
wc -l file.txt && head -n 5 file.txt && echo "..." && tail -n 5 file.txt # summarize
wc -l before reading unknown filesgrep first when you know what you're looking forcat on files > 200 lines unless full content is required