git commit

built-in
98.4% Savings
11 Commands
6.8K Tokens saved
2 Tests

Install

tokf install 4f00b2271d09e5c26b58965f905055fac9235c2b49570f3a569723d99585fa2e
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"

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

[on_failure]
tail = 5

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