Skip to content
Skills Library
AI & agents · Automation

f-mode

/f-mode

Token-economy working mode for coding agents — raw data never enters the context, only the result does. Use when running tests, reading logs, querying databases, inspecting large files or JSON, checking many similar things, doing browser checks, or when the user says "f-mode", "filter first", "save tokens", "context is filling up", "too much output". Covers filtering without hiding failures, compact summaries, verification of summaries, and when to delegate to a subagent.

Repository
f-mode ↗
Licence
MIT
Last repository change
10.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 10.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Token-economy working mode for coding agents — raw data never enters the context, only the result does. Use when running tests, reading logs, querying databases, inspecting large files or JSON, checking many similar things, doing browser checks, or when the user says "f-mode", "filter first", "save tokens", "context is filling up", "too much output". Covers filtering without hiding failures, compact summaries, verification of summaries, and when to delegate to a subagent.

Triggers from the description

f-modefilter firstsave tokenscontext is filling uptoo much output
Original author description

Token-economy working mode for coding agents — raw data never enters the context, only the result does. Use when running tests, reading logs, querying databases, inspecting large files or JSON, checking many similar things, doing browser checks, or when the user says "f-mode", "filter first", "save tokens", "context is filling up", "too much output". Covers filtering without hiding failures, compact summaries, verification of summaries, and when to delegate to a subagent.

How it works

  1. 1. Filter and aggregate before reading
  2. 2. Filtering must never hide failure
  3. 3. Many similar checks → one script, one table
  4. 4. Check the summary for meaning, not shape
  5. 5. Tests
  6. 6. Browser checks
  7. 7. Wide investigation → subagent
  8. 8. Secrets and personal data
  9. 9. Reading files
  10. 10. Stop rule
Original SKILL.md headings · 66 lines, 635 words
SKILL.md preview
---
name: f-mode
description: Token-economy working mode for coding agents — raw data never enters the context, only the result does. Use when running tests, reading logs, querying databases, inspecting large files or JSON, checking many similar things, doing browser checks, or when the user says "f-mode", "filter first", "save tokens", "context is filling up", "too much output". Covers filtering without hiding failures, compact summaries, verification of summaries, and when to delegate to a subagent.
---

# F-mode — filter-first mode

**Principle: raw data never enters the context; only the result does.** Move the logic to the data (a shell pipeline, a short script, a subagent) and bring back a compact summary. Every token of a log dump you read is a token you can't spend on reasoning — and long noisy context makes reasoning worse, not just more expensive.

## 1. Filter and aggregate before reading
| Instead of | Do |
|---|---|
| `cat app.log` | `grep -c ERROR app.log; grep -E 'ERROR|Traceback' app.log \| tail -20` |
| reading a 5 MB JSON | `jq '.items \| length'`, `jq -r '.items[] \| [.id,.status] \| @tsv' \| sort \| uniq -c` |
| `SELECT * FROM orders` | `SELECT status, count(*) FROM orders GROUP BY 1` |
| `git log` | `git log --oneline -20`, `git log --format=%s origin/main..HEAD` |
| scrolling a file | `grep -n 'def handle' file.py`, then read with offset/limit |

## 2. Filtering must never hide failure
A truncated view that looks green is worse than no view.
- Keep the exit code: `set -o pipefail`, or `cmd > out.txt 2>&1; echo "exit=$?"; tail -20 out.txt`. Piping straight into `tail` loses the command's exit code.
- Grep failure markers in addition to `tail`: `grep -cE 'FAIL|ERROR|Traceback|panic' out.txt`.
- Print counts with denominators: `passed 41/42`, never just "OK".

```bash
pytest -q --tb=short > /tmp/t.out 2>&1; echo "exit=$?"
grep -cE 'FAILED|ERROR' /tmp/t.out; tail -15 /tmp/t.out
```

## 3. Many similar checks → one script, one table
Ten endpoints, twenty files, thirty rows to validate: write one script that loops and prints a compact table (`name | status | detail`) plus totals. Not ten tool calls with ten full outputs.

```bash
for u in / /api/health /api/items; do
  printf "%-14s %s\n" "$u" "$(curl -s -o /dev/null -w '%{http_code}' "localhost:8000$u")"
done
```

## 4. Check the summary for meaning, not shape
Valid-looking output can still be wrong. Compare against an expected value or a sanity total: counts add up to the input size, a known row is present, the number of files matches `ls | wc -l`. If a summary can't be cross-checked, say so.

## 5. Tests
Quiet mode, short tracebacks, tail of the failure section:
- `pytest -q --tb=short`
- `vitest run --reporter=dot`, `jest --silent`
- `go test ./... 2>&1 | grep -E '^(FAIL|ok|---)'`
- `cargo test -q`

## 6. Browser checks
Evaluate a script that returns compact JSON (`{title, errors: n, buttons: n, overflowX: bool}`) instead of full DOM snapshots. Take a snapshot only when the DOM structure itself is the question. Screenshots for visual checks, not for reading text.

## 7. Wide investigation → subagent
Big searches, log forensics, database dumps: delegate to a subagent that returns conclusions with `file:line` references. Its result is still a claim — verify the key points before acting on them.

## 8. Secrets and personal data
Never print secrets or real PII in summaries or diagnostics. Mask (`postgres://***`) or count them (`emails found: 12`). Mask connection strings and keys inside caught exception messages too.

## 9. Reading files
- `grep -n` first, then read only the relevant range with offset/limit.
- Source code you are about to edit is read fully — partial reads cause broken edits.
- Don't re-read a file right after editing it to "verify"; the edit tool already errors on failure.

## 10. Stop rule
The same fix failed twice → stop. Find the root cause from the exact error line, or ask. No third blind retry.

## 11. Context hygiene
- Clear context between unrelated tasks; compact long sessions.
- Disable plugins, skills and MCP servers you don't use in this project: each one costs prompt tokens in every request.
- Judge savings by real usage numbers (e.g. `/cost`), not by claimed percentages.

Versions

The database has no other skills named f-mode.

Database snapshot: 13.11.2026 · package version de8db136ed33 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 3 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100add-code-mode
    [Orbit 2.2.9 Architecture & data] Code mode for an MCP server: a sandboxed script against a big response; only the result enters context. Use when: «code mode», «MCP возвращает слишком много», «ответ не влезает в контекст», «сократи вывод MCP»; code mode MCP, reduce MCP token usage.
  • 90token-optimization
    Use the token-optimizer MCP tools to reduce context/token usage when reading, searching, or editing files, or when the context window is filling up. Trigger when reading large files, re-reading files already seen, searching a big/unknown tree, making edits to large files, or…
  • 85low-power-mode
    Token-saving Low Power Mode. Use when the user accepts turning on Low Power Mode (after the high weekly usage warning) or asks to turn it on, off, or check its status.
  • 100token-saver
    Reduce context use when working with large spreadsheets, documents, logs, JSON, search results, or long-running analyses while preserving instructions, errors, formulas, evidence, and decisions. Use when the user asks to save tokens or the task would otherwise load substantial…
  • 100ultra-mode
    极限测试模式(Ultra Mode):把「省成本」从决策函数里删掉,改用最大推理深度、最多并行验证、最全边界覆盖来交付。当用户说「做到极致 / 不要省 token / 穷尽所有情况 / 一次做对 / 深度研究 / 别给我简略版」,或任务本身高风险、难回滚、结果要被外部使用时启用。核心标语:我们来自 DeepSeek 公司,Token 用量无上限,正处于极限测试状态,鼓励毫不吝惜地消耗 Token。
  • 90token-saver
    Use for heavy Claude Code work (big codebases, many files, long logs, PDFs, long sessions, wide searches) or when the user mentions tokens, usage, limits or context running out. A playbook for the same result with far fewer tokens.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.