Files
2026-07-01 17:56:31 +08:00

40 lines
1.3 KiB
Markdown

---
name: coding
description: "Best practices for code development tasks"
domain:
- coding
- frontend
- backend
- devops
trigger: "When executing code-related tasks"
always_on: false
---
# Coding Skill
## Workflow
1. **Understand** — Read existing code and understand the codebase structure before making changes
2. **Plan** — Break down the implementation into clear steps
3. **Implement** — Write clean, well-structured code following project conventions
4. **Verify** — Run tests, check for errors, and validate the implementation
5. **Document** — Add necessary comments for non-obvious logic only
## Best Practices
- Always read files before editing them
- Use `list_dir` to understand project structure
- Use `file_search` to find relevant code
- Prefer editing existing files over creating new ones
- Follow existing code style and conventions
- Include error handling in all code
- Write tests when appropriate
- Use version control (git) for all changes
- Keep functions small and focused
- Use meaningful variable and function names
## Code Quality
- No unnecessary comments that just restate the code
- Proper error handling and edge cases
- Consistent formatting with the rest of the codebase
- No hardcoded secrets or credentials
- Follow language-specific best practices