code-quality
Skill3 starsChanged 8 months agoMITView on GitHub
Use when writing any production code in Go, Python, or React — enforces performance-first patterns, prevents N+1 queries, demands algorithmic efficiency, and ensures security safety at every layer
38 other projects use a version of this.
Adopted by
Most recently taken up by
- andeeplus/aplustheir own version, first seen Oct 4, 2026
- hodstack/hodstacktheir own version, first seen Oct 1, 2026
- AhmedAbdelfattah0/AI-Skillstheir own version, first seen Sep 28, 2026
- notque/vexjoy-agenttheir own version, first seen Sep 26, 2026
- yogvidwankhede/vishwakarmatheir own version, first seen Sep 26, 2026
- mthines/agent-skillstheir own version, first seen Sep 25, 2026
Used with
Projects with it also use spring-boot, design-patterns and 9 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.
MindrallySkillspring-boot
Expert guidance for Spring Boot application development with best practices for RESTful APIs, testing, security, and deployment
Also in 3 projects that use this
ratacatSkilldesign-patterns
Use when designing software architecture, refactoring code structure, solving recurring design problems, or when code exhibits symptoms like tight coupling, rigid hierarchies, scattered responsibilities, or difficult-to-test components. Also use when choosing between architectural approaches or reviewing code for structural improvements.
Also in 3 projects that use this
rogue-dev-studioSkillpython
Python 3.13 with uv package manager via mise. Use when the project needs this capability or the user / team manifest asks for it. Use for specialized `python` work when listed in TEAM.yaml or explicitly requested.
Also in 3 projects that use this
BlockSkilldebugging
Debugging guidelines and best practices
Also in 3 projects that use this
Microsoft AzureSkillgit-workflow
Squad branching model: dev-first workflow with insiders preview channel
Also in 3 projects that use this
NVIDIASkilltesting
Run Python and Rust tests for physicsnemo-curator using uv + pytest with coverage reporting via pytest-cov, and cargo-nextest for Rust tests. Includes benchmark workflows with pytest-benchmark and criterion.
Also in 3 projects that use this
Other versions38 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 38
- piomin/claude-ai-spring-boot★ 1.3ksame name
- microsoft/winappCli★ 1.3ksame name
- waybarrios/opencode-power-pack★ 531same name
- notque/vexjoy-agent★ 424same name
- instructa/agent-skills★ 139same name
- hodstack/hodstack★ 70same name
- fagemx/edda★ 36same name
- georgekhananaev/claude-skills-vault★ 28same name
- sordi-ai/skill-everything★ 20same name
- PracticalSwan/agent-skills★ 18same name
28 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 repository36 other files it gives its agents.
- adrSkill
- analyticsSkill
- api-contractSkill
- api-designSkill
- ci-pipelineSkill
- claude-mdSkill
- data-modelSkill
- db-migrateSkill
- debugSkill
- deploySkill
- dep-updateSkill
- disk-cleanupSkill
- docker-buildSkill
- eng-leadSkill
- event-drivenSkill
- fullstack-healthcheckSkill
- go-featureSkill
- go-integration-testSkill
- go-refactorSkill
- go-scaffoldSkill
- incident-responseSkill
- interactive-clarifySkill
- observabilitySkill
- onboardingSkill
- product-specSkill
- py-featureSkill
- py-integration-testSkill
- py-migrateSkill
- py-refactorSkill
- py-scaffoldSkill
- react-featureSkill
- react-refactorSkill
- react-scaffoldSkill
- review-codeSkill
- securitySkill
- system-designSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 37 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Every line of code must be written with performance and scalability in mind.
- Distinctive: line 18
Before performance even matters, the code must be safe:
- Very specific: line 27
If security is missing, the code doesn't ship.
- Very specific: line 70
Every WHERE, JOIN ON, and ORDER BY column in queries that operate on large tables MUST have an index.
- Distinctive: line 188
Before writing any data processing logic, state the complexity:
- Distinctive: line 239
Before considering any code complete, verify:
“Common” is measured: kept by at least 6 in 10 of the 37 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
Code Quality & Performance Standards
Overview
Every line of code must be written with performance and scalability in mind. No naive implementations. No "fix it later." Write it right the first time.
Core principle: Think like a competitive programmer — analyze time/space complexity before writing. O(n) where O(n^2) exists is a bug, not a TODO. Security is not a feature — it's a baseline.
The Non-Negotiables
0. Security Safety — The Baseline
Before performance even matters, the code must be safe:
- Parameterized queries ALWAYS — never concatenate user input into SQL. Use
$1, $2(pgx) or:param(SQLAlchemy). No exceptions. - Input validation at every boundary —
ValidateBody[T](Go), Pydantic models (Python). Never trust user input. - Auth middleware on protected routes — every endpoint that accesses user data must verify authentication.
- No hardcoded secrets — API keys, passwords, JWT secrets come from environment variables.
- No sensitive data in logs — never log passwords, tokens, or PII.
- CORS, security headers, rate limiting — applied at middleware level from day one.
If security is missing, the code doesn't ship. Period. See security skill for full patterns.
These patterns are never acceptable in production code:
1. N+1 Queries — The Cardinal Sin
// NEVER: N+1 query — O(n) database roundtrips
for _, user := range users {
posts, _ := postRepo.GetByUserID(ctx, user.ID)
user.Posts = posts
}
// ALWAYS: Batch query — O(1) database roundtrips
posts, _ := postRepo.GetByUserIDs(ctx, userIDs)
postsByUser := groupBy(posts, func(p Post) uuid.UUID { return p.UserID })# NEVER: N+1 in SQLAlchemy
users = await session.execute(select(UserModel))
for user in users:
posts = user.posts # lazy load = N queries
# ALWAYS: Eager load
stmt = select(UserModel).options(selectinload(UserModel.posts))
# Or batch query
stmt = select(PostModel).where(PostModel.user_id.in_(user_ids))2. Unbounded Queries
// NEVER: select all rows
rows, _ := pool.Query(ctx, "SELECT * FROM events")
// ALWAYS: paginate with limit/offset, enforce max limit
query := "SELECT * FROM events WHERE org_id = $1 ORDER BY created_at DESC LIMIT $2 OFFSET $3"3. Missing Indexes
Every WHERE, JOIN ON, and ORDER BY column in queries that operate on large tables MUST have an index. When adding a query, verify the index exists or create a migration.
-- Check before shipping
EXPLAIN ANALYZE SELECT * FROM events WHERE user_id = $1 ORDER BY created_at DESC;
-- If you see "Seq Scan" on a large table, add an index4. Inefficient Data Structures
// NEVER: O(n) lookup in a loop = O(n*m)
for _, item := range items {
for _, allowed := range allowedIDs {
if item.ID == allowed { ... }
}
}
// ALWAYS: O(1) lookup = O(n)
allowedSet := make(map[uuid.UUID]struct{}, len(allowedIDs))
for _, id := range allowedIDs {
allowedSet[id] = struct{}{}
}
for _, item := range items {
if _, ok := allowedSet[item.ID]; ok { ... }
}# NEVER: O(n) membership test
if user_id in user_id_list: # list = O(n)
# ALWAYS: O(1) membership test
if user_id in user_id_set: # set = O(1)5. Redundant Allocations
// NEVER: allocate in hot loop
for _, item := range items {
result := make([]byte, 0) // allocation per iteration
// ...
}
// ALWAYS: pre-allocate with known capacity
results := make([]Response, 0, len(items))
for _, item := range items {
results = append(results, mapToResponse(item))
}Database Performance Patterns
Batch Operations
// NEVER: insert one at a time
for _, user := range users {
_, err := pool.Exec(ctx, "INSERT INTO users (...) VALUES (...)", ...)
}
// ALWAYS: batch insert
batch := &pgx.Batch{}
for _, user := range users {
batch.Queue("INSERT INTO users (...) VALUES (...)", ...)
}
results := pool.SendBatch(ctx, batch)
defer results.Close()Count + Items in One Repo Call
// ALWAYS: repo returns (items, total, error) for list endpoints
func (r *repo) List(ctx context.Context, limit, offset int) ([]Item, int, error) {
// Count query
var total int
err := r.pool.QueryRow(ctx, "SELECT COUNT(*) FROM items WHERE ...").Scan(&total)
// Items query (same WHERE clause)
rows, err := r.pool.Query(ctx, "SELECT ... FROM items WHERE ... LIMIT $1 OFFSET $2", limit, offset)
return items, total, nil
}Atomic Operations (Transactions)
// When multiple writes must succeed or fail together
tx, _ := pool.Begin(ctx)
defer tx.Rollback(ctx)
// ... multiple operations ...
tx.Commit(ctx)Query Building
// Dynamic WHERE clauses: build conditions array, use parameterized position args
var conditions []string
var args []interface{}
argPos := 1
conditions = append(conditions, fmt.Sprintf("org_id = $%d", argPos))
args = append(args, orgID)
argPos++
if search != "" {
conditions = append(conditions, fmt.Sprintf("name ILIKE $%d", argPos))
args = append(args, "%"+pkg.EscapeLikePattern(search)+"%")
argPos++
}
whereClause := strings.Join(conditions, " AND ")Algorithm Standards
Before writing any data processing logic, state the complexity:
| Acceptable | Unacceptable |
| O(n) single pass | O(n^2) nested loops on same data |
| O(n log n) sort then binary search | O(n) linear search in a loop |
| O(1) hash map lookup | O(n) list scan for membership |
| O(n) with pre-computed map | O(n*m) cross-product without index |
| Streaming/chunked for large data | Loading everything into memory |
Concurrency Patterns
// When you have independent I/O calls, parallelize
g, ctx := errgroup.WithContext(ctx)
var users []User
var stats Stats
g.Go(func() error {
var err error
users, err = userRepo.List(ctx)
return err
})
g.Go(func() error {
var err error
stats, err = statsService.Get(ctx)
return err
})
if err := g.Wait(); err != nil {
return err
}# Python: asyncio.gather for independent I/O
users, stats = await asyncio.gather(
user_repo.list(),
stats_service.get(),
)React Performance
- Virtualize long lists (>100 items) — use
@tanstack/react-virtual - Debounce search inputs — don't fire API on every keystroke
- Paginate API calls — never fetch unbounded lists
- Memoize expensive computations — but only when profiler confirms the cost
- Code split routes —
React.lazyfor route-level splitting
Self-Review Checklist
Before considering any code complete, verify:
- No N+1 queries — every related data load is batched or joined
- All list queries have LIMIT — no unbounded selects
- WHERE/JOIN columns are indexed — checked with EXPLAIN ANALYZE
- No O(n^2) when O(n) or O(n log n) is possible
- Pre-allocated slices/arrays with known capacity
- Independent I/O calls are parallelized (errgroup / asyncio.gather)
- Batch inserts/updates for multiple rows
- Transactions for multi-write operations that must be atomic
- No redundant allocations in hot paths
- Search queries use proper escaping (LIKE patterns)
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.

