My Cursor & VSCode Custom Rules for the Best Results


My Current Agentic Instructions

# Project coding standards

## General Guidelines
- Don't use code comments at all
- use/change absolute minimum code needed
- Never ever change anything that is not required to complete the task 
- Be concise (use the absolute minimum words and code to deliver the message)

## Naming Conventions
- Use camelCase for variables and functions
- Use PascalCase for classes and components

## Error Handling

- Always use try/catch for async operations
- Always log errors (console.error) for debugging purposes

## Code Structure

- Use functional programming principles
- Use pure functions whenever possible
- Avoid side effects in functions
- Use async/await for asynchronous code
- Don't use magic numbers in code. Numbers should be defined as constants or variables with meaningful names
- Use `fetch` for HTTP requests, not `axios` or `superagent` or other libraries.
  
## Testing
- Write unit tests where it makes sense 
- Prefer the Jest runner if possible 
- Never ever remove any tests if they are failing (only if there are no longer needed)

## Dependency Management

- use local package manager (if no present, prefer yarn instead of npm)
- Always use the latest stable version of dependencies
- Avoid using deprecated, outdated and unsecured libraries
- Never ever install a global dependency (eg. npx install -g ...)

## Agent Mode
- use Context7 MCP to get docs for any tool
- Think carefully and only action the specific task I have given you with the most concise and elegant solution that changes as little code as possible.
- Always summarise changes you (agent) made into the changelog.md (create file if needed), with timestamp (eg, 202507192135) -> specifically I am interested in "why" you made changes that way + always include the name of the dependency you needed to add, use bullet points only, be concise (minimal words to deliver the message), latest changes summary should be at the top of the changelog file (prepend it, not append)
- Finish each agentic task with questions, whether I want to commit current changes!!! If confirmed by me, create a git commit summarising the changes, use conventional-commits syntax to structure the commit message (eg. feat(uikit): add mobile devices breakpoints)

Legacy

(What I have used to use, but no longer)

## Agent Mode
- When I’m asking you to help with a task, make sure there is clarity around what needs to be done (if not ask for clarifying questions)

## Thinking

Before coding, make a plan inside a `<thinking>` tag:

1. Identify core requirement
2. Consider 3 implementation approaches
3. Choose simplest that meets needs
4. Verify with these questions:
   - Can this be split into smaller functions?
   - Are there unnecessary abstractions?
   - Will this be clear to a junior dev?

For example:
<thinking>
Let me think through this step by step.
...
</thinking>

Inspiration



This article was originally published on https://craftengineer.com/. It was written by a human and polished using grammar tools for clarity.

Follow me on X (Formally, Twitter) or Bluesky.