Formats code according to Ben's style guidelines for TypeScript, Python, and general best practices. Use when formatting code, fixing linting issues, checking naming conventions, organizing imports, or when user mentions formatting, style, linting, Prettier, Black, or ESLint.
Formats code to Ben's style guidelines for TypeScript and Python. Triggers on user requests for formatting, linting, or when encountering Prettier/Black/ESLint issues.
/plugin marketplace add benshapyro/cadre-devkit-claude/plugin install benshapyro-cadre-devkit-claude@benshapyro/cadre-devkit-claudeThis skill is limited to using the following tools:
Apply consistent code formatting and style according to established guidelines.
lowercase_with_underscoresuser_service.py, api_client.ts, data_helper.jscamelCasePascalCaseUPPER_CASE_SNAKE_CASE// Good
const userName = 'John';
const API_KEY = 'secret';
class UserService {}
function getUserData() {}
// Bad
const UserName = 'John';
const api_key = 'secret';
class userService {}
function get_user_data() {}
// Good
const config = {
host: 'localhost',
port: 3000,
timeout: 5000, // trailing comma
};
const items = [
'first',
'second',
'third', // trailing comma
];
// Bad
const config = {
host: 'localhost',
port: 3000,
timeout: 5000 // missing trailing comma
};
*)require)// Good
import { useState, useEffect } from 'react';
import { fetchUser } from '../api/users';
// Bad
import * from 'react';
const users = require('../api/users');
async/await over .then() chains// Good
async function fetchData() {
const response = await apiClient.get('/data');
return response.data;
}
// Bad
function fetchData() {
return apiClient.get('/data').then(res => res.data);
}
any type (use unknown if type is truly unknown)// Good
interface User {
id: number;
name: string;
email: string;
}
async function getUser(id: number): Promise<User> {
const response = await fetch(`/api/users/${id}`);
return response.json();
}
// Bad
async function getUser(id) {
const response = await fetch(`/api/users/${id}`);
return response.json();
}
# Good
def calculate_total(items: list[dict]) -> float:
"""Calculate total price of items."""
return sum(item['price'] for item in items)
class UserService:
"""Service for user operations."""
pass
# Bad
def CalculateTotal(items):
return sum(item['price'] for item in items)
class user_service:
pass
// Good
// Use exponential backoff to avoid overwhelming the API during outages
const retryDelay = Math.pow(2, attemptNumber) * 1000;
// Bad
// Set retry delay
const retryDelay = Math.pow(2, attemptNumber) * 1000;
# Format with Prettier
npx prettier --write "src/**/*.{ts,tsx,js,jsx}"
# Lint with ESLint
npx eslint src/ --fix
# Format code
black .
# Sort imports
isort .
# Both together
black . && isort .
When formatting code:
.then() with async/awaitAlways provide a summary of changes made and reasoning for significant modifications.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.