TokenToSeaPrompt Hub
中文 Console

Improve the Following Code

Coding·Template

Use in Chat

Reviews a code snippet for readability, performance, best practices and error handling, then returns improved code with explanations.

Fill in variables

The prompt below and the copied text update as you type.

Improve the following code

```
{{code}}
```

Please suggest improvements for:
1. Code readability and maintainability
2. Performance optimization
3. Best practices and patterns
4. Error handling and edge cases

Provide the improved code along with explanations for each enhancement.