Analyze a diff and produce a conventional commit message with subject and body.

Prompt

Analyze the following git diff and write a commit message.

Follow Conventional Commits format:
<type>(<scope>): <description>

[optional body]

Types: feat, fix, docs, style, refactor, perf, test, chore

Rules:
- Subject line max 50 characters
- Use imperative mood ("add" not "added")
- No period at end of subject
- Body explains what and why (not how)

Diff:
[PASTE GIT DIFF HERE]

Example

Input diff:

--- a/src/auth/login.ts
+++ b/src/auth/login.ts
@@ -15,6 +15,12 @@ export async function login(email: string, password: string) {
+  // Rate limiting check
+  const attempts = await getLoginAttempts(email);
+  if (attempts > 5) {
+    throw new RateLimitError('Too many login attempts');
+  }
+
   const user = await findUserByEmail(email);

Output:

feat(auth): add rate limiting to login endpoint

Prevent brute force attacks by limiting login attempts to 5 per email.
Throws RateLimitError when limit exceeded.