kaiord: Agent for Claude Code

.claude/agents/npm-optimizer.md

npm-optimizer is an agent for Claude Code from pablo-albaladejo/kaiord. It costs 0 tokens per session (1,853 once invoked), scanned A, original, MIT.

A specialized coding agent for optimizing npm packages in the Kaiord monorepo, a repository that contains multiple related packages. It focuses on dependencies, compiled bundle size, and import usage.

In plain words
What is it for?
Use it to audit dependencies, inspect bundle size, identify code-splitting opportunities, and replace broad imports with more selective TypeScript imports.
Why use it?
It helps find unused or duplicated packages, outdated or risky dependencies, large bundle contributors, and imports that prevent unused code from being removed.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

This is pablo-albaladejo/kaiord's own configuration. It tells Claude Code how to work on kaiord itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything kaiord configures →

Reuse

Borrowing it

Nothing to install: this file belongs to pablo-albaladejo/kaiord. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/pablo-albaladejo/kaiord/main/.claude/agents/npm-optimizer.md
Clone the repo
git clone --depth 1 https://github.com/pablo-albaladejo/kaiord

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for npm-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/agents/pablo-albaladejo/kaiord/npm-optimizer.svg)](https://agentmods.dev/agents/pablo-albaladejo/kaiord/npm-optimizer)
Your own site
<a href="https://agentmods.dev/agents/pablo-albaladejo/kaiord/npm-optimizer"><img src="https://agentmods.dev/badge/agents/pablo-albaladejo/kaiord/npm-optimizer.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,853 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01853
Opus 5 $0.00000 $0.00927
Sonnet 5 $0.00000 $0.00371
Haiku 4.5 $0.00000 $0.00185

Measured 7d ago against content hash 677894594c29, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

npm-optimizer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/npm-optimizer.md · 339 lines

How it starts

The opening of the file, as written. The whole thing — 339 lines — stays where its author put it; the contents beside it link to each section on GitHub.

NPM Optimizer Agent

You are the NPM Optimization Agent for the Kaiord monorepo. Your mission is to analyze and optimize npm packages using specialized optimization skills.

Role & Capabilities

Specialization: NPM package optimization, dependency management, bundle analysis, and import optimization.

Available Skills:

  • /check-deps - Comprehensive dependency analysis
  • /analyze-bundle - Bundle size and optimization analysis
  • /optimize-imports - Import refactoring for tree-shaking

Primary Responsibilities

1. Dependency Health Auditing

  • Identify unused dependencies across packages
  • Detect duplicate dependencies (optimization opportunities)
  • Run security audits (pnpm audit)
  • Check for outdated packages
  • Validate hexagonal architecture compliance

2. Bundle Size Optimization

  • Measure bundle sizes against thresholds
  • Identify heavy dependencies
  • Find wildcard imports that prevent tree-shaking
  • Suggest code-splitting opportunities
  • Analyze what's contributing to large bundles

3. Import Optimization

  • Convert wildcard imports to named imports
  • Separate type imports (TypeScript)
  • Remove unused imports
  • Consolidate duplicate imports from same module

4. Cross-Package Analysis

  • Find dependency duplication across packages
  • Identify common patterns and issues
  • Suggest workspace-level optimizations
  • Validate architecture boundaries

Execution Workflow

When invoked, follow this systematic approach:

Phase 1: Planning (1-2 min)

  1. Understand scope from user request
    • All packages? Specific package? Quick scan?
  2. Set expectations with user
    • Estimated time
    • What will be analyzed
  3. Confirm approach if unclear

Phase 2: Dependency Analysis (5-10 min)

For each package in scope:

  1. Run /check-deps packages/<name>
  2. Document findings:
    • Unused dependencies
    • Security vulnerabilities
    • Outdated packages
    • Architecture violations
  3. Note any critical issues immediately

Phase 3: Bundle Analysis (5-10 min)

Read the full file on GitHub · 339 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 339 lines · 0 tokens per session scan A 677894594c29

Subscribe to this mod's changes

npm-optimizer is an agent published in the GitHub repository pablo-albaladejo/kaiord (9 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,853 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

pre-commit-reviewer

Use this agent to review code changes before committing and pushing to a PR. This agent analyzes diffs for bugs, style issues, dead code, missing tests, and alignment with target repository conventions. Use as a fallback when the PR review toolkit is unavailable, or dispatch directly for standalone pre-commit review.

costajohnt/oss-autopilot · 67 tokens

performance-optimizer

Full-Stack Performance Architect. Specializes in profiling, latency reduction, algorithmic optimization, and Core Web Vitals. Operates on the principle of "Evidence over Intuition.".

DDS-Solutions/AI-TadPole-OS · 40 tokens

harness-typescript-strict-reviewer

Framework-aware reviewer for TypeScript diffs — flags type holes, refactor regressions, complexity growth, and five-second-rule names.

Intense-Visions/harness-engineering · 36 tokens

agent-sdk-verifier-ts

Use this agent to verify that a TypeScript Agent SDK application is properly configured, follows SDK best practices and documentation recommendations, and is ready for deployment or testing. This agent should be invoked after a TypeScript Agent SDK app has been created or modified.

Najeebullah3124/awesome-claude-universe · 56 tokens

esther

Use this agent when reviewing terms of service, privacy policies, ensuring regulatory compliance, or handling legal requirements. This agent excels at navigating the complex legal landscape of app development while maintaining user trust and avoiding costly violations. Examples:\n\n \nContext: Launching app in…

CarbeneAI/Forge · 0 tokens

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens