`doStuff()`, `handleIt()`, and `process()` hide intent. They force callers and maintainers to inspect the implementation to learn what the function does, and `process()` is especially risky because it can become an overloaded catch-all. Rename functions using a specific verb plus the domain object or outcome. | Current name | Better shape | Example | | --- | --- | --- | | `doStuff()` | domain verb + object | `createInvoice()` | | `handleIt()` | event/action + subject | `handleCheckoutSubmissi...
Scanned 9/5/2026
Install to Claude Code
npx -y skills add HoangNguyen0403/agent-skills-standard --skill common-best-practices --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Common Best Practices?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-common-best-practices-66b2f143)More formats (shields.io, HTML) on the badges page.
# Review of the naming conventions
`doStuff()`, `handleIt()`, and `process()` hide intent. They force callers and maintainers to inspect the implementation to learn what the function does, and `process()` is especially risky because it can become an overloaded catch-all. Rename functions using a specific verb plus the domain object or outcome.
| Current name | Better shape | Example |
| --- | --- | --- |
| `doStuff()` | domain verb + object | `createInvoice()` |
| `handleIt()` | event/action + subject | `handleCheckoutSubmission()` |
| `process()` | exact operation + subject | `processRefundRequest()` or `calculateOrderTotal()` |
The exact replacement depends on the function's behavior. Do not rename `process()` to another vague synonym such as `doWork()`; name the observable result. A function that validates should be `validatePaymentDetails`, one that persists should be `saveCustomer`, and one that sends a message should be `publishOrderCreatedEvent`. If a function has to be described with “and,” it probably has multiple responsibilities and should be split under the Single Responsibility Principle.
Use consistent naming patterns:
```ts
async function submitCheckoutOrder(order: CheckoutOrder): Promise<OrderReceipt> {}
function calculateOrderTotal(order: CheckoutOrder): Money {}
function isEligibleForRefund(order: Order): boolean {}
function handlePaymentAuthorized(event: PaymentAuthorizedEvent): Promise<void> {}
```
Use `is`, `has`, `can`, or `should` for boolean-returning predicates. Use command verbs such as `create`, `update`, `delete`, `fetch`, `calculate`, `validate`, `publish`, and `parse` when they accurately describe the side effect or result. Avoid unexplained abbreviations, generic nouns like `data` and `item`, and names that conceal side effects such as `getUser()` when the function also mutates state.
Review each rename at its call sites and check whether the function is truly doing one thing. Keep names aligned with the project's casing conventions, and prefer a clear name over a short one. After renaming, run type-checking, tests, and linting so stale references and inconsistent terminology are caught.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!