New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

lingot

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lingot

The context compiler for AI coding agents. 77 intelligence blocks, context health scoring, clinical trial data. Baseline: 52%. With Lingot: 99.4%.

latest
Source
npmnpm
Version
1.7.0
Version published
Maintainers
1
Created
Source

lingot

npm version license

The context compiler for AI coding agents. Intelligence blocks that make Cursor, Windsurf, and Claude Code measurably better.

Baseline pass rate without context: 52%. With a single Lingot block: 99.7%.

That's from 6,400+ controlled assertions across 4 experiments. Same model, same prompts. The only variable was context. Read the research →

Quick Start

# Install a block
npx lingot add supabase-auth

# Detect your stack and see recommendations
npx lingot init

# Install multiple blocks
npx lingot add drizzle-orm stripe-billing tailwind-v4

# Score your project's context health
npx lingot doctor

# Compile blocks for your agent
npx lingot compile --target cursor    # .cursorrules
npx lingot compile --target windsurf  # .windsurfrules
npx lingot compile --target claude    # CLAUDE.md

What Are Intelligence Blocks?

Each block contains 4 files of curated, token-optimized context:

FilePurpose
knowledge.mdDense domain knowledge, mental models, current API patterns
rules.xmlAffirmative heuristic rules that prevent hallucinations
examples.yamlFew-shot input/output examples for common tasks
lingot.jsonMetadata, version, dependencies, scope coverage

Load blocks into your AI agent's context to get measurably better output. Our Drizzle ORM block improved code accuracy from 52% to 99.7% across 5 eval scenarios.

Commands

CommandDescription
lingot add <name>Install a block from the registry
lingot remove <name>Remove installed blocks
lingot update [name...]Check for and install block updates
lingot initScan package.json and suggest relevant blocks
lingot listList installed blocks with token counts
lingot inspect <name>Show block details, version, and scope
lingot search <query>Search the registry
lingot doctorScore context health 0-100, detect Pink Elephant Tax
lingot compileCompile for Cursor, Claude Code, Windsurf
lingot statsShow installed blocks summary and token usage
lingot serveStart local MCP server for installed blocks

lingot doctor

Scores your project's context files on three clinical metrics:

  • LINT-001: Pink Elephant Tax — Negative rules (NEVER, AVOID, DON'T) that inject deprecated tokens into the model's working memory. Our data shows each violation costs ~2.7% accuracy.
  • LINT-002: Attention Dilution — Context blocks that exceed the signal-to-noise sweet spot (>8,000 tokens).
  • LINT-003: Latent Collision — Blocks that will interfere when co-loaded due to overlapping scope domains.
npx lingot doctor                    # Score installed blocks
npx lingot doctor ./my-rules-dir     # Score a specific directory
npx lingot doctor --report           # Machine-readable JSON for CI

lingot compile

Compiles installed blocks into the format your agent expects:

# Generate .cursorrules files (one per block)
npx lingot compile --target cursor

# Generate a single .windsurfrules file
npx lingot compile --target windsurf

# Generate a single CLAUDE.md with all blocks
npx lingot compile --target claude

The compiler uses Semantic Lens ordering — knowledge first (the map), then rules (the guardrails), then examples (the demonstrations). This matches our experimental findings: knowledge carries 95%+ of the signal.

77 Blocks Available

Auth, frontend, backend, database, AI SDKs, payments, testing, DevOps, and more.

Browse all blocks at lingot.sh.

npx lingot add drizzle-orm        # ORM with correct v3 patterns
npx lingot add supabase-auth      # Auth + RLS (v2.0, 4,440 tokens)
npx lingot add tailwind-v4        # CSS-first config, no tailwind.config.js
npx lingot add next-auth          # NextAuth.js v5 with App Router
npx lingot add stripe-billing     # Webhooks, subscriptions, checkout
npx lingot add prisma             # Schema design + Client extensions
npx lingot add zod                # Schema validation + type inference

MCP Integration

Expose installed blocks to any MCP-compatible agent:

lingot serve

Provides two tools:

  • search_packages — Find relevant blocks by topic
  • get_package_context — Load block content into agent context

The Research

We ran clinical trials to measure how context affects AI code generation:

Context LevelPass Ratevs Baseline
No context52.0%
Rules only69.9%+17.9pp
Knowledge only99.7%+47.7pp
Full block97.0%+45.0pp

Key findings:

  • Structured knowledge beats raw docs — A 4,000-token block outperforms 40,000 tokens of copy-pasted documentation
  • Negative rules backfire — "NEVER use X" makes X more salient to the model (the Pink Elephant Tax)
  • Context has carrying capacity — Some block combinations create asymmetric interference (Latent Hijacking)

Full methodology, data, and analysis: lingot.sh/research

CI/CD Integration

Gate your PRs on context health:

# .github/workflows/context-lint.yml
name: Context Lint
on: [pull_request]
jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npx lingot doctor --min-score 80 --report

Contributing

Want to create a block for your favorite library? See the contribution guide.

npx lingot create my-block
# Edit the generated files, then validate:
npx lingot validate ./my-block
npx lingot doctor ./my-block

License

MIT

Keywords

ai

FAQs

Package last updated on 17 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts