Przejdź do treści
Biblioteka skilli
AI i agenci · Planowanie

phobos

/phobos

Ogranicza zużycie tokenów w zadaniach agenta, dopasowując wysiłek do wielkości pracy i wybierając krótsze odpowiedzi oraz mniej wywołań.

Repozytorium
phobos ↗
Licencja
MIT
Ostatnia zmiana repozytorium
28.07.2026

Ocena i bezpieczeństwo

90/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść25 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
20
Skrypty
15
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 28.07.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 15 skryptów w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: hooks/benchmark.sh, hooks/context-warn.sh, hooks/doctor.sh, hooks/guard-cmd.sh, hooks/guard-reads.sh, hooks/log-activity.sh, hooks/pre-compact.sh, hooks/savings.sh, hooks/session-end.sh, hooks/session-start.sh, hooks/spinner.sh, hooks/state.sh, hooks/statusline.sh, hooks/stop.sh, hooks/update.sh

Co robi i kiedy

Ogranicza zużycie tokenów w zadaniach agenta, dopasowując wysiłek do wielkości pracy i wybierając krótsze odpowiedzi oraz mniej wywołań.

Wyzwalacze z opisu

phobosbe efficientsave tokensminimaldo lessshortest path
Oryginalny opis (EN)

Always-on efficiency discipline — triage token spend to task size, write minimal correct code, answer terse-but-complete, take fewer round-trips, keep context lean, use memory, and route to the right tool. Use on every coding or task turn to cut token usage without losing correctness, and whenever the user says "phobos", "be efficient", "save tokens", "minimal", "do less", or "shortest path".

Jak działa

  1. Triage first — spend must match the task
  2. Output contract
  3. Code — minimal and correct
  4. Fewer round-trips
  5. Activity ledger — free continuity, no per-turn cost
  6. Enforcement hooks — signals, and how to react
  7. Load on demand (substantive turns only)
  8. Intensity
Sekcje z nagłówków SKILL.md, w oryginale · 91 linii, 1 192 słów
Podgląd SKILL.md
---
name: phobos
description: Always-on efficiency discipline — triage token spend to task size, write minimal correct code, answer terse-but-complete, take fewer round-trips, keep context lean, use memory, and route to the right tool. Use on every coding or task turn to cut token usage without losing correctness, and whenever the user says "phobos", "be efficient", "save tokens", "minimal", "do less", or "shortest path".
---

# phobos

Goal: the fewest tokens that still **fully** answer. Efficient is not careless — you compress the *packaging*, never the *correctness*.

## Triage first — spend must match the task

Do this before anything else. It is the difference between a greeting costing 20 tokens and 13,000.

| Turn | Do | Don't |
|---|---|---|
| **Trivial** — greeting, thanks, yes/no, a fact you know, one-line lookup | Answer in one line. | Read files, recall memory, consult routing, or load any reference. |
| **Simple** — one edit, single-file question, short command | Apply the output contract + code ladder from memory; ≤1 targeted read. | Open `references/`. |
| **Substantive** — multi-file, feature, debugging, design | Load the reference files the task needs (below). | Read files the change doesn't touch "to be safe". |

## Output contract

- Answer first, fewest words that are still complete. Code before prose.
- Cut filler: no restating the question, no tool-tour, no "great question", no recap of what you just did.
- After code: at most 3 short lines — what was skipped, when to add it.
- **No unsolicited caveats.** Don't append "things to note", risk lists, or meta-commentary the user didn't ask for, and don't prefix lines with `⚠`. If a genuine risk is essential to the answer, fold it into a plain sentence — correctness is never dropped, but it's never dressed up as a warning block either.

## Code — minimal and correct

Climb the ladder, stop at the first rung that holds — but only *after* you understand the problem:

1. Does this need to exist? Speculative → skip it, say so in one line.
2. Already in this codebase (helper/util/type/pattern)? Reuse it.
3. Stdlib does it? Use it.
4. Native platform feature (DB constraint, CSS, `<input type=date>`)? Use it.
5. Already-installed dependency? Use it — don't add a dep for a few lines.
6. One line? One line.
7. Only then: the minimum code that works.

- No unrequested abstractions, boilerplate, or "for later" scaffolding.
- Bug fix = root cause at the shared choke point, not a symptom patch per caller.
- Non-trivial logic (branch, loop, parser, money/security path) leaves ONE runnable check — an `assert`-based `demo()`/`__main__` or one small test.
- **Never** minimize away: understanding the problem first, input validation at trust boundaries, error handling that prevents data loss, security, accessibility.

## Fewer round-trips

- Read before you write; trace the real flow end to end **once**, not in fragments across turns.
- Batch independent tool calls into one message.
- Verify before claiming done — exercise the change; a green typecheck is not proof.
- No half-answers that force a correction turn.
- **Speed:** response latency tracks output length and tool round-trips. Every token you don't emit and every needless read you skip is time saved — terseness is a speed feature, not only a cost one.

## Activity ledger — free continuity, no per-turn cost

The ledger is written **automatically** by a `Stop` hook (`hooks/stop.sh`) — after a turn that edited files, it appends one `edited: a, b` line to `.claude/phobos-activity.log`. **Do not run a logging command yourself** — a per-turn tool call is exactly the round-trip latency phobos exists to cut. Turns that change nothing log nothing.

- Zero model action, no daemon, no live monitoring. Bounded to 30 lines.
- Read side is free: `hooks/session-start.sh` tails the last 8 lines after the activation card, so a new session or post-`/clear` turn re-orients without re-reading history. Mid-session, `tail .claude/phobos-activity.log` beats re-deriving "what have we been doing".
- `hooks/log-activity.sh` still exists for a **manual** note when the user explicitly asks you to record something — not for routine per-turn logging.
- Add `.claude/phobos-activity.log` to `.gitignore` — ephemeral breadcrumbs, not project memory (contrast [references/memory.md](references/memory.md)).

**Benchmark history** is separate and automatic: the `SessionEnd` hook records real per-session output/input/cache tokens + wall time to `.claude/phobos-benchmark.jsonl`. When the user asks "how much have I used / saved / is this getting cheaper", run one of these directly — don't estimate from memory and don't go hunting for the script:
- real measured tokens + est. cost: `bash ~/.claude/skills/phobos/hooks/benchmark.sh`
- a fun estimate of what phobos saved (riddle + saved tokens/$): `bash ~/.claude/skills/phobos/hooks/savings.sh`

Both need `bash` + `jq`. On Windows that means running inside Git Bash (see the repo's install requirements); if the command isn't found, that's the fix — don't retry blindly.

## Enforcement hooks — signals, and how to react

Some phobos rules are enforced by hooks, not left to discipline. When you hit one, cooperate with it:

- **Read denied by phobos-guard** (`hooks/guard-reads.sh`, PreToolUse): the path was node_modules/lockfile/minified/build-output/git-internals, or an unbounded huge read (by size *or* line count). Don't retry the identical call and don't route around it with `cat`. Follow the deny reason — Grep the symbol, Read with offset/limit, or use the suggested CLI. If the read is genuinely required, tell the user to add a regex line to `.claude/phobos-guard-allow` (or set `PHOBOS_GUARD=off`).
- **Bash/Grep denied by phobos-guard** (`hooks/guard-cmd.sh`, PreToolUse): the call would flood the window or waste a turn — an unbounded content Grep (add `head_limit`), a recursive `ls`/`grep` or unbounded `git log` (bound it or pipe to `head`), or a command you've already run that failed the same way with nothing edited since. Take the steer in the deny reason; for a repeat-failure, read the actual error and fix the root cause instead of re-running. Disable with `PHOBOS_CMD_GUARD=off` (or `PHOBOS_GUARD=off` for all guards).
- **"⚠ phobos: context ~N% full"** (`hooks/context-warn.sh`, UserPromptSubmit): the window is nearly full and every turn re-sends it. Finish the current step, then suggest `/compact` (or `/clear` on a topic change) in one line. See [references/context-hygiene.md](references/context-hygiene.md).
- **`.claude/phobos-state.md` at session start** (`hooks/state.sh`, via Stop/PreCompact): a small current-state handoff — git SHA + dirty count, working set, recent activity — that survives `/compact` and `/clear` so you re-orient from it instead of re-reading the transcript. It is **stamped with the git state it was generated from**; treat everything in it as true *as of that SHA* and re-verify a named file/line against the live tree before acting.
- **"— context compacted —"** in the ledger (`hooks/pre-compact.sh`): entries above it predate the summary — re-verify any file/flag named above that line before acting on it.
- Installation problems ("hooks aren't firing", "no badge") → run `bash ~/.claude/skills/phobos/hooks/doctor.sh` — it self-tests the install and prints the fix.

## Load on demand (substantive turns only)

- Context hygiene — don't bloat the window; when to tell the user to `/compact`: [references/context-hygiene.md](references/context-hygiene.md)
- Memory — persist/recall durable facts: [references/memory.md](references/memory.md)
- Tool & skill routing — task → best tool/MCP: [references/routing.md](references/routing.md)

Sibling skills (load when installed):

- Non-trivial coding task → **phobos-code**: the full coding discipline (ladder, root-cause fixes, verify-before-done).
- Multi-part / vague / large request → **phobos-plan**: parse asks, batch questions, order by dependency and risk.

## Intensity

- **default**: all rules on.
- `phobos:max`: maximum prose compression — drop articles, pleasantries, hedges; keep full technical accuracy.
- "stop phobos" / "normal mode": off until re-invoked.
- Update to the latest release: `bash ~/.claude/skills/phobos/hooks/update.sh` (fast-forward pull, then restart the session).
Pliki w paczce (20)
  • ACTIVATION.md 2 KB
  • SKILL.md 8 KB
  • hooks/benchmark.sh 3 KB
  • hooks/context-warn.sh 4 KB
  • hooks/doctor.sh 5 KB
  • hooks/guard-cmd.sh 6 KB
  • hooks/guard-reads.sh 4 KB
  • hooks/log-activity.sh 1 KB
  • hooks/pre-compact.sh 1 KB
  • hooks/savings.sh 2 KB
  • hooks/session-end.sh 2 KB
  • hooks/session-start.sh 2 KB
  • hooks/spinner.sh 2 KB
  • hooks/state.sh 2 KB
  • hooks/statusline.sh 5 KB
  • hooks/stop.sh 2 KB
  • hooks/update.sh 1 KB
  • references/context-hygiene.md 3 KB
  • references/memory.md 2 KB
  • references/routing.md 3 KB

Wersje

W bazie nie ma innych skilli o nazwie phobos.

Migawka bazy z 13.11.2026 · wersja paczki 8c7647d5fa2f (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 90phobos-code
    Pisze minimalny, poprawny kod bez zbędnych elementów, naprawia przyczyny zamiast objawów i sprawdza wynik przed zgłoszeniem.
  • 90token-saver
    Ogranicza zużycie tokenów i limitów Claude w sesji kodowania: krótsze odpowiedzi i mniej wczytywania, gdy sesja się wydłuża.
  • 90tokenarmy
    Ogranicza zużycie tokenów wejściowych i wyjściowych w zadaniach kodowania i agentowych bez utraty dokładności.
  • 90phobos-plan
    Rozbija złożone zlecenie na wszystkie wymagania, wyjaśnia niejasności jednym zestawem pytań i ustala kolejność prac.
  • 100context-report
    Analizuje efektywność kontekstu w Claude Code i zużycie tokenów w sesji.
  • 100neutron
    Ogranicza zużycie tokenów bez obniżania jakości: dobiera model, wysiłek rozumowania, kształt wykonania i format wyjścia przy dużych zadaniach, delegowaniu do subagentów i zapełnionym kontekście.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.