{"id":50549923,"url":"https://github.com/siri1410/tersely","last_synced_at":"2026-06-04T02:30:35.421Z","repository":{"id":354886486,"uuid":"1225821820","full_name":"siri1410/tersely","owner":"siri1410","description":"Terse output mode for Claude Code. Profile-aware, cost-tracked, security-paused. Includes hooks, MCP server, and reusable workflows.","archived":false,"fork":false,"pushed_at":"2026-04-30T17:18:22.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-30T19:12:28.055Z","etag":null,"topics":["ai-tools","anthropic","claude","claude-code","cost-optimization","mcp","plugin","productivity","tokens"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/siri1410.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-30T17:16:19.000Z","updated_at":"2026-04-30T17:19:03.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/siri1410/tersely","commit_stats":null,"previous_names":["siri1410/tersely"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/siri1410/tersely","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siri1410%2Ftersely","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siri1410%2Ftersely/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siri1410%2Ftersely/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siri1410%2Ftersely/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siri1410","download_url":"https://codeload.github.com/siri1410/tersely/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siri1410%2Ftersely/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33887124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-tools","anthropic","claude","claude-code","cost-optimization","mcp","plugin","productivity","tokens"],"created_at":"2026-06-04T02:30:35.239Z","updated_at":"2026-06-04T02:30:35.414Z","avatar_url":"https://github.com/siri1410.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tersely\n\n\u003e Terse output mode for Claude Code. Profile-aware, cost-tracked, security-paused. Cuts assistant output tokens without dropping technical substance.\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Claude Code](https://img.shields.io/badge/Claude_Code-plugin-blue)](https://docs.claude.com/en/docs/claude-code)\n[![No network](https://img.shields.io/badge/network-zero-green)](./SECURITY.md)\n[![Node](https://img.shields.io/badge/node-%3E%3D20-brightgreen)](#install)\n\nTersely is a Claude Code plugin that makes Claude's responses shorter without making them dumber. It ships rules — not magic — that drop filler/hedging/preambles while keeping every identifier, error string, and code block exact.\n\nWhat sets it apart from other \"talk less\" prompts:\n\n- **Profiles, not just intensity.** Different rules for general work, commit authoring, code review, and debugging — switch with one command.\n- **Auto-pause on risky turns.** Security warnings, destructive ops, and \"explain in detail\" requests automatically revert to full sentences for that turn only.\n- **Real cost tracking.** Each turn appends tokens + USD to a local JSONL log. `/tersely-stats` shows what you've actually spent.\n- **MCP server included.** Five tools (`compress`, `count_tokens`, `estimate_cost`, `stats`, `set_profile`) so any MCP-aware client can use the same primitives.\n- **Reusable subagent.** A `summarizer` agent for token-efficient file reads from inside larger workflows.\n- **Auditable.** No network calls, no build step, \u003c 1000 lines of code total. `grep -r fetch hooks/ mcp/` returns nothing.\n\n---\n\n## Install\n\n### As a Claude Code plugin (recommended)\n\n```bash\nclaude plugin marketplace add siri1410/tersely\nclaude plugin install tersely@tersely\n```\n\nTo pin a specific reviewed commit (recommended, see [SECURITY.md](./SECURITY.md)):\n\n```bash\ncd ~/.claude/plugins/tersely\ngit checkout \u003cSHA\u003e\n```\n\n### Manual\n\n```bash\ngit clone https://github.com/siri1410/tersely ~/.claude/plugins/tersely\ncd ~/.claude/plugins/tersely/mcp \u0026\u0026 npm install\n```\n\nThen add to `~/.claude/settings.json`:\n\n```json\n{\n  \"hooks\": {\n    \"SessionStart\":      [{ \"hooks\": [{ \"type\": \"command\", \"command\": \"node ~/.claude/plugins/tersely/hooks/session-start.js\" }] }],\n    \"UserPromptSubmit\":  [{ \"hooks\": [{ \"type\": \"command\", \"command\": \"node ~/.claude/plugins/tersely/hooks/user-prompt-submit.js\" }] }],\n    \"Stop\":              [{ \"hooks\": [{ \"type\": \"command\", \"command\": \"node ~/.claude/plugins/tersely/hooks/stop.js\" }] }]\n  },\n  \"statusLine\": {\n    \"type\": \"command\",\n    \"command\": \"bash ~/.claude/plugins/tersely/hooks/statusline.sh\"\n  }\n}\n```\n\n---\n\n## Profiles\n\n| Profile | When to use | What it does |\n|---------|-------------|--------------|\n| `default` | General work | Drops filler/pleasantries/hedging/preambles. Keeps identifiers, code, errors verbatim. |\n| `commit` | Writing commits / PR titles | Conventional-commits format. Body only when WHY is non-obvious. |\n| `review` | Reviewing diffs / PRs | `[severity] file:line — finding. Suggested change.` No preamble. Verdict required. |\n| `debug` | Diagnosing bugs | Keeps stack traces, timing numbers, env diffs. Drops social language only. |\n| `off` | Disable | Plugin emits nothing; full Claude Code defaults. |\n\nSwitch with `/tersely-profile \u003cname\u003e` or set `TERSELY_PROFILE=\u003cname\u003e` in your environment.\n\n---\n\n## Slash commands\n\n| Command | Purpose |\n|---------|---------|\n| `/tersely` | Show active profile + summary |\n| `/tersely-profile \u003cname\u003e` | Switch to a different profile |\n| `/tersely-pause` | Pause for the next response only |\n| `/tersely-stats` | Show today / 7-day / all-time tokens + USD |\n\nAdd `--detail` to `/tersely-stats` for a breakdown of the most expensive turns.\n\n---\n\n## MCP server\n\nFive tools, all stateless and local:\n\n```jsonc\n// in your Claude Code MCP config\n{\n  \"mcpServers\": {\n    \"tersely\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/tersely/mcp/src/server.js\"]\n    }\n  }\n}\n```\n\n| Tool | Purpose |\n|------|---------|\n| `tersely_compress` | Apply terse rules to text. Preserves code blocks. Returns text + before/after token counts. |\n| `tersely_count_tokens` | Estimate tokens for a string (chars/4 heuristic, ~10% of Claude tokenizer for English). |\n| `tersely_estimate_cost` | USD cost for given input/output/cache token counts on a Claude model. |\n| `tersely_stats` | Read cumulative stats from the local JSONL log; optional `days` window. |\n| `tersely_set_profile` | Switch the active profile. |\n\nThe compression rules are deterministic and free — no LLM call, no network. Use them from any MCP client (Claude Code, Claude Desktop, custom agents).\n\n---\n\n## Auto-pause\n\nThe plugin reverts to full sentences for one turn when the user prompt matches:\n\n- **Security keywords**: `security review`, `auth flow`, `secret leak`, `production deploy`, `force-push`, `rm -rf`, `drop table`, `git reset --hard`\n- **Verbosity requests**: \"explain in detail\", \"walk me through\", \"be more thorough\", \"in full sentences\", \"verbose mode\"\n\nResumes terse mode automatically on the next prompt. The full match list is in [`hooks/lib/skip-rules.js`](./hooks/lib/skip-rules.js).\n\n---\n\n## Statusline\n\n```\ntersely:default · 1.2M tok · $3.40 today\n```\n\nThe bash statusline (or PowerShell on Windows) reads today's stats and shows live tokens + USD. Bash and PowerShell scripts ship in `hooks/`.\n\n---\n\n## Subagent: `summarizer`\n\nA reusable subagent for context-efficient file reads. Use when a file is too large to fit naturally in main context, or when only specific information is needed from a verbose source. Returns ≤500 tokens of structured summary, not the full content.\n\nDefined in [`agents/summarizer.md`](./agents/summarizer.md). Invoked via Claude Code's Agent tool.\n\n---\n\n## Cost math\n\nTersely measures real spend, not estimates. The Stop hook reads usage from the transcript and appends:\n\n```jsonl\n{\"ts\":\"2026-04-30T18:42:11.000Z\",\"profile\":\"default\",\"model\":\"claude-opus-4-7\",\"input_tokens\":12450,\"output_tokens\":312,\"cache_read_tokens\":98000,\"cost\":0.18234,\"paused\":false}\n```\n\n`/tersely-stats` aggregates this. Pricing is in [`pricing.json`](./pricing.json) — override per-model to match your actual contract.\n\n---\n\n## Why not just one prompt that says \"be terse\"?\n\nYou can do that. It works for a few turns, then drifts. Tersely persists across compaction (re-emitted on `SessionStart`), survives long sessions, and gives you per-task profiles instead of a single dial.\n\nIt also tracks the result. \"Be terse\" doesn't tell you whether it worked — `/tersely-stats` does.\n\n---\n\n## Security\n\nRead [SECURITY.md](./SECURITY.md). Two-line summary:\n\n- No network. No telemetry. \u003c 1000 LoC. All file writes scoped to `~/.claude/`.\n- For maximum safety, install pinned to a commit SHA you've reviewed.\n\n---\n\n## License\n\nMIT — see [LICENSE](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiri1410%2Ftersely","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiri1410%2Ftersely","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiri1410%2Ftersely/lists"}