/think-in-code
Use when analyzing multiple files, auditing a codebase, scanning dependencies, or counting lines -- one Bash pipeline beats N sequential Read calls.
$ npx -y skills add fusengine/agents --skill think-in-code --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/think-in-code
Context preview
The summary Claude sees to decide when to auto-load this skill.
Use when analyzing multiple files, auditing a codebase, scanning dependencies, or counting lines -- one Bash pipeline beats N sequential Read calls.
SKILL.md
think-in-code.SKILL.mdname: think-in-code
description: Use when analyzing multiple files, auditing a codebase, scanning dependencies, or counting lines -- one Bash pipeline beats N sequential Read calls.
argument-hint: "[pattern] [scope]"
keywords:
- analyze multiple files
- audit codebase
- find all
- scan dependencies
- count lines
- list files matching
- bulk read
user-invocable: false
<objective> Think-in-Code replaces wasteful multi-Read loops with a single compact shell pipeline whenever the task is "for each file in a set, compute/extract X, then aggregate" -- file-size audits, multi-file symbol grep, dependency listing with versions, error-log scanning, lines-of-code-by-extension. Reserve `Read` for targeted inspection of one specific file already known to matter.
The reduction is typically ~60x in tokens consumed versus reading each file individually and tallying manually. </objective>
Think-in-Code Skill
Principle
**1 Bash script = N Read calls avoided.**
When you'd read 10 files sequentially to extract a summary, you waste tokens loading full contents into context. Instead: 1 shell pipeline returns the compact aggregated result.
Heuristic: if your task is "for each file in set, compute/extract X, then aggregate" → write the script. Reserve Read for *targeted inspection* of a specific file you already know matters.
5 Runnable Patterns
1. File size audit (> 100 lines violations)
find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.py" -o -name "*.php" \) \
-not -path "*/node_modules/*" -not -path "*/vendor/*" \
| xargs wc -l 2>/dev/null \
| awk '$1 > 100 && $2 != "total" {print $1, $2}' \
| sort -rn | head -202. Multi-grep symbols (compact JSON)
rg --json -g '*.ts' -g '*.tsx' 'export (function|class|const) (\w+)' src/ \
| jq -r 'select(.type=="match") | "\(.data.path.text):\(.data.line_number) \(.data.lines.text)"' \
| head -50
3. Dependencies with versions
# Node
jq -r '.dependencies, .devDependencies | to_entries[] | "\(.key)@\(.value)"' package.json 2>/dev/null
# PHP
jq -r '.require, ."require-dev" | to_entries[] | "\(.key)@\(.value)"' composer.json 2>/dev/null
4. Error log scan
grep -rEn 'ERROR|FATAL|Exception|panic:|stack trace' \
--include="*.log" logs/ 2>/dev/null \
| tail -30
5. Lines of code by extension
find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.py" -o -name "*.php" \) \
-not -path "*/node_modules/*" -not -path "*/vendor/*" -not -path "*/.git/*" \
-exec wc -l {} + \
| awk '{ext=$2; sub(/.*\./,"",ext); sum[ext]+=$1} END {for (e in sum) print sum[e], e}' \
| sort -rnAnti-Pattern
**Do NOT** Read 10 files sequentially to count their lines, list their exports, or check their size. That is ~6KB context per file = ~60KB wasted for a result that fits in 1KB.
WRONG: Read(f1.ts) → Read(f2.ts) → ... → Read(f10.ts) → manual tally
RIGHT: Bash(find ... | xargs wc -l | awk ...) → 1 compact table
Before / After
**Task:** "Find files > 100 lines in `src/`."
- Before: 10 × Read full file → ~60KB tokens consumed, then mental wc.
- After: 1 × `find src -name '*.ts' | xargs wc -l | awk '$1>100'` → ~1KB result.
**~60× reduction. Use the script.**
Read more
name: think-in-code description: Use when analyzing multiple files, auditing a codebase, scanning dependencies, or counting lines -- one Bash pipeline beats N sequential Read calls. argument-hint: "[pattern] [scope]" keywords: - analyze multiple files - audit codebase - find all - scan dependencies - count lines - list files matching - bulk read user-invocable: false
<objective> Think-in-Code replaces wasteful multi-Read loops with a single compact shell pipeline whenever the task is "for each file in a set, compute/extract X, then aggregate" -- file-size audits, multi-file symbol grep, dependency listing with versions, error-log scanning, lines-of-code-by-extension. Reserve `Read` for targeted inspection of one specific file already known to matter.
The reduction is typically ~60x in tokens consumed versus reading each file individually and tallying manually. </objective>
Think-in-Code Skill
Principle
**1 Bash script = N Read calls avoided.**
When you'd read 10 files sequentially to extract a summary, you waste tokens loading full contents into context. Instead: 1 shell pipeline returns the compact aggregated result.
Heuristic: if your task is "for each file in set, compute/extract X, then aggregate" → write the script. Reserve Read for *targeted inspection* of a specific file you already know matters.
5 Runnable Patterns
1. File size audit (> 100 lines violations)
find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.py" -o -name "*.php" \) \
-not -path "*/node_modules/*" -not -path "*/vendor/*" \
| xargs wc -l 2>/dev/null \
| awk '$1 > 100 && $2 != "total" {print $1, $2}' \
| sort -rn | head -202. Multi-grep symbols (compact JSON)
rg --json -g '*.ts' -g '*.tsx' 'export (function|class|const) (\w+)' src/ \ | jq -r 'select(.type=="match") | "\(.data.path.text):\(.data.line_number) \(.data.lines.text)"' \ | head -50
3. Dependencies with versions
# Node jq -r '.dependencies, .devDependencies | to_entries[] | "\(.key)@\(.value)"' package.json 2>/dev/null # PHP jq -r '.require, ."require-dev" | to_entries[] | "\(.key)@\(.value)"' composer.json 2>/dev/null
4. Error log scan
grep -rEn 'ERROR|FATAL|Exception|panic:|stack trace' \ --include="*.log" logs/ 2>/dev/null \ | tail -30
5. Lines of code by extension
find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.py" -o -name "*.php" \) \
-not -path "*/node_modules/*" -not -path "*/vendor/*" -not -path "*/.git/*" \
-exec wc -l {} + \
| awk '{ext=$2; sub(/.*\./,"",ext); sum[ext]+=$1} END {for (e in sum) print sum[e], e}' \
| sort -rnAnti-Pattern
**Do NOT** Read 10 files sequentially to count their lines, list their exports, or check their size. That is ~6KB context per file = ~60KB wasted for a result that fits in 1KB.
WRONG: Read(f1.ts) → Read(f2.ts) → ... → Read(f10.ts) → manual tally RIGHT: Bash(find ... | xargs wc -l | awk ...) → 1 compact table
Before / After
**Task:** "Find files > 100 lines in `src/`."
- Before: 10 × Read full file → ~60KB tokens consumed, then mental wc.
- After: 1 × `find src -name '*.ts' | xargs wc -l | awk '$1>100'` → ~1KB result.
**~60× reduction. Use the script.**
A plugin ecosystem that turns Claude Code into a supervised, multi-agent development environment.
Repo: fusengine/agents
Other skills on fusengine-agents.
- /agent-creator
Use when creating expert agents. Generates agent.md with frontmatter, hooks, required sections, and skill references.
Open skill - /apex-methodology
Use when starting ANY development task -- feature, bug fix, refactor, hotfix (triggers: implement, create, build, fix, add feature, refactor, develop).
Open skill - /brainstorming
Use when creating a feature/component or adding functionality. Fires BEFORE APEX Analyze to refine requirements via structured questioning.
Open skill - /challenge
Use before a root-cause, done/verified claim, irreversible action, or 2nd-time fix reaches the owner (APEX or plain conversation); also fires at every eLicit/Verify gate. Not for code correctness (use sniper).
Open skill - /code-quality
Use when validating code quality after modifications -- SOLID compliance, DRY duplication, linter errors, architecture violations. Do NOT use for functional verification (run verification FIRST, then code-quality).
Open skill - /elicitation
Use when an expert agent self-reviews and self-corrects code after the Execute phase, before sniper validation (BMAD-METHOD elicitation techniques).
Open skill

