explaingit

broisnischal/phobos

Analysis updated 2026-05-18

30ShellAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A set of hooks and skills for Claude Code that block wasteful file reads and commands, and give you a running cost and context summary, so you spend fewer tokens per session.

Mindmap

mindmap
  root((phobos))
    What it does
      Blocks wasteful reads
      Blocks flood commands
      Tracks token cost
    Tech stack
      Shell
      Claude Code hooks
      Claude Code skills
    Use cases
      Guard against big file reads
      See live token usage
      Resume sessions faster
    Audience
      Claude Code developers
      Cost conscious teams
    Install
      Script install
      Plugin marketplace

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Stop Claude Code from reading dependency folders, lock files, or huge minified files

USE CASE 2

Block runaway or repeated shell commands before they burn through your context

USE CASE 3

Show a live status line with token cost and context usage during a coding session

USE CASE 4

Speed up resuming a session by loading a short state summary instead of full history

What is it built with?

ShellClaude Codejqbash

How does it compare?

broisnischal/phobosfree-nodes/shadowrocketganimjeong/harness-for-claude
Stars303030
LanguageShellShellShell
Setup difficultyeasyeasyeasy
Complexity2/51/52/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

Phobos is a set of add-ons for Claude Code, the AI coding assistant, designed to stop it from wasting tokens, which are the units you pay for and that limit how much an AI model can read and remember in one session. It works through two mechanisms: skills that gently guide the AI's behavior, and hooks that firmly enforce rules before an action happens. None of it calls an AI model itself, so it adds no extra cost or delay on its own. The main feature is a read guard that blocks Claude Code from opening files that are usually useless to read directly, such as dependency folders, build output, lock files, minified JavaScript, and other binary files. It also caps how much of any single file gets read, both by file size and by number of lines, so one giant file cannot flood the conversation. A companion command guard applies similar limits to shell commands and searches, blocking things like an unbounded recursive search with no limit set, a flood-prone command such as listing every file recursively, or re-running the exact same command that already failed without changing anything. Beyond the guards, phobos keeps a small running summary of what changed in the project and writes it to a file, so a new session, or one that just cleared its memory, can quickly get its bearings from a short snapshot instead of re-reading the whole conversation history. It also logs recent activity and can show a status line with real time cost and context usage, plus scripts to measure actual token usage and estimate how much the tool has saved. Everything is configurable through environment variables and can be turned off per session or uninstalled entirely, and installation works either as a plain script or as an official Claude Code plugin. The project is written mostly in Shell script and is aimed at developers who use Claude Code regularly and want to control their token spending, rather than at end users of an app. It is licensed under MIT, based on the license badge shown in the README.

Copy-paste prompts

Prompt 1
Help me install phobos into my Claude Code setup using its install.sh script.
Prompt 2
Show me how to install phobos as a Claude Code plugin marketplace instead of the shell script.
Prompt 3
Explain what phobos's read guard and command guard each block by default.
Prompt 4
Help me customize phobos's routing.md file to route tasks to my team's own tools.

Frequently asked questions

What is phobos?

A set of hooks and skills for Claude Code that block wasteful file reads and commands, and give you a running cost and context summary, so you spend fewer tokens per session.

What language is phobos written in?

Mainly Shell. The stack also includes Shell, Claude Code, jq.

What license does phobos use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is phobos to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is phobos for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.