git-agent for JavaScriptLLM-powered conventional commits for JavaScript projects
From Express APIs to vanilla browser scripts, git-agent reads your JavaScript diffs and produces conventional commit messages that accurately capture what changed and why.
diff example
diff --git a/src/middleware/rateLimit.js b/src/middleware/rateLimit.js
index 7f3c1a9..2d8e4b1 100644
--- a/src/middleware/rateLimit.js
+++ b/src/middleware/rateLimit.js
@@ -1,10 +1,20 @@
const rateLimit = require("express-rate-limit");
+const RedisStore = require("rate-limit-redis");
+const { redisClient } = require("../lib/redis");
module.exports = rateLimit({
windowMs: 15 * 60 * 1000,
max: 100,
- standardHeaders: true,
- legacyHeaders: false,
+ standardHeaders: "draft-7",
+ legacyHeaders: false,
+ store: new RedisStore({
+ sendCommand: (...args) => redisClient.sendCommand(args),
+ }),
+ handler: (req, res) => {
+ res.status(429).json({
+ error: "too_many_requests",
+ retryAfter: res.getHeader("Retry-After"),
+ });
+ },
});git-agent output
feat(middleware): back rate limiter with Redis and structured 429 response
- replace in-memory store with RedisStore for multi-instance consistency
- upgrade standardHeaders to draft-7 format
- return machine-readable JSON body with retryAfter field on 429
In-memory rate limiting was reset on every dyno restart and did not
share state across instances; Redis store ensures limits are enforced
cluster-wide.Why it works for JavaScript
- Works with CommonJS (require) and ESM (import) projects equally well
- Understands Express, Fastify, and Koa middleware patterns
- Detects package.json changes and separates dependency bumps into chore commits
- Handles bundler configs (webpack, rollup, esbuild) as distinct chore commits
install
brew install gitagenthq/tap/git-agent
# inside your JS repo
git-agent init # scans package.json workspaces for scope suggestionsFAQ
Does git-agent work with npm, yarn, and pnpm projects?Yes. git-agent is package-manager agnostic. It reads diffs regardless of which lockfile format you use.
How does git-agent handle minified or generated JavaScript files?Add generated files to
.gitignore when they should never be versioned. Otherwise the autonomous git-agent --intent "..." flow discovers the working tree and commits the intended changes itself.Can git-agent split a large JavaScript refactor into multiple commits?Yes. Atomic commit splitting is git-agent's core differentiator. It plans commit groups from the diff before writing any commit, then stages and commits each group independently.