npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sub-agents

v0.2.5

Published

Initialize and manage specialized AI sub-agents for Claude Code in your project

Downloads

11

Readme

Sub-Agents

npm version npm downloads License: MIT Node.js Version

Initialize and manage specialized AI agents for Claude Code in your project. Get tailored AI assistance based on your project's technology stack.

\ud83d\udce6 This is a CLI tool meant to be used with npx, not installed as a project dependency.

Installation

⚠️ Important: This tool is designed to be used with npx, not installed as a dependency.

# ✅ Correct usage
npx sub-agents init --interactive

# ❌ Do NOT install with npm/yarn
# npm install sub-agents  # This won't work as expected

Quick Start

Initialize sub-agents in your project:

npx sub-agents init

Or with specific options:

# Interactive mode
npx sub-agents init --interactive

# Auto-detect and install relevant agents
npx sub-agents init

# Install specific categories
npx sub-agents init --categories=frontend,backend

# Install specific agents
npx sub-agents init --agents=nextjs-developer,postgres-dba

How It Works

  1. Project Detection: Automatically detects your project type (Next.js, Django, Express, etc.)
  2. Agent Selection: Suggests relevant AI agents based on your stack
  3. Local Installation: Installs agents in .claude/agents/ directory
  4. Claude Integration: Agents are automatically available when using Claude Code

Project Structure

After initialization, your project will have:

your-project/
├── .claude/
│   ├── agents/          # Installed agent configurations
│   ├── templates/       # Custom agent templates
│   ├── config.json      # Project configuration
│   └── README.md        # Agent documentation
└── ... your project files

Features

  • Smart Project Detection: Automatically identifies your tech stack
  • Curated Agent Library: 25+ specialized agents for different technologies
  • Project-Specific: Each project gets its own agent configuration
  • Easy Management: Add, remove, or update agents as your project evolves
  • Custom Agents: Create project-specific custom agents
  • Git-Friendly: .claude/ directory can be gitignored or committed
  • Serena Integration: Optional semantic code analysis for improved context

Commands

Initialization

# Initialize with auto-detection
npx sub-agents init

# Interactive initialization
npx sub-agents init --interactive

# Force re-initialization
npx sub-agents init --force

Agent Management

# List installed agents
npx sub-agents list

# Install additional agents (interactive by default)
npx sub-agents install
npx sub-agents install --agents=docker-specialist,kubernetes-operator

# Remove agents
npx sub-agents uninstall --agents=agent-name

# Update agents
npx sub-agents update --all

Discovery Commands

  • npx sub-agents categories - List all available agent categories
  • npx sub-agents search <query> - Search for agents
  • npx sub-agents info <agent-name> - Show agent details

Development Commands

  • npx sub-agents create - Create new agent definition
  • npx sub-agents template - Generate agent template
  • npx sub-agents validate - Validate agent files
  • npx sub-agents publish - Publish custom agents

Configuration

  • npx sub-agents config - Manage configuration

Integration Management

  • npx sub-agents integrations - Manage optional integrations
  • npx sub-agents integrations --list - List available integrations
  • npx sub-agents integrations --status - Show integration status
  • npx sub-agents integrations --install serena - Install Serena integration
  • npx sub-agents integrations --refresh - Refresh Serena index

Agent Categories

View all categories with npx sub-agents categories

  • Generic: Senior engineers, architects, managers, QA specialists
  • Frontend: React, Vue, Angular, Svelte, Next.js specialists
  • Backend: Express, Django, Rails, Spring, FastAPI experts
  • Cloud/DevOps: AWS, Docker, Kubernetes, Terraform engineers
  • Database: PostgreSQL, MongoDB, MySQL, Redis specialists
  • AI/ML: PyTorch, TensorFlow, Hugging Face researchers
  • Automation: n8n, Zapier, Make workflow builders

Creating Custom Agents

  1. Generate a template:
npx sub-agents template -o my-agent.md
  1. Edit the template with your agent definition

  2. Validate your agent:

npx sub-agents validate --path=my-agent.md
  1. Install locally for testing:
npx sub-agents install --agents=my-agent --path=.
  1. Publish to registry:
npx sub-agents publish my-agent.md

Configuration

Claude Agents can be configured globally or per-project:

# Set default registry
npx sub-agents config set registry https://registry.sub-agents.io

# Enable auto-updates
npx sub-agents config set autoUpdate true

# View all settings
npx sub-agents config list

Project Structure

Agents are stored in:

  • Global: ~/.claude/agents/
  • Project: .claude/agents/

Serena Integration

Sub-Agents offers optional integration with Serena, a semantic code analysis tool that enhances Claude Code's understanding of your codebase.

Benefits of Serena

  • Semantic Code Analysis: Understands code relationships and structure
  • Optimized Token Usage: Fetches only relevant context to reduce costs
  • Project Memory: Maintains knowledge about your project structure
  • Better Code Navigation: Quickly finds related code across your project

Setup Serena

Prerequisites

Before enabling Serena, ensure you have:

  • Claude CLI: Required for MCP configuration (installation guide)
  • UV Tool: Required for Python packages (curl -LsSf https://astral.sh/uv/install.sh | sh)

Installation

During init or install, you'll be offered three options:

  1. Recommended: Automatically installs Serena (if prerequisites are met)
  2. Custom: Choose which integrations to install
  3. Skip: Continue without integrations

You can also set up Serena anytime with:

npx sub-agents integrations --install serena

If prerequisites are missing, sub-agents will:

  • Detect missing tools automatically
  • Provide installation instructions
  • Save your preference for later
  • Allow you to retry once tools are installed

Using Serena

Once installed, Serena works automatically with Claude Code. To interact with it:

  • Say "read Serena's initial instructions"
  • Use /mcp__serena__initial_instructions
  • View dashboard at http://127.0.0.1:24282/dashboard/index.html

Agent Definition Format

Agents are defined as Markdown files with YAML frontmatter:

---
name: my-agent
category: backend
description: Brief description
version: 1.0.0
author: Your Name
license: MIT
tools:
  - Read
  - Write
  - Bash
tags:
  - nodejs
  - api
---

# Agent Name

Detailed description and documentation...

Contributing

Contributions are welcome! Please read our contributing guidelines.

License

MIT License - see LICENSE file for details