spatie-javascript
Skill2 starsChanged 3 months agoMITView on GitHub
Use when writing, editing, reviewing, or formatting JavaScript, TypeScript, Vue, Prettier, or ESLint code using Spatie conventions.
2 other projects use a version of this, 2 of them edited.
Adopted by
Most recently taken up by
- Relaticle/relaticleedited, first seen Oct 8, 2026
- relaticle/relaticleedited, first seen Oct 8, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 2
- Relaticle/relaticle★ 1.8k29% same
- relaticle/relaticle★ 1.8k29% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository53 other files it gives its agents.
- instructions/AGENTS.mdAGENTS.md
- skills/software-development/php-best-practices/AGENTS.mdAGENTS.md
- instructions/CLAUDE.mdCLAUDE.md
- architecture-designerSkill
- caveman-commitSkill
- caveman-compressSkill
- cavemanSkill
- conventional-commitSkill
- youtube-contentSkill
- agentkit-skill-authoringSkill
- skill-orchestrationSkill
- analogical-thinkingSkill
- investigateSkill
- ponytailSkill
- systematic-debuggingSkill
- mermaid-diagramsSkill
- feature-forgeSkill
- find-skillsSkill
- impeccableSkill
- javascript-proSkill
- legacy-modernizerSkill
- migrationSkill
- no-ai-slopSkill
- olakunlevpn-filament-skillsSkill
- clickupSkill
- clickup-tweak-workflowSkill
- git-advancedSkill
- local-wikiSkill
- mr-reviewSkill
- php-proSkill
- doxSkill
- improveSkill
- openspecSkill
- scrutinizeSkill
- systems-thinkingSkill
- tweakSkill
- tweak-workflowSkill
- prompt-engineerSkill
- laravel-best-practicesSkill
- pest-testingSkill
- php-best-practicesSkill
- security-audit-lightSkill
- security-best-practicesSkill
- spatie-laravel-phpSkill
- spatie-securitySkill
- spatie-version-controlSkill
- tailwindcss-developmentSkill
- test-driven-developmentSkill
- sql-proSkill
- typescript-proSkill
- ui-ux-pro-maxSkill
- vue-expert-jsSkill
- vue-expertSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 7 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 34
Prefer const over let. Only use let when a variable will be reassigned.
- Distinctive: line 40
Don't abbreviate variable names in multi-line functions.
- Very specific: line 55
Always use === (strict equality).
- Distinctive: line 56
If unsure of the type, cast it first:
- Very specific: line 70
Use the function keyword for named functions to clearly signal it's a function.
- Distinctive: line 74
Use for terse, single-line operations.
- Distinctive: line 75
Use for anonymous callbacks.
- Distinctive: line 76
Use in higher-order functions when it improves readability.
- Very specific: line 77
Don't use arrow functions when you need this context (e.g., jQuery event handlers).
- Distinctive: line 81
Use shorthand method syntax:
- Distinctive: line 101
Prefer destructuring over manual property/index access:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 or ESLint for a project.
Scope
- In scope: JavaScript, TypeScript, Vue single-file components, Prettier/ESLint configuration.
- Out of scope: PHP, Laravel, CSS-only files, server configuration.
Prettier Configuration
- Indentation: 4 spaces (via
.editorconfig, not Prettier default of 2) - Print width: 120 characters (not Prettier default of 80)
- Quote style: single quotes
Variable Declarations
- Prefer
constoverlet. Only useletwhen a variable will be reassigned. - Never use
var. - Reassigning object properties is fine with
const— the reference is not reassigned.
Variable Names
- Don't abbreviate variable names in multi-line functions. Use full, descriptive names.
- Exception: single-line arrow functions where context is obvious.
// Good — full names in multi-line functions
function saveUserSession(userSession) {
// ...
}
// Acceptable — short name in single-line arrow
userSessions.forEach(s => saveUserSession(s));Comparisons
- Always use
===(strict equality). Never use==. - If unsure of the type, cast it first:
const number = parseInt(input);
if (number === 5) {
// ...
}Functions
Function Declarations
- Use the
functionkeyword for named functions to clearly signal it's a function.
Arrow Functions
- Use for terse, single-line operations.
- Use for anonymous callbacks.
- Use in higher-order functions when it improves readability.
- Don't use arrow functions when you need
thiscontext (e.g., jQuery event handlers).
Object Methods
- Use shorthand method syntax:
// Good
const obj = {
handleClick(event) {
// ...
},
};
// Avoid
const obj = {
handleClick: function(event) {
// ...
},
};Destructuring
- Prefer destructuring over manual property/index access:
// Good
const [hours, minutes] = '12:00'.split(':');
// Good — configuration objects with defaults
function createUser({ name, email, role = 'member' }) {
// ...
}
// Avoid
const parts = '12:00'.split(':');
const hours = parts[0];
const minutes = parts[1];Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

