Best fit
- Convenciones de codificación base entre proyectos para nomenclatura, legibilidad, inmutabilidad y revisión de calidad de código. Usar skills de frontend o backend para patrones específicos de frameworks.
affaan-m/ECC
Convenciones de codificación base entre proyectos para nomenclatura, legibilidad, inmutabilidad y revisión de calidad de código. Usar skills de frontend o backend para patrones específicos de frameworks.
npx skills add https://github.com/affaan-m/ECC --skill "docs/es/skills/coding-standards"Source checked Jul 28, 2026·Refresh due Oct 26, 2026
Reorganized from the pinned upstream SKILL.md
According to the pinned SKILL.md from affaan-m/ECC: Convenciones de codificación base aplicables en todos los proyectos.
npx skills add https://github.com/affaan-m/ECC --skill "docs/es/skills/coding-standards"Best fit
Bring this context
Expected outputs
Key source sections
Sections are extracted automatically from the pinned SKILL.md and link back to the source.
Iniciar un nuevo proyecto o módulo
Activar este skill para: - nomenclatura descriptiva - valores predeterminados de inmutabilidad - legibilidad, KISS, DRY y aplicación de YAGNI - expectativas de manejo de errores y revisión de code smells
El código se lee más de lo que se escribe
El código se lee más de lo que se escribe
La solución más simple que funcione
SkillSignal prompt templates
These prompts were written by SkillSignal from the source structure; they are not upstream text.
Task-start prompt
Confirm source fit, inputs, and outputs before acting.
Use coding-standards to help me with: [specific task]. Context: [files, data, or background]. Constraints: [environment, scope, and prohibited actions]. Before acting, check the pinned SKILL.md and explain which sections apply, what inputs are still missing, and what you will deliver.
Source-guided execution
Make the Agent explicitly follow the key extracted sections.
Apply the pinned coding-standards source to [task]. Pay particular attention to these source sections: “Cuándo Activar”, “Límites de Alcance”, “Principios de Calidad de Código”, “1. Legibilidad Primero”, “2. KISS (Keep It Simple, Stupid)”. Preserve the important decision at each step. Mark facts not covered by the source as “needs confirmation” instead of inventing them. Then verify the result against my acceptance criteria: [criteria].
Result-review prompt
Check omissions, permissions, and source drift before delivery.
Review the current coding-standards result: (1) does it satisfy the original task; (2) were any applicable steps or limits in the pinned SKILL.md missed; (3) did it perform any unauthorized file, command, network, or data action; and (4) which conclusions remain unverified? List issues first, then fix only what the source or user authorization supports.
Output checklist
The task matches the purpose documented in the SKILL.md.
The source section “Cuándo Activar” has been checked.
The source section “Límites de Alcance” has been checked.
The source section “Principios de Calidad de Código” has been checked.
The source section “1. Legibilidad Primero” has been checked.
Inputs, constraints, and acceptance criteria are explicit.
Unverified facts, compatibility, and outcome claims are clearly marked.
Any file, command, network, or data action has been reviewed.
Choose a different workflow
Baseline cross-project coding conventions for naming, readability, immutability, and code-quality review. Use detailed frontend or backend skills for framework-specific patterns.
A separate implementation from affaan-m/ECC; compare its source, maintenance signals, and permission requirements.
Open source detailBaseline cross-project coding conventions for naming, readability, immutability, and code-quality review. Use detailed frontend or backend skills for framework-specific patterns.
A separate implementation from affaan-m/ECC; compare its source, maintenance signals, and permission requirements.
Open source detailUniversal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development.
A separate implementation from affaan-m/ECC; compare its source, maintenance signals, and permission requirements.
Open source detailFAQ
Convenciones de codificación base aplicables en todos los proyectos.
The catalog detected this source-specific install command: npx skills add https://github.com/affaan-m/ECC --skill "docs/es/skills/coding-standards". Inspect the command and pinned source before running it.
No dedicated Agent platform is declared in the pinned source record.
Quality breakdown
Based on traceable docs and repository signals; stars are not treated as quality.
Compare before choosing
These links are selected from shared tasks, functions, stacks, platforms, and same-name variants. Compare the source owner, documentation, permissions, and maintenance signals.
Baseline cross-project coding conventions for naming, readability, immutability, and code-quality review. Use detailed frontend or backend skills for framework-specific patterns.
Baseline cross-project coding conventions for naming, readability, immutability, and code-quality review. Use detailed frontend or backend skills for framework-specific patterns.
Universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development.
TypeScript, JavaScript, React, Node.js 개발을 위한 범용 코딩 표준, 모범 사례 및 패턴.
适用于TypeScript、JavaScript、React和Node.js开发的通用编码标准、最佳实践和模式。
Convenciones de codificación base aplicables en todos los proyectos.
Este skill es el suelo compartido, no el manual detallado de frameworks.
frontend-patterns para React, estado, formularios, renderizado y arquitectura UI.backend-patterns o api-design para capas de repositorio/servicio, diseño de endpoints, validación y aspectos específicos del servidor.rules/common/coding-style.md cuando necesites la capa de reglas reutilizables más corta en lugar de un recorrido completo del skill.Activar este skill para:
No usar este skill como fuente principal para:
// PASS: BIEN: Nombres descriptivos
const marketSearchQuery = 'election'
const isUserAuthenticated = true
const totalRevenue = 1000
// FAIL: MAL: Nombres poco claros
const q = 'election'
const flag = true
const x = 1000
// PASS: BIEN: Patrón verbo-sustantivo
async function fetchMarketData(marketId: string) { }
function calculateSimilarity(a: number[], b: number[]) { }
function isValidEmail(email: string): boolean { }
// FAIL: MAL: Poco claro o solo sustantivo
async function market(id: string) { }
function similarity(a, b) { }
function email(e) { }
// PASS: SIEMPRE usar el operador spread
const updatedUser = {
...user,
name: 'New Name'
}
const updatedArray = [...items, newItem]
// FAIL: NUNCA mutar directamente
user.name = 'New Name' // MAL
items.push(newItem) // MAL
// PASS: BIEN: Manejo de errores comprensivo
async function fetchData(url: string) {
try {
const response = await fetch(url)
if (!response.ok) {
throw new Error(`HTTP ${response.status}: ${response.statusText}`)
}
return await response.json()
} catch (error) {
console.error('Fetch failed:', error)
throw new Error('Failed to fetch data')
}
}
// FAIL: MAL: Sin manejo de errores
async function fetchData(url) {
const response = await fetch(url)
return response.json()
}
// PASS: BIEN: Ejecución paralela cuando sea posible
const [users, markets, stats] = await Promise.all([
fetchUsers(),
fetchMarkets(),
fetchStats()
])
// FAIL: MAL: Secuencial cuando no es necesario
const users = await fetchUsers()
const markets = await fetchMarkets()
const stats = await fetchStats()
// PASS: BIEN: Tipos apropiados
interface Market {
id: string
name: string
status: 'active' | 'resolved' | 'closed'
created_at: Date
}
function getMarket(id: string): Promise<Market> {
// Implementación
}
// FAIL: MAL: Usar 'any'
function getMarket(id: any): Promise<any> {
// Implementación
}
// PASS: BIEN: Componente funcional con tipos
interface ButtonProps {
children: React.ReactNode
onClick: () => void
disabled?: boolean
variant?: 'primary' | 'secondary'
}
export function Button({
children,
onClick,
disabled = false,
variant = 'primary'
}: ButtonProps) {
return (
<button
onClick={onClick}
disabled={disabled}
className={`btn btn-${variant}`}
>
{children}
</button>
)
}
// FAIL: MAL: Sin tipos, estructura poco clara
export function Button(props) {
return <button onClick={props.onClick}>{props.children}</button>
}
// PASS: BIEN: Custom hook reutilizable
export function useDebounce<T>(value: T, delay: number): T {
const [debouncedValue, setDebouncedValue] = useState<T>(value)
useEffect(() => {
const handler = setTimeout(() => {
setDebouncedValue(value)
}, delay)
return () => clearTimeout(handler)
}, [value, delay])
return debouncedValue
}
// Uso
const debouncedQuery = useDebounce(searchQuery, 500)
// PASS: BIEN: Actualizaciones de estado correctas
const [count, setCount] = useState(0)
// Actualización funcional para estado basado en el estado previo
setCount(prev => prev + 1)
// FAIL: MAL: Referencia de estado directa
setCount(count + 1) // Puede estar obsoleta en escenarios async
// PASS: BIEN: Renderizado condicional claro
{isLoading && <Spinner />}
{error && <ErrorMessage error={error} />}
{data && <DataDisplay data={data} />}
// FAIL: MAL: Infierno de ternarios
{isLoading ? <Spinner /> : error ? <ErrorMessage error={error} /> : data ? <DataDisplay data={data} /> : null}
GET /api/markets # Listar todos los markets
GET /api/markets/:id # Obtener market específico
POST /api/markets # Crear nuevo market
PUT /api/markets/:id # Actualizar market (completo)
PATCH /api/markets/:id # Actualizar market (parcial)
DELETE /api/markets/:id # Eliminar market
# Parámetros de consulta para filtrado
GET /api/markets?status=active&limit=10&offset=0
// PASS: BIEN: Estructura de respuesta consistente
interface ApiResponse<T> {
success: boolean
data?: T
error?: string
meta?: {
total: number
page: number
limit: number
}
}
// Respuesta exitosa
return NextResponse.json({
success: true,
data: markets,
meta: { total: 100, page: 1, limit: 10 }
})
// Respuesta de error
return NextResponse.json({
success: false,
error: 'Invalid request'
}, { status: 400 })
import { z } from 'zod'
// PASS: BIEN: Validación con esquema
const CreateMarketSchema = z.object({
name: z.string().min(1).max(200),
description: z.string().min(1).max(2000),
endDate: z.string().datetime(),
categories: z.array(z.string()).min(1)
})
export async function POST(request: Request) {
const body = await request.json()
try {
const validated = CreateMarketSchema.parse(body)
// Proceder con datos validados
} catch (error) {
if (error instanceof z.ZodError) {
return NextResponse.json({
success: false,
error: 'Validation failed',
details: error.errors
}, { status: 400 })
}
}
}
src/
├── app/ # Next.js App Router
│ ├── api/ # Rutas API
│ ├── markets/ # Páginas de markets
│ └── (auth)/ # Páginas de auth (grupos de rutas)
├── components/ # Componentes React
│ ├── ui/ # Componentes UI genéricos
│ ├── forms/ # Componentes de formulario
│ └── layouts/ # Componentes de layout
├── hooks/ # Custom React hooks
├── lib/ # Utilidades y configuraciones
│ ├── api/ # Clientes API
│ ├── utils/ # Funciones auxiliares
│ └── constants/ # Constantes
├── types/ # Tipos TypeScript
└── styles/ # Estilos globales
components/Button.tsx # PascalCase para componentes
hooks/useAuth.ts # camelCase con prefijo 'use'
lib/formatDate.ts # camelCase para utilidades
types/market.types.ts # camelCase con sufijo .types
// PASS: BIEN: Explicar el POR QUÉ, no el QUÉ
// Usar backoff exponencial para evitar sobrecargar la API durante interrupciones
const delay = Math.min(1000 * Math.pow(2, retryCount), 30000)
// Usando mutación deliberadamente aquí por rendimiento con arrays grandes
items.push(newItem)
// FAIL: MAL: Declarar lo obvio
// Incrementar contador en 1
count++
// Establecer nombre al nombre del usuario
name = user.name
/**
* Busca markets usando similitud semántica.
*
* @param query - Consulta de búsqueda en lenguaje natural
* @param limit - Número máximo de resultados (por defecto: 10)
* @returns Array de markets ordenados por puntuación de similitud
* @throws {Error} Si la API de OpenAI falla o Redis no está disponible
*
* @example
* ```typescript
* const results = await searchMarkets('election', 5)
* console.log(results[0].name) // "Trump vs Biden"
* ```
*/
export async function searchMarkets(
query: string,
limit: number = 10
): Promise<Market[]> {
// Implementación
}
import { useMemo, useCallback } from 'react'
// PASS: BIEN: Memoizar cómputos costosos
const sortedMarkets = useMemo(() => {
return markets.sort((a, b) => b.volume - a.volume)
}, [markets])
// PASS: BIEN: Memoizar callbacks
const handleSearch = useCallback((query: string) => {
setSearchQuery(query)
}, [])
import { lazy, Suspense } from 'react'
// PASS: BIEN: Cargar componentes pesados de forma diferida
const HeavyChart = lazy(() => import('./HeavyChart'))
export function Dashboard() {
return (
<Suspense fallback={<Spinner />}>
<HeavyChart />
</Suspense>
)
}
// PASS: BIEN: Seleccionar solo las columnas necesarias
const { data } = await supabase
.from('markets')
.select('id, name, status')
.limit(10)
// FAIL: MAL: Seleccionar todo
const { data } = await supabase
.from('markets')
.select('*')
test('calculates similarity correctly', () => {
// Arrange (Preparar)
const vector1 = [1, 0, 0]
const vector2 = [0, 1, 0]
// Act (Actuar)
const similarity = calculateCosineSimilarity(vector1, vector2)
// Assert (Verificar)
expect(similarity).toBe(0)
})
// PASS: BIEN: Nombres de prueba descriptivos
test('returns empty array when no markets match query', () => { })
test('throws error when OpenAI API key is missing', () => { })
test('falls back to substring search when Redis unavailable', () => { })
// FAIL: MAL: Nombres de prueba vagos
test('works', () => { })
test('test search', () => { })
Vigilar estos anti-patrones:
// FAIL: MAL: Función > 50 líneas
function processMarketData() {
// 100 líneas de código
}
// PASS: BIEN: Dividir en funciones más pequeñas
function processMarketData() {
const validated = validateData()
const transformed = transformData(validated)
return saveData(transformed)
}
// FAIL: MAL: 5+ niveles de anidamiento
if (user) {
if (user.isAdmin) {
if (market) {
if (market.isActive) {
if (hasPermission) {
// Hacer algo
}
}
}
}
}
// PASS: BIEN: Retornos tempranos
if (!user) return
if (!user.isAdmin) return
if (!market) return
if (!market.isActive) return
if (!hasPermission) return
// Hacer algo
// FAIL: MAL: Números sin explicación
if (retryCount > 3) { }
setTimeout(callback, 500)
// PASS: BIEN: Constantes con nombre
const MAX_RETRIES = 3
const DEBOUNCE_DELAY_MS = 500
if (retryCount > MAX_RETRIES) { }
setTimeout(callback, DEBOUNCE_DELAY_MS)
Recuerda: La calidad del código no es negociable. El código claro y mantenible permite el desarrollo rápido y la refactorización confiada.