inceptyon-labs/tenet-skills/tenet-performance
Claude Code and agent skill by inceptyon-labs/tenet-skills
- community
Checking that the SKILL.md file is still in the repository.
Audits performance risks: N+1 queries, sync I/O, indexes, leaks, bundles, and rerenders.
Install
npx vskill@latest install inceptyon-labs/tenet-skills/tenet-performanceSKILL.md
The same SKILL.md was published earlier as inceptyon-labs/tenet-skills/tenet-performance.
Tenet Performance — Performance Anti-Pattern Detection
Detects structural performance problems that cause latency spikes, memory bloat, and unnecessary resource consumption. Focuses on patterns that are reliably detectable through static analysis.
Purpose
This skill identifies performance anti-patterns that are detectable without runtime profiling. It scans for N+1 query patterns (loop + await query), synchronous I/O in hot paths, missing database indexes, unbounded queries, memory leaks, bundle size issues in frontend projects, and React re-render hazards. Findings are grounded in specific code locations with actionable fix_prompts.
Calibration — read first
Follow shared/scan-discipline.md (complete every step, enumerate rather than sample, and §2a: report only issues that actually exist), shared/verification.md (every finding is confirmed against the code before it ships; unconfirmed candidates are dropped, not demoted), and shared/severity.md (severity is confirmed impact, never a hedge for doubt).
A finding must exist in this codebase on a path that can run. Do not report hypotheticals, dead code, style preferences, or anything an upstream check already prevents. Zero findings for a step is the normal result on healthy code; do not fill a step to show you looked. Do not overthink it: read the code and its context, decide, move on.
Language Support Matrix
- Native (TS/JS/Python): Pattern matching with high confidence on async/await, ORM calls, React hooks, bundle config, event listener patterns.
- Platform (Swift/SwiftUI, Dart/Flutter, Rust/Tauri): Steps 7b to 7d. Grep finds the candidate; every finding is confirmed by reading the code around it.
- Heuristic (Go/Java/Ruby): Grep-based detection of common patterns (database calls in loops, missing pagination). Lower confidence — all findings tagged
"confidence": "heuristic".
Toolchain Inputs
This skill does not consume .healthcheck/toolchain/ outputs directly. It performs its own heuristic grep-based analysis on source files.
It does read:
.healthcheck/toolchain/language-census.json— to determine which languages are present, which files to scan, and whether frontend-specific checks (bundle size, React) apply.
Procedure
Step 0: Read Language Census
Read .healthcheck/toolchain/language-census.json. Determine:
- Which languages are present and at what support tier
- Whether a frontend framework is in use (check manifests for
react,vue,svelte,next,nuxt,gatsbyinpackage.jsondependencies) - Whether an ORM or database library is present (check for
prisma,sequelize,typeorm,knex,mongoose,sqlalchemy,django,gorm,activerecordin manifests)
Skip languages at the skip tier. For each supported language, run the applicable checks below.
Step 1: N+1 Query Detection
Scan for loops that contain awaited database or network calls. This is the highest-value check — a single N+1 can dominate request latency.
TypeScript / JavaScript:
Look for these DB call signatures inside loops:
await.*\.find(/.findOne(/.findMany(/.findAll(await.*\.query(/.execute(/.raw(await.*\.get(/.fetch(/.select(await.*prisma\./await.*knex(/await.*sequelize\.await.*\.save(/.create(/.update(/.delete(
Also check for Promise.all(arr.map(async wrapping individual DB calls — this parallelizes but still produces N queries.
Python:
Go / Java / Ruby (heuristic):
Severity: major for confirmed N+1 patterns. minor for Promise.all(arr.map( wrapping DB calls (parallelized but still N queries).
Step 2: Synchronous I/O in Hot Paths
Detect synchronous/blocking I/O calls that should be asynchronous.
TypeScript / JavaScript:
Exclude files that are clearly setup/build/config:
*.config.js,*.config.ts,webpack.config.*,vite.config.*,rollup.config.*scripts/,bin/,migrations/,seeds/- Test files (
*.test.*,*.spec.*,__tests__/)
Python:
Severity: major if found in route handlers, middleware, or API controllers. minor if in utility/helper files (may be acceptable).
Step 3: Unbounded Queries
Scan for database queries that fetch unlimited rows — these are time bombs that work fine on small datasets and crash production.
All languages:
Also flag:
.find({})or.find()without.limit()in Mongoose/MongoDB callsSELECT *in raw queries (should specify columns)- Missing pagination in list endpoints (check route handlers returning array results without
skip/take/limit/offsetparameters)
Severity: major for unbounded queries in API handlers or scheduled jobs. minor for unbounded queries in scripts or CLI tools.
Step 4: Missing Database Indexes
If schema/migration files are present, check for likely missing indexes.
Check for:
- Foreign key columns without
@index(Prisma) orINDEX(SQL) - Columns used in
WHEREclauses (cross-reference query patterns from Step 3) without indexes uniqueconstraints that could benefit from a unique index
Severity: major if the column is used in a WHERE clause found in the codebase. minor if it is a foreign key without a confirmed query pattern.
Step 5: Memory Leak Detection
Scan for common memory leak patterns.
TypeScript / JavaScript:
React-specific:
Read useEffect bodies (within ~15 lines of useEffect() and flag if addEventListener appears without a cleanup return.
Python:
Severity: major for addEventListener without cleanup in components, setInterval without clear in long-lived modules. minor for module-level caches without eviction (may be intentional).
Step 6: Bundle Size Issues (Frontend Projects Only)
Skip this step if no frontend framework detected in Step 0.
Curated list of heavy/replaceable dependencies:
| Package | Issue | Alternative | |
|---|---|---|---|
moment | 329kB, mutable | date-fns, dayjs | |
lodash | 72kB full bundle | lodash-es + tree-shaking, or individual lodash.get etc. | |
aws-sdk | 3MB+ | @aws-sdk/client-* (v3, tree-shakeable) | |
chart.js + all plugins | 200kB+ | Load plugins selectively | |
faker in dependencies | Should be devDependencies only | Move to devDependencies | |
@fortawesome/fontawesome-free | 1.5MB | SVG icons or icon subset |
Flag if:
- No code splitting configuration found in a project with >20 route/page components
- Large dependencies are in
dependencies(notdevDependencies) without tree-shaking evidence
Severity: major for heavy dependencies with lighter alternatives. minor for missing code splitting config.
Step 7: React Re-render Hazards (React Projects Only)
Skip this step if React is not detected in Step 0.
Apply these filters to reduce false positives:
- Ignore inline props on native HTML elements (
<div>,<span>,<button>) — only flag on custom components (PascalCase) - Ignore event handlers like
onClick,onChangeon native elements - Only flag
.filter().map()chains if they operate on arrays of >0 estimated size (heuristic: check if the source is state or props, not a small constant)
Severity: minor for inline object/function props on custom components. major for expensive computation chains (sort/filter/reduce on large data) without useMemo in components that re-render frequently (check if parent passes changing props).
Step 7b: Swift and SwiftUI (Apple Platform Projects Only)
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/tenet-performance/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/inceptyon-labs/tenet-skills/tenet-performance)