Quality Score

Every package on LPM gets a quality score out of 100 points. The score is computed from automated checks across four categories and displayed on the package page. The number and type of checks varies by ecosystem.

EcosystemChecks
JavaScript29
Swift25
XCFramework21

Score Tiers

TierScore
Excellent90+
Good70-89
Fair50-69
Needs WorkBelow 50

Check Before Publishing

Run quality checks locally without publishing:

lpm publish --check

Set a minimum score threshold to enforce quality in CI:

lpm publish --min-score 80

If the score is below the threshold, the publish is blocked.

JavaScript Checks (29)

Documentation (22 points)

CheckPointsWhat it looks for
README exists8README file with at least 100 characters
Install instructions3Installation section in README
Usage examples3Code blocks showing how to use the package
API documentation2API reference section
CHANGELOG3CHANGELOG file
LICENSE3LICENSE file or license field in package.json

Code Quality (29 points)

CheckPointsWhat it looks for
Type definitions8TypeScript .d.ts files or types field
IntelliSense coverage4Full IntelliSense/autocomplete support
ESM exports3ESM module support (type: "module" or .mjs)
Tree-shakable3Named exports that enable tree-shaking
No eval patterns3Absence of eval() or new Function()
Engine requirements1engines field in package.json
Exports map3package.json exports field
Minimal dependencies37 or fewer production dependencies
Source maps1.map files included

Testing (11 points)

CheckPointsWhat it looks for
Test files7Test files (.test.js, .spec.js, etc.)
Test script4Valid test script in package.json

Package Health (38 points, 12 checks)

CheckPointsWhat it looks for
Description3Meaningful package description
Keywords1Keywords array in package.json
Repository URL2repository field
Homepage URL1homepage field
Reasonable size3Bundle under 1MB
No vulnerabilities5No known security vulnerabilities
No lifecycle scripts2No preinstall, install, postinstall, preuninstall, uninstall, or postuninstall scripts
Maintenance health4Published within the last 90 days
Semver consistency4No wild version jumps
Author verified3Author has linked GitHub or LinkedIn
Agent Skills7Package has 1+ approved Agent Skills in .lpm/skills/
Comprehensive Skills3Package has 3+ approved Agent Skills

Why lifecycle scripts affect your score

Lifecycle scripts (postinstall, preinstall, etc.) execute automatically when someone installs your package. They are the primary vector for supply chain attacks — malicious packages use them to run arbitrary code on install. Packages without lifecycle scripts score higher because they are safer to install. If your package legitimately needs a postinstall script, the 2-point deduction is minor and your score can still reach Excellent.

Swift Checks (25)

Documentation (22 points)

CheckPointsWhat it looks for
README exists8README file with at least 100 characters
Install instructions3Mentions Package.swift, .package(, Swift Package Manager, or lpm add
Usage examples3Code blocks showing how to use the package
API documentation2API reference section
CHANGELOG3CHANGELOG file
LICENSE3LICENSE file

Code Quality (31 points)

CheckPointsWhat it looks for
Platform declarations6platforms array in Package.swift (e.g., iOS 16+, macOS 13+)
Recent tools version5Swift tools version 5.9 or later
Multi-platform4Support for 2+ Apple platforms
Public API5Swift source files in Sources/ directory
Doc comments7Documentation comments on public APIs (/// DocC style)
Minimal dependencies410 or fewer Swift package dependencies

Testing (11 points)

CheckPointsWhat it looks for
Test files7Test targets in manifest or files in Tests/
Test script4Test targets defined in Package.swift

Package Health (36 points)

CheckPointsWhat it looks for
Description3Meaningful package description
Keywords1Keywords metadata
Repository URL2Repository link
Homepage URL1Homepage link
Reasonable size3Package under 1MB
No vulnerabilities5No known security vulnerabilities
Maintenance health4Published within the last 90 days
Semver consistency4No wild version jumps
Author verified3Author has linked GitHub or LinkedIn
Agent Skills7Package has 1+ approved Agent Skills in .lpm/skills/
Comprehensive Skills3Package has 3+ approved Agent Skills

XCFramework Checks (21)

Documentation (22 points)

Same as Swift - README, install instructions, usage examples, API docs, changelog, and license.

Code Quality (40 points)

CheckPointsWhat it looks for
Valid Info.plist10Parseable Info.plist with at least one platform slice
Multiple platform slices15≥4 targets=15 · 3=11 · 2=7 · 1=3 · 0=0
Reasonable binary size5≤10MB=5 · ≤50MB=4 · ≤100MB=3 · ≤200MB=1 · >200MB=0
Architecture support10Includes arm64 architecture

XCFrameworks are pre-built binaries and cannot ship test targets, so there is no Testing category. The 40 code quality points reward platform and architecture coverage - the things that actually determine whether the framework works for a given consumer.

Package Health (38 points)

CheckPointsWhat it looks for
Description3Meaningful package description
Keywords1Keywords metadata
Repository URL2Repository link
Homepage URL1Homepage link
Reasonable size3≤10MB=3 · ≤50MB=2 · ≤100MB=1 · >100MB=0 (MB scale - XCFrameworks are binary)
No vulnerabilities5No known security vulnerabilities
Maintenance health5Published within the last 90 days
Semver consistency4No wild version jumps
Author verified4Author has linked GitHub or LinkedIn
Agent Skills7Package has 1+ approved Agent Skills in .lpm/skills/
Comprehensive Skills3Package has 3+ approved Agent Skills

Several checks are estimated locally and verified or augmented by the server after publishing:

CheckEcosystemServer behavior
No eval patternsJSServer scans source tarball for eval( and new Function(
No lifecycle scriptsJSServer checks scripts field for install hooks
IntelliSense coverageJSServer awards partial credit for JSDoc @param/@returns
Public APISwiftServer scans for public declarations
Doc commentsSwiftServer scans for /// DocC comments
No vulnerabilitiesAllServer checks vulnerability database
Maintenance healthAllServer checks publish history
Semver consistencyAllServer also checks version history for wild jumps
Author verifiedAllServer checks linked GitHub or LinkedIn
Agent SkillsAllServer checks if 1+ approved skills exist
Comprehensive SkillsAllServer checks if 3+ approved skills exist

Publish-Time Security

Beyond quality scoring, LPM performs additional security checks when you publish:

  • Manifest validation — The server extracts package.json from inside your tarball and compares it against the metadata in your publish request. If name, version, dependencies, scripts, or bin fields don't match, the publish is rejected. This prevents manifest confusion attacks.
  • Vulnerability scanning — Dependencies are checked against the OSV vulnerability database.
  • Skills validation — Agent Skills in .lpm/skills/ are validated for correct frontmatter and structure.

If you see a "Manifest validation failed" error during publish, it means your local package.json doesn't match what's inside the tarball npm built. This usually resolves by running npm pack again or checking that no build step modified package.json after packing.

Maintenance Decay

Quality scores decay over time. If a package has not been updated in over 90 days, the maintenance health points are gradually deducted. This encourages authors to keep packages up to date.

AI Analysis

After publishing, LPM runs an automated AI analysis on your package source code. This generates:

  • A plain-English summary, capabilities list, and target audience
  • Decision-support fields (bestFor, notFor, quickStart) for AI agents
  • Security pattern detection (eval, prototype pollution, path traversal, etc.)
  • Error handling quality assessment
  • Compatibility metadata (types, module format, frameworks, runtime)
  • An embedding vector for semantic search

AI insights appear on your package page, power search results, and are available to AI coding agents via the MCP Server. See AI Metadata for the full list of generated fields and how to improve your results.