create-slidev-presenta…
Build or edit Slidev (sli.dev) presentations for tech talks, workshops, conference sessions, and live-coding demos. Use when the…
This skill provides JavaScript coding standards and is automatically loaded for JavaScript projects. It includes modern ES2025 patterns, async handling, and recommended tooling.
Claude Code
$ npx -y skills add b33eep/claude-code-setup --skill standards-javascript --agent claude-code
Codex
$ npx skills add b33eep/claude-code-setup --skill standards-javascript -a codex -y
Cursor
$ npx skills add b33eep/claude-code-setup --skill standards-javascript -a cursor -y
Gemini CLI
$ npx skills add b33eep/claude-code-setup --skill standards-javascript -a gemini-cli -y
GitHub Copilot
$ npx skills add b33eep/claude-code-setup --skill standards-javascript -a github-copilot -y
OpenCode
$ npx skills add b33eep/claude-code-setup --skill standards-javascript -a opencode -y
Windsurf
$ npx skills add b33eep/claude-code-setup --skill standards-javascript -a windsurf -y
name: standards-javascript description: This skill provides JavaScript coding standards and is automatically loaded for JavaScript projects. It includes modern ES2025 patterns, async handling, and recommended tooling. type: context applies_to: [javascript, nodejs, express, fastify, hapi, npm, yarn, pnpm, bun, deno, vitest, jest, mocha] file_extensions: [".js", ".mjs", ".cjs"]
1. **Simplicity**: Simple, understandable code 2. **Readability**: Readability over cleverness 3. **Maintainability**: Code that's easy to maintain 4. **Testability**: Code that's easy to test 5. **DRY**: Don't Repeat Yourself - but don't overdo it
| Element | Convention | Example | |---------|------------|---------| | Variables/Functions | camelCase | `getUserById`, `isActive` | | Classes | PascalCase | `UserService`, `ApiClient` | | Constants | UPPER_SNAKE_CASE | `MAX_RETRY_COUNT` | | Private | Prefix with `_` or `#` | `_internalMethod`, `#privateField` | | Files | kebab-case or camelCase | `user-service.js`, `userService.js` | | Event Handlers | Prefix with `handle` | `handleClick`, `handleSubmit` |
myproject/ ├── src/ │ ├── index.js # Entry point │ ├── config.js # Settings, env vars │ ├── models/ │ │ └── user.js # Domain models │ ├── services/ │ │ └── user-service.js # Business logic │ ├── routes/ │ │ └── user-routes.js # API routes │ └── utils/ │ └── helpers.js # Utility functions ├── tests/ │ ├── services/ │ │ └── user-service.test.js │ └── setup.js ├── package.json └── README.md
// math.js - Named exports
export function add(a, b) {
return a + b;
}
export function multiply(a, b) {
return a * b;
}
// app.js - Import
import { add, multiply } from './math.js';
// Default export
export default class UserService {
// ...
}
// Import default
import UserService from './user-service.js';**package.json for ES Modules:**
{
"type": "module",
"exports": {
".": "./src/index.js",
"./utils": "./src/utils/index.js"
}
}// Always use async/await for async operations
async function fetchUserData(userId) {
try {
const response = await fetch(`https://api.example.com/users/${userId}`);
if (!response.ok) {
throw new Error(`API error: ${response.statusText}`);
}
return await response.json();
} catch (error) {
console.error('Fetch failed:', error);
throw error;
}
}
// Parallel execution with Promise.all
async function fetchMultipleUsers(userIds) {
const users = await Promise.all(
userIds.map(id => fetchUserData(id))
);
return users;
}
// Race with timeout
async function fetchWithTimeout(promise, timeout) {
return Promise.race([
promise,
new Promise((_, reject) =>
setTimeout(() => reject(new Error('Timeout')), timeout)
),
]);
}
// Get all results, including failures
async function fetchAllSettled(urls) {
const results = await Promise.allSettled(
urls.map(url => fetch(url).then(r => r.json()))
);
return results;
}// Prefer const over let
const users = [];
// Use nullish coalescing and optional chaining
const name = user?.profile?.name ?? 'Anonymous';
// Prefer template literals
const message = `Hello, ${user.name}!`;
// Use destructuring
const { id, name, email } = user;
function processUser({ id, name }) { }
// Prefer array methods over loops
const activeUsers = users.filter(u => u.isActive);
const userNames = users.map(u => u.name);
const totalAge = users.reduce((sum, u) => sum + u.age, 0);
// Use Object.freeze for immutable constants
const CONFIG = Object.freeze({
apiUrl: 'https://api.example.com',
maxRetries: 3,
});
// Private class fields with #
class UserService {
#apiClient;
constructor(apiClient) {
this.#apiClient = apiClient;
}
async getUser(id) {
return this.#apiClient.get(`/users/${id}`);
}
}import express from 'express';
const app = express();
app.use(express.json());
// Routes
app.get('/users', (req, res) => {
res.json([
{ id: 1, name: 'John' },
{ id: 2, name: 'Jane' },
]);
});
app.post('/users', (req, res) => {
const { name } = req.body;
res.status(201).json({ id: 3, name });
});
app.get('/users/:id', (req, res) => {
const { id } = req.params;
res.json({ id: parseInt(id), name: 'User' });
});
// Error handling middleware (must be last)
app.use((err, req, res, next) => {
console.error(err.stack);
res.status(500).json({ error: 'Internal Server Error' });
});
app.listen(3000, () => {
console.log('Server running on :3000');
});**Middleware Pattern:**
// Logging middleware
const logger = (req, res, next) => {
console.log(`${req.method} ${req.path}`);
next();
};
// Authentication middleware
const authenticateToken = (req, res, next) => {
const authHeader = req.headers['authorization'];
const token = authHeader?.split(' ')[1];
if (!token) {
return res.status(401).json({ error: 'Missing token' });
}
// Verify token...
req.user = decodedUser;
next();
};
app.use(logger);
app.use('/api/protected', authenticateToken);import Fastify from 'fastify'; const
This project is archived and no longer maintained. Claude Code Setup has not been developed for a while. Its concepts now live on in our own Claude Code plugins.
Build or edit Slidev (sli.dev) presentations for tech talks, workshops, conference sessions, and live-coding demos. Use when the…
Guide users through creating, reviewing, and fixing custom skills for Claude — both command skills (invoked via /slash) and…
Gradle build tool standards focusing on Kotlin DSL. Covers project configuration, dependency management, and custom plugin/task…
Java coding standards for enterprise applications. Includes naming conventions, modern Java features, design patterns, and…
Kotlin coding standards for modern applications. Includes naming conventions, coroutines, flows, modern Kotlin 2.3.0 features,…
This skill provides Python coding standards and is automatically loaded for Python projects. It includes naming conventions, best…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.