code-conventions
npx machina-cli add skill aiskillstore/marketplace/code-conventions --openclawFiles (1)
SKILL.md
468 B
Code Conventions Skill
This skill provides a guide for code conventions and formatting, especially for projects using Deno.
Code Formatting
- Always run
mise run fmtto format the code before committing
Documentation
- All symbols such as functions, classes, and properties must be documented using JSDoc / TSDoc comments
- Write documentation comments in English
Source
git clone https://github.com/aiskillstore/marketplace/blob/main/skills/5t111111/code-conventions/SKILL.mdView on GitHub Overview
Code Conventions Skill offers practical guidelines for code formatting and documentation in Deno projects. It enforces a disciplined workflow with automatic formatting and comprehensive inline docs using JSDoc/TSDoc, written in English.
How This Skill Works
Developers run `mise run fmt` to format code before committing. All symbols—functions, classes, and properties—must be documented using JSDoc / TSDoc comments, and these comments should be written in English.
When to Use It
- Starting a new Deno project and defining conventions
- Preparing a pull request to ensure consistent formatting
- Reviewing code for missing or incomplete documentation
- Onboarding new contributors to the repository
- Migrating legacy code to Deno-style formatting and docs
Quick Start
- Step 1: Audit the codebase to identify undocumented symbols
- Step 2: Add JSDoc/TSDoc comments in English for each symbol
- Step 3: Run `mise run fmt` and commit the changes
Best Practices
- Run `mise run fmt` before committing
- Document every symbol (functions, classes, properties) with JSDoc/TSDoc
- Write all documentation comments in English
- Enforce conventions during code reviews and PR checks
- Apply conventions to all new code and plan gradual updates for legacy code
Example Use Cases
- A sample function documented with JSDoc describing parameters and return type
- A class with documented methods and properties
- A module formatted by `mise run fmt` before commit
- A file containing English-language doc comments for all symbols
- A PR that adds missing docs and fixes formatting to meet the standard
Frequently Asked Questions
Add this skill to your agents