Lean context: edit a file without resending it
#ClaudeRemix this prompt
Prompt
Before changing anything, read {file} and reply with: (1) a 5-bullet summary of what it does, (2) the functions you will touch, (3) the smallest diff that achieves: {goal}. Do not paste the whole file back. Only show changed lines with 3 lines of context.Sample output
Example run: file = src/lib/format.ts, goal = add a pluralizing count label helper
1. Summary
- Small display formatters shared across the UI.
- timeAgo(iso): relative time ("5m", "3h", "2d"), locale date after 7 days.
- compactNumber(n): 999 → "999", 1200 → "1.2k", 1.5M → "1.5M".
- initial(name): first character uppercased, "?" when empty.
- formatDate(iso): "Oct 20, 2026", formatted in UTC.
2. Functions touched: none changed; one new export added after formatDate.
3. Diff
timeZone: 'UTC',
});
}
+
+/** "1 use" / "1.2k uses". */
+export function countLabel(n: number, singular: string, plural = `${singular}s`): string {
+ return `${compactNumber(n)} ${n === 1 ? singular : plural}`;
+}
