
coding-style
by kubb-labs
coding-styleは、ソフトウェア開発を効率化するスキルです。開発ワークフロー全体をサポートし、チームの生産性向上とコード品質の改善を実現します。
ユースケース
MCPサーバー連携
Model Context Protocolを活用したAIツール連携。coding-styleを活用。
コード生成の効率化
ボイラープレートコードを自動生成し、開発時間を短縮。
コードレビュー支援
PRのコード変更を分析し、改善点を提案。
リファクタリング提案
コードの品質向上のためのリファクタリング案を提示。
SKILL.md
name: coding-style description: Coding style, testing, and PR guidelines for the Kubb ecosystem. Use when writing or reviewing code for the Kubb ecosystem.
Code Style and Testing Skill
When to Use
- When creating or reviewing a PR that changes code
- When adding a new package or feature to the monorepo
- When updating CI, linting, or formatting configuration
- When onboarding new contributors and sharing repository conventions
What It Does
This skill documents the repository's coding conventions, testing guidelines, and PR checklist so contributors and automation can produce consistent, high-quality changes.
- Defines formatting, linting, and TypeScript conventions
- Describes testing workflow and CI expectations
- Outlines PR requirements, changelog updates, and release-related steps
- Provides common troubleshooting and recovery commands
How to Use
Run the basic developer checks and fixes locally before committing or opening a PR:
# Format code and attempt autofixes
pnpm run format
# Lint the repository
pnpm run lint
# Run unit tests
pnpm test
# Create a changeset for versioning
pnpm changeset
# Typecheck whole repo
pnpm typecheck
Follow the PR checklist and run the commands above in the same order: format → lint → typecheck → test → changeset.
Repository Facts
- Monorepo: Managed by pnpm workspaces and Turborepo
- Module system: ESM-only (
type: "module"across repo) - Node version: 20
- Testing Library: Vitest
- Versioning: Changesets for versioning and publishing
- CI/CD: GitHub Actions
Coding Style Guidelines
Basic Rules
- Quotes: Single quotes, no semicolons (see
biome.json) - Patterns: Prefer functional patterns
- Ternary operators: Keep ternary operators to one level deep for readability. For nested conditions, use if/else statements or extract to a helper function.
Naming Conventions
| Element / Context | Naming convention |
|---|---|
| File / directory names | camelCase |
| Variables / functions | camelCase |
| Types / Interfaces | PascalCase |
| React components | PascalCase |
TypeScript Conventions
- Module resolution:
"bundler"; ESM only - Strict typing: NEVER use
anytype oras anycasts. Always use proper types, generics, orunknown/neverwhen appropriate. - Files:
.tsfor libraries,.tsxfor React components,.vuefor Vue components - DTS output: Managed by
tsdown - Importing: Always use proper import statements at the module level instead of inline type imports
- Exporting: use
"exports"map andtypesVersionsas needed. Keep public API stable - Root level types: Define types at the root level of the file, not inside functions
- Function syntax in Objects: Use function syntax (not arrow functions) in object methods to enable use of
thiskeyword
Testing
- Test location:
*.test.tsor*.test.tsxinsrcfolders - Focus on specific tests:
pnpm test "<test name>" - Always add or update tests for code changes and when needed update snapshots with the
-uflag - Fix all test and type errors until suite is green
- After moving files or changing imports: Run
pnpm lint && pnpm typecheck
Writing Conventions
- Focused: Test one thing at a time
- Isolated: Don't depend on other tests
- Repeatable: Same results every time
- Fast: Keep tests quick
- Clear: Easy to understand what's being tested
PR Instructions
Follow these steps when creating a PR:
- Make sure that the following commands pass locally:
pnpm format && pnpm lintpnpm typecheckpnpm test
- Create a git commit with Title format:
[<plugin-name>] <Title> - Push your branch and open a PR against
main - Fill out the PR template completely
- Add a changeset using
pnpm changeset - Request reviews from relevant maintainers
- Address feedback and make any requested changes
- Once approved, wait for CI to pass and merge the PR
Related Skills
| Skill | Use For |
|---|---|
| ../changelog/SKILL.md | Update changelogs, Mandatory for all PRs that include code changes |
スコア
総合スコア
リポジトリの品質指標に基づく評価
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 1000以上
1ヶ月以内に更新
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
レビュー
レビュー機能は近日公開予定です


