con un clic
clean-code
Essential clean code practices including naming, comments, and structure
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Essential clean code practices including naming, comments, and structure
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Always use Turborepo commands for building, testing, and serving projects in this monorepo
Always use Turborepo commands for building, testing, and serving projects in this monorepo
Complete guide for Mastra development — agents, tools, workflows, vertical organization, and type safety
Always fix issues you encounter, even if unrelated to your current task
Commit message format standards using Conventional Commits specification
Use GitHub MCP tools for all repository operations instead of CLI or API calls
Basado en la clasificación ocupacional SOC
| name | clean-code |
| description | Essential clean code practices including naming, comments, and structure |
Follow these essential clean code practices for the Hey Jarvis project.
CRITICAL: Never shorten variable names - clarity is more important than brevity.
Variable names should be:
✅ GOOD - Full descriptive names:
const requirements = [...];
const acceptanceCriteria = [...];
const implementation = {...};
const dependencies = [...];
❌ BAD - Shortened abbreviations:
const req = [...]; // ❌ NEVER
const ac = [...]; // ❌ NEVER
const impl = {...}; // ❌ NEVER
const deps = [...]; // ❌ NEVER
The only acceptable abbreviations are industry-standard terms:
id (identifier)url (Uniform Resource Locator)api (Application Programming Interface)html, css, json (well-known formats)i, j, k (only in short loop contexts)Avoid adding functionality or configuration options until they are actually needed.
Build only what is required right now. Don't speculate about future needs.
Factory Methods:
// ✅ GOOD - Opinionated with defaults
export const createAgent = (config: AgentConfig) => {
return new Agent({
...config,
model: getModel('gemini-flash-latest'),
memory: getSharedMemory(),
});
};
// ❌ BAD - Too many options
export const createAgent = (config: AgentConfig & {
customMemory?: Memory,
customModel?: Model,
customScorers?: Scorer[],
customProcessors?: Processor[],
}) => { ... };
Add features ONLY when:
Watch for these phrases that signal YAGNI violations:
Avoid duplicating code, logic, or knowledge throughout the codebase.
Extract duplication when you see:
Write code that is easy to modify, extend, and adapt to changing requirements.
Decouple components:
// ✅ GOOD - Loosely coupled
export function processData(data: Data, processor: DataProcessor) {
return processor.process(data);
}
// ❌ BAD - Tightly coupled
export function processData(data: Data) {
const processor = new SpecificProcessor();
return processor.process(data);
}
Use configuration over code:
// ✅ GOOD - Configurable
export const TIMEOUTS = {
connect: 60,
read: 300,
retry: 60,
};
// ❌ BAD - Hard-coded
const timeout = 60; // Scattered throughout code
These work together: