Files
OpenOPC/skills/core/coding.md
T
2026-07-01 17:56:31 +08:00

1.3 KiB

name, description, domain, trigger, always_on
name description domain trigger always_on
coding Best practices for code development tasks
coding
frontend
backend
devops
When executing code-related tasks 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