app-analyzer-optimizer — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited app-analyzer-optimizer (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Systematic codebase analysis and targeted optimization workflow.
Run analysis in this order — each stage informs the next:
1. Inventory → What's actually in this project?
2. Dependencies → What's outdated, unused, or risky?
3. Architecture → How is it structured? Any anti-patterns?
4. Performance → Where are the bottlenecks?
5. Security → What's exposed or vulnerable?
6. Recommendations → Prioritized, actionable fixes# Identify stack
cat package.json 2>/dev/null | head -30
cat Cargo.toml 2>/dev/null
cat pyproject.toml 2>/dev/null
cat go.mod 2>/dev/null
# Project size and structure
find . -type f -name "*.ts" -o -name "*.tsx" | grep -v node_modules | wc -l
du -sh node_modules 2>/dev/null
du -sh .next dist build 2>/dev/null
# Framework detection
ls -la | grep -E "next.config|vite.config|tailwind.config"# Outdated packages
npm outdated
# or
pnpm outdated
# Security vulnerabilities
npm audit
pnpm audit
# Unused dependencies (depcheck)
npx depcheck
# Duplicate dependencies (different versions of same pkg)
npm ls --all 2>&1 | grep -B2 "deduped"
# Bundle size impact analysis
npx bundle-phobia <package-name>| Finding | Risk | Action |
|---|---|---|
| Package unmaintained >2 years | Security/compat risk | Find alternative or fork |
| Multiple lockfiles (package-lock + pnpm-lock) | Build inconsistency | Pick one PM, delete others |
| Direct + transitive version mismatch | Subtle bugs | npm dedupe or pin versions |
| Large unused dependency | Bundle bloat | Remove or tree-shake |
| Dependency with known CVE | Security | Update immediately or patch |
# Find overly large files (potential god objects/modules)
find src -name "*.ts" -o -name "*.tsx" | xargs wc -l | sort -rn | head -10
# Find circular dependencies
npx madge --circular --extensions ts,tsx src/
# Find deeply nested imports (architecture smell)
grep -r "from '\.\./\.\./\.\./\.\./.*'" src/ --include="*.ts*"process.env.X scattered everywhere)# Bundle analysis
ANALYZE=true npm run build
# requires @next/bundle-analyzer configured in next.config.ts
# Check for missing dynamic imports on heavy components
grep -rL "dynamic(" src/components --include="*.tsx" | xargs grep -l "recharts\|monaco-editor\|three"
# Lighthouse CI
npx lighthouse https://your-url.com --viewnext/image (not raw <img>)'use client' on components that could be server componentsnext/font (not external <link>)fetch() calls without explicit cache strategy# Check for N+1 query patterns (look for queries inside loops)
grep -rn "for.*await.*query\|forEach.*await.*find" src/
# Check connection pool configuration
grep -rn "new Pool\|createPool" src/-- Check for missing indexes on foreign keys
SELECT
c.conrelid::regclass AS table_name,
string_agg(a.attname, ', ') AS columns
FROM pg_constraint c
JOIN pg_attribute a ON a.attrelid = c.conrelid AND a.attnum = ANY(c.conkey)
WHERE c.contype = 'f'
AND NOT EXISTS (
SELECT 1 FROM pg_index i
WHERE i.indrelid = c.conrelid AND a.attnum = ANY(i.indkey)
)
GROUP BY c.conrelid;# Secrets accidentally committed
git log --all --full-history -- "*.env" "*secret*" "*key*"
grep -rn "sk_live\|sk_test\|AKIA\|service_role" src/ --include="*.ts*"
# Check for SQL injection risk (raw string concatenation in queries)
grep -rn "query(\`.*\${" src/ --include="*.ts*"
# Check CORS config
grep -rn "Access-Control-Allow-Origin.*\*" src/git log to check history too)Access-Control-Allow-Origin: * on authenticated endpointsnpm audit)Present findings in priority order, with effort estimate:
## Critical (Fix Now)
- [ ] **Exposed `service_role` key in client bundle** — Effort: 30min
Move to server-only env var, rotate the key.
## High Priority (This Sprint)
- [ ] **N+1 query in `/api/dashboard`** — Effort: 2hrs
47 sequential queries per page load. Batch with a single JOIN.
- [ ] **3 packages with known CVEs** — Effort: 1hr
`npm audit fix` resolves 2; `lodash` needs manual major version bump.
## Medium Priority (Next Sprint)
- [ ] **142 unused dependencies in package.json** — Effort: 3hrs
Bundle size could drop ~340KB. Run `depcheck`, verify, remove.
## Low Priority (Backlog)
- [ ] **Inconsistent file naming** (camelCase vs kebab-case) — Effort: ongoing
Standardize gradually during normal development.Impact ↑
High │ Critical │ High Priority
│ (fix now) │ (this sprint)
├─────────────┼──────────────
Low │ Low Priority│ Medium Priority
│ (backlog) │ (next sprint)
└─────────────┴──────────────→
Low Effort High EffortWhen executing fixes (not just reporting):
# Standard verification loop per change
npm run build && npm run test && npm run lintnpm audit, depcheck, madge, bundle analyzer — not guesswork~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.