git commit

built-in
69.0% Savings
24 Commands
1.6K Tokens saved
2 Tests

Install

tokf install 0679e698b6934ec29f50595d10b68813f9bba85b517446954f11a4a6d6f77c39
Safety checks passed

Filter definition

# git-commit.toml — Minimal filter
# Raw: "[main abc1234] commit message\n 1 file changed, 10 insertions(+), 2 deletions(-)"
# Filtered: "ok ✓ abc1234"

command = "git commit"
inject_path = true

[on_success]
extract = { pattern = '^\[(\S+)\s+(\w+)\]', output = "ok ✓ {2}" }

[on_failure]
tail = 80

Examples

failed commit shows tail output ~24 tokens → ~24 tokens
Raw output
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
Filtered output
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
successful commit extracts short hash ~19 tokens → ~3 tokens (84% saved)
Raw output
[main abc1234] Add feature X
 1 file changed, 10 insertions(+), 2 deletions(-)
Filtered output
ok ✓ abc1234
Warning: Community filters are third-party code. Review the filter definition above before installing it in production environments.
Browse all filters