coding-standards
Skill3 starsChanged 5 months agoMITView on GitHub
Universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development.
67 other projects use a version of this, 36 of them edited.
Adopted by
Most recently taken up by
- Lukk17/agent-standardstheir own version, first seen Oct 5, 2026
- jesse-merhi/skillstheir own version, first seen Oct 4, 2026
- shinpr/ai-coding-project-boilerplatetheir own version, first seen Oct 3, 2026
- vospr/context-engineering-templatetheir own version, first seen Oct 1, 2026
- DoKu67/claude-code-skilstheir own version, first seen Sep 29, 2026
- nnkogift/personal-skillstheir own version, first seen Sep 27, 2026
Used with
Projects with it also use springboot-security, configure-ecc and 7 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
FaisalAlqarniSkillspringboot-security
Spring Security best practices for authn/authz, validation, CSRF, secrets, headers, rate limiting, and dependency security in Java Spring Boot services.
Also in 9 projects that use this
saxon-ySkillconfigure-ecc
Interactive installer for Everything Claude Code — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.
Also in 5 projects that use this
FaisalAlqarniSkillspringboot-tdd
Test-driven development for Spring Boot using JUnit 5, Mockito, MockMvc, Testcontainers, and JaCoCo. Use when adding features, fixing bugs, or refactoring.
Also in 7 projects that use this
InfopibeSkilldeployment-patterns
Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications.
Also in 10 projects that use this
InfopibeSkillfoundation-models-on-device
Apple FoundationModels framework for on-device LLM — text generation, guided generation with @Generable, tool calling, and snapshot streaming in iOS 26+.
Also in 5 projects that use this
yanhaoluo0Skilljava-coding-standards
阿里巴巴Java开发手册编程规约,包含命名风格、常量定义、代码格式、OOP规约、日期时间、集合处理、并发处理、控制语句、注释规约等。Use when writing Java code, reviewing code, or following Alibaba Java coding standards.
Also in 8 projects that use this
- +2 more from FaisalAlqarni
Other versions67 projects use a version of this.
Word for word · 0
None found.
Edited · 36
- WorldFlowAI/everything-claude-code★ 4k81% same
- xu-xiang/everything-claude-code-zh★ 2k33% same
- loulanyue/awesome-claude-notes★ 27277% same
- tpavanipradeep/everything-claude-code★ 13477% same
- templetongroup/radiant★ 11356% same
- hellangleZ/burn-in-cceverywhere-ralph★ 11281% same
- Jamkris/everything-gemini-code★ 8781% same
- codelably/harmony-claude-code★ 4331% same
- myths-labs/muse★ 3581% same
- khanhhuyenngo985-sys/character-scene-design-skills★ 1465% same
26 more not listed
Wrote their own version · 31
- dmmulroy/skills★ 428same name
- shinpr/ai-coding-project-boilerplate★ 231same name
- cloudnative-co/claude-code-starter-kit★ 151same name
- TheBeardedBearSAS/claude-craft★ 106same name
- joshuadavidthomas/agent-skills★ 54same name
- ludo-technologies/python-best-practices★ 27same name
- marc-ing/marc-skills★ 14same name
- noah-sheldon/ai-dev-kit★ 13same name
- vospr/context-engineering-template★ 9same name
- nikovijay/pm-ai-skills-kit★ 8same name
21 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository67 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- optimize-contextSkill
- a11y-checkSkill
- api-contractSkill
- backend-patternsSkill
- build-fixSkill
- checkpointSkill
- clickhouse-ioSkill
- code-review-eccSkill
- code-reviewSkill
- config-auditSkill
- continuous-learning-v2Skill
- create-prdSkill
- deps-auditSkill
- e2eSkill
- eval-harnessSkill
- evalSkill
- evolveSkill
- executeSkill
- execution-reportSkill
- extract-sharedSkill
- firecrawlSkill
- frontend-designSkill
- frontend-patternsSkill
- golang-patternsSkill
- golang-testingSkill
- implement-fixSkill
- init-projectSkill
- instinct-exportSkill
- instinct-importSkill
- instinct-statusSkill
- iterative-retrievalSkill
- lazySkill
- learnSkill
- orchestrateSkill
- perf-profileSkill
- plan-eccSkill
- plan-featureSkill
- postgres-patternsSkill
- primeSkill
- project-guidelines-exampleSkill
- projectSkill
- prompt-auditSkill
- python-patternsSkill
- python-reviewSkill
- python-testingSkill
- rcaSkill
- refactor-cleanSkill
- releaseSkill
- security-reviewSkill
- seo-kitSkill
- set-working-dirSkill
- skill-createSkill
- strategic-compactSkill
- supadataSkill
- system-reviewSkill
- tddSkill
- tdd-workflowSkill
- test-coverageSkill
- testSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. 3 are common, 0 are distinctive, and 0 are very specific to this project.
3
Common
Most of the 56 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 31
Don't build features before they're needed
- Common: line 33
Add complexity only when required
- Common: line 34
Start simple, refactor when needed
“Common” is measured: kept by at least 6 in 10 of the 56 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Coding Standards & Best Practices
Universal coding standards applicable across all projects.
Code Quality Principles
1. Readability First
- Code is read more than written
- Clear variable and function names
- Self-documenting code preferred over comments
- Consistent formatting
2. KISS (Keep It Simple, Stupid)
- Simplest solution that works
- Avoid over-engineering
- No premature optimization
- Easy to understand > clever code
3. DRY (Don't Repeat Yourself)
- Extract common logic into functions
- Create reusable components
- Share utilities across modules
- Avoid copy-paste programming
4. YAGNI (You Aren't Gonna Need It)
- Don't build features before they're needed
- Avoid speculative generality
- Add complexity only when required
- Start simple, refactor when needed
TypeScript/JavaScript Standards
Variable Naming
// GOOD: Descriptive names
const itemSearchQuery = 'electronics'
const isUserAuthenticated = true
const totalRevenue = 1000
// BAD: Unclear names
const q = 'electronics'
const flag = true
const x = 1000Function Naming
// GOOD: Verb-noun pattern
async function fetchItemData(itemId: string) { }
function calculateSimilarity(a: number[], b: number[]) { }
function isValidEmail(email: string): boolean { }
// BAD: Unclear or noun-only
async function item(id: string) { }
function similarity(a, b) { }
function email(e) { }Immutability Pattern (CRITICAL)
// ALWAYS use spread operator
const updatedUser = {
...user,
name: 'New Name'
}
const updatedArray = [...items, newItem]
// NEVER mutate directly
user.name = 'New Name' // BAD
items.push(newItem) // BADError Handling
// GOOD: Comprehensive error handling
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')
}
}
// BAD: No error handling
async function fetchData(url) {
const response = await fetch(url)
return response.json()
}Async/Await Best Practices
// GOOD: Parallel execution when possible
const [users, items, stats] = await Promise.all([
fetchUsers(),
fetchItems(),
fetchStats()
])
// BAD: Sequential when unnecessary
const users = await fetchUsers()
const items = await fetchItems()
const stats = await fetchStats()Type Safety
// GOOD: Proper types
interface Item {
id: string
name: string
status: 'active' | 'resolved' | 'closed'
created_at: Date
}
function getItem(id: string): Promise<Item> {
// Implementation
}
// BAD: Using 'any'
function getItem(id: any): Promise<any> {
// Implementation
}React Best Practices
Component Structure
// GOOD: Functional component with types
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>
)
}
// BAD: No types, unclear structure
export function Button(props) {
return <button onClick={props.onClick}>{props.children}</button>
}Custom Hooks
// GOOD: Reusable custom hook
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
}
// Usage
const debouncedQuery = useDebounce(searchQuery, 500)State Management
// GOOD: Proper state updates
const [count, setCount] = useState(0)
// Functional update for state based on previous state
setCount(prev => prev + 1)
// BAD: Direct state reference
setCount(count + 1) // Can be stale in async scenariosConditional Rendering
// GOOD: Clear conditional rendering
{isLoading && <Spinner />}
{error && <ErrorMessage error={error} />}
{data && <DataDisplay data={data} />}
// BAD: Ternary hell
{isLoading ? <Spinner /> : error ? <ErrorMessage error={error} /> : data ? <DataDisplay data={data} /> : null}API Design Standards
REST API Conventions
GET /api/items # List all items
GET /api/items/:id # Get specific item
POST /api/items # Create new item
PUT /api/items/:id # Update item (full)
PATCH /api/items/:id # Update item (partial)
DELETE /api/items/:id # Delete item
# Query parameters for filtering
GET /api/items?status=active&limit=10&offset=0Response Format
// GOOD: Consistent response structure
interface ApiResponse<T> {
success: boolean
data?: T
error?: string
meta?: {
total: number
page: number
limit: number
}
}
// Success response
return NextResponse.json({
success: true,
data: items,
meta: { total: 100, page: 1, limit: 10 }
})
// Error response
return NextResponse.json({
success: false,
error: 'Invalid request'
}, { status: 400 })Input Validation
import { z } from 'zod'
// GOOD: Schema validation
const CreateItemSchema = 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 = CreateItemSchema.parse(body)
// Proceed with validated data
} catch (error) {
if (error instanceof z.ZodError) {
return NextResponse.json({
success: false,
error: 'Validation failed',
details: error.errors
}, { status: 400 })
}
}
}File Organization
Project Structure
src/
├── app/ # Next.js App Router
│ ├── api/ # API routes
│ ├── items/ # Item pages
│ └── (auth)/ # Auth pages (route groups)
├── components/ # React components
│ ├── ui/ # Generic UI components
│ ├── forms/ # Form components
│ └── layouts/ # Layout components
├── hooks/ # Custom React hooks
├── lib/ # Utilities and configs
│ ├── api/ # API clients
│ ├── utils/ # Helper functions
│ └── constants/ # Constants
├── types/ # TypeScript types
└── styles/ # Global stylesFile Naming
components/Button.tsx # PascalCase for components
hooks/useAuth.ts # camelCase with 'use' prefix
lib/formatDate.ts # camelCase for utilities
types/item.types.ts # camelCase with .types suffixComments & Documentation
When to Comment
// GOOD: Explain WHY, not WHAT
// Use exponential backoff to avoid overwhelming the API during outages
const delay = Math.min(1000 * Math.pow(2, retryCount), 30000)
// Deliberately using mutation here for performance with large arrays
items.push(newItem)
// BAD: Stating the obvious
// Increment counter by 1
count++
// Set name to user's name
name = user.nameJSDoc for Public APIs
/**
* Searches items using semantic similarity.
*
* @param query - Natural language search query
* @param limit - Maximum number of results (default: 10)
* @returns Array of items sorted by similarity score
* @throws {Error} If embedding API fails or cache unavailable
*
* @example
* ```typescript
* const results = await searchItems('electronics', 5)
* console.log(results[0].name) // "Wireless Headphones"
* ```
*/
export async function searchItems(
query: string,
limit: number = 10
): Promise<Item[]> {
// Implementation
}Performance Best Practices
Memoization
import { useMemo, useCallback } from 'react'
// GOOD: Memoize expensive computations
const sortedItems = useMemo(() => {
return items.sort((a, b) => b.volume - a.volume)
}, [items])
// GOOD: Memoize callbacks
const handleSearch = useCallback((query: string) => {
setSearchQuery(query)
}, [])Lazy Loading
import { lazy, Suspense } from 'react'
// GOOD: Lazy load heavy components
const HeavyChart = lazy(() => import('./HeavyChart'))
export function Dashboard() {
return (
<Suspense fallback={<Spinner />}>
<HeavyChart />
</Suspense>
)
}Database Queries
// GOOD: Select only needed columns
const { data } = await db
.from('items')
.select('id, name, status')
.limit(10)
// BAD: Select everything
const { data } = await db
.from('items')
.select('*')Testing Standards
Test Structure (AAA Pattern)
test('calculates similarity correctly', () => {
// Arrange
const vector1 = [1, 0, 0]
const vector2 = [0, 1, 0]
// Act
const similarity = calculateCosineSimilarity(vector1, vector2)
// Assert
expect(similarity).toBe(0)
})Test Naming
// GOOD: Descriptive test names
test('returns empty array when no items match query', () => { })
test('throws error when API key is missing', () => { })
test('falls back to basic search when cache unavailable', () => { })
// BAD: Vague test names
test('works', () => { })
test('test search', () => { })Code Smell Detection
Watch for these anti-patterns:
1. Long Functions
// BAD: Function > 50 lines
function processItemData() {
// 100 lines of code
}
// GOOD: Split into smaller functions
function processItemData() {
const validated = validateData()
const transformed = transformData(validated)
return saveData(transformed)
}2. Deep Nesting
// BAD: 5+ levels of nesting
if (user) {
if (user.isAdmin) {
if (item) {
if (item.isActive) {
if (hasPermission) {
// Do something
}
}
}
}
}
// GOOD: Early returns
if (!user) return
if (!user.isAdmin) return
if (!item) return
if (!item.isActive) return
if (!hasPermission) return
// Do something3. Magic Numbers
// BAD: Unexplained numbers
if (retryCount > 3) { }
setTimeout(callback, 500)
// GOOD: Named constants
const MAX_RETRIES = 3
const DEBOUNCE_DELAY_MS = 500
if (retryCount > MAX_RETRIES) { }
setTimeout(callback, DEBOUNCE_DELAY_MS)Remember: Code quality is not negotiable. Clear, maintainable code enables rapid development and confident refactoring.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

