From coding-guidelines
Prohibits ad-hoc mutable stateful objects and enforces stateless functions or established patterns (Factory/Builder) when state is unavoidable. Use when designing data structures or reviewing code that introduces new class instances or mutable singletons. Do not use to prohibit all state — only uncontrolled, arbitrarily created mutable objects.
How this skill is triggered — by the user, by Claude, or both
Slash command
/coding-guidelines:avoid-arbitrary-stateful-objectsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Minimize the use of long-lived, mutable objects (state containers). Prefer passing immutable data through stateless functions. When state is required, use explicit creation patterns like **Factory** or **Builder** rather than ad-hoc stateful classes.
Minimize the use of long-lived, mutable objects (state containers). Prefer passing immutable data through stateless functions. When state is required, use explicit creation patterns like Factory or Builder rather than ad-hoc stateful classes.
readonly properties and const variables.this.class StringProcessor {
private result = '';
append(str: string) {
this.result += str; // Mutation
}
getResult() {
return this.result;
}
}
// Stateless
function appendString(original: string, addition: string): string {
return original + addition;
}
// Explicit state creation
function createCounter() {
let count = 0;
return {
increment: () => ++count,
get: () => count
};
}
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub mew-ton/coding-guidelines --plugin coding-guidelines