coding-style
Coding style, testing, and PR guidelines for the Kubb ecosystem. Use when writing or reviewing code for the Kubb ecosystem.
Install
mkdir -p .claude/skills/coding-style && curl -L -o skill.zip "https://mcp.directory/api/skills/download/5916" && unzip -o skill.zip -d .claude/skills/coding-style && rm skill.zipInstalls to .claude/skills/coding-style
About this skill
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 |
More by kubb-labs
View all skills by kubb-labs →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversUnlock seamless Figma to code: streamline Figma to HTML with Framelink MCP Server for fast, accurate design-to-code work
Supercharge your NextJS projects with AI-powered tools for diagnostics, upgrades, and docs. Accelerate development and b
Build iOS apps efficiently with Xcodebuild, integrating testing and error handling. Automate BrowserStack for seamless d
Boost your AI code assistant with Context7: inject real-time API documentation from OpenAPI specification sources into y
Enhance software testing with Playwright MCP: Fast, reliable browser automation, an innovative alternative to Selenium s
AI-driven control of live Chrome via Chrome DevTools: browser automation, debugging, performance analysis and network mo
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.