Agent Skills
› relaticle/relaticle
› spatie-javascript
spatie-javascript
GitHub提供 Spatie JavaScript/TypeScript 编码规范,涵盖变量、函数、解构及 Prettier 配置,用于代码创建、编辑、审查和重构,确保代码一致性与可读性。
Trigger Scenarios
JavaScript 或 TypeScript 代码编写
代码格式化和 Prettier 配置
Vue 单文件组件开发
代码审查与重构
Install
npx skills add relaticle/relaticle --skill spatie-javascript -g -y
SKILL.md
Frontmatter
{
"name": "spatie-javascript",
"license": "MIT",
"metadata": {
"author": "Spatie"
},
"description": "Apply Spatie's JavaScript coding standards for any task that creates, edits, reviews, refactors, or formats JavaScript or TypeScript code; use for variable declarations, comparisons, functions, destructuring, and Prettier configuration to align with Spatie's JS conventions."
}
Spatie JavaScript Guidelines
Overview
Apply Spatie's JavaScript coding standards to keep JS/TS code consistent and readable.
When to Activate
- Activate this skill for any JavaScript or TypeScript coding work.
- Activate this skill when working on
.js,.ts,.jsx,.tsx, or.vuefiles. - Activate this skill when configuring Prettier for a project.
Scope
- In scope: JavaScript, TypeScript, Vue single-file components, Prettier configuration.
- Out of scope: PHP, Laravel, CSS-only files, server configuration.
Workflow
- Identify the JavaScript, TypeScript, Vue, or Prettier artifact being changed.
- Read
references/spatie-javascript-guidelines.mdand focus on the relevant sections. - Apply Prettier configuration first, then the language rules relevant to the change.
Core Rules (Summary)
- Use four-space indentation, a 120-character print width, and single quotes.
- Prefer
const, useletonly for reassignment, and never usevar. - Avoid abbreviated variable names except in clear single-line arrow functions.
- Always use strict equality and cast values before comparing different types.
- Use
functionfor declarations and arrow functions for anonymous or terse functions when appropriate. - Keep functions pure, limit
this, and use shorthand object methods. - Prefer object and array destructuring.
References
references/spatie-javascript-guidelines.md
Version History
- 1f433f8 Current 2026-08-20 14:43


