Explain.md
❯ Explain what this Python code does, step by step, for someone who knows the basics. Then point out any bugs or risky parts.
[paste your code]
# Step 1: reads the CSV into a list of rows
# Step 2: groups rows by customer_id
# Risk: no check for empty files
Explain.md
❯ Explain this error message in plain words, list the 3 most likely causes, and tell me what to check first.
[paste the error]
CORS error: the browser blocked a request to another domain.
Check first: the API’s Access-Control-Allow-Origin header.
Debug.md
❯ I get this error: [paste the error message]. Here is the relevant code. Find the root cause, explain it and give me the fixed code.
[paste your code]
Root cause: `user` is undefined before the fetch resolves.
Fix: return early until data loads.
if (!user) return null;
Debug.md
❯ Review this Node.js code like a senior engineer. List bugs, security issues and readability problems, most serious first, with a fix for each.
[paste your code]
1. SQL injection: user input in query string → use parameters
2. Unhandled promise rejection in /login
3. Magic number 86400 → name it
Review my code for issuesPopular
Build & test.md
❯ Write unit tests in Jest for the function below. Cover normal cases, edge cases and invalid input.
[paste your function]
test('returns 0 for empty cart', () => {
expect(total([])).toBe(0);
});Build & test.md
❯ Write a regular expression that matches Vietnamese phone numbers but not landline numbers. Explain each part of the pattern.
^(0|\+84)(3|5|7|8|9)\d{8}$
# 0 or +84, a mobile prefix, then 8 digitsBuild & test.md
❯ Refactor this JavaScript code for readability without changing what it does. Explain each change in one line.
[paste your code]
- Renamed `d` → `daysUntilDue`
- Extracted `isOverdue()` helper
- Replaced nested ifs with early returns
Build & test.md
❯ Write a Python function that splits a full name into first and last name. Include input validation, a short docstring and 3 example calls.
def split_name(full: str) -> tuple[str, str]:
"""Split “Nguyen Van An” into first and last name."""Write a function from a description
Data.md
❯ Write a PostgreSQL query that finds the top 10 customers by revenue last month. Tables: [describe your tables]. Explain the query step by step.
SELECT customer_id, SUM(amount) AS revenue
FROM orders
WHERE created_at >= date_trunc('month', now()) - interval '1 month'
GROUP BY 1 ORDER BY 2 DESC LIMIT 10;Data.md
❯ Here are sample rows from my spreadsheet. Suggest the steps to clean them (formats, duplicates, missing values) and write the Google Sheets formulas or code to do it.
[paste 10 sample rows]
=TRIM(PROPER(A2))
=DATEVALUE(SUBSTITUTE(B2,".","/"))
Remove duplicates on column C (email)
Clean messy spreadsheet data