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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@hhopkins/claude-entity-manager

v0.2.4

Published

Unified service for discovering, loading, and managing Claude Code entities (skills, commands, agents, hooks) and plugins

Readme

@hhopkins/claude-entity-manager

A unified service for discovering, loading, and managing Claude Code entities (skills, commands, agents, hooks) and plugins.

Installation

npm install @hhopkins/claude-entity-manager

Quick Start

import { ClaudeEntityManager } from "@hhopkins/claude-entity-manager";

const manager = new ClaudeEntityManager({
  projectDir: process.cwd(),
});

// Load all entities from enabled plugins
const config = await manager.loadAllEntities();
console.log(`Found ${config.skills.length} skills`);
console.log(`Found ${config.commands.length} commands`);
console.log(`Found ${config.agents.length} agents`);
console.log(`Found ${config.hooks.length} hooks`);

Features

  • Load entities from global ~/.claude/, project ./.claude/, and enabled plugins
  • Discover plugins from marketplaces, cache, and registry
  • Skills collections support - marketplaces with skills at root level (like anthropic-agent-skills)
  • Read/write plugin states (enable/disable via settings.json)
  • Install plugins/marketplaces from GitHub, git URLs, or local directories
  • Aggregate entities respecting plugin enable/disable states

API

Constructor Options

interface ClaudeEntityManagerOptions {
  /** Custom Claude config directory (default: ~/.claude) */
  claudeDir?: string;
  /** Project directory for project-local entities */
  projectDir?: string;
  /** Whether to include disabled plugins (default: false) */
  includeDisabled?: boolean;
}

Entity Loading

// Load all entities
const config = await manager.loadAllEntities();

// Load from specific plugin
const pluginConfig = await manager.loadPluginEntities("plugin-name@marketplace");

// Load specific entity types
const skills = await manager.loadSkills();
const commands = await manager.loadCommands();
const agents = await manager.loadAgents();
const hooks = await manager.loadHooks();

// Filter by plugin
const pluginSkills = await manager.loadSkills({ pluginId: "plugin@marketplace" });

Plugin Discovery

// Discover all plugins
const plugins = await manager.discoverPlugins();

// Get specific plugin
const plugin = await manager.getPlugin("plugin-name@marketplace");

// Get marketplaces
const marketplaces = await manager.getMarketplaces();

Plugin Enable/Disable

// Check status
const enabled = await manager.isPluginEnabled("plugin@marketplace");

// Enable/disable
await manager.enablePlugin("plugin@marketplace");
await manager.disablePlugin("plugin@marketplace");

// Toggle
const newState = await manager.togglePlugin("plugin@marketplace");

Plugin Installation

// Install from various sources
await manager.installPlugin("owner/repo"); // GitHub short format
await manager.installPlugin("https://github.com/owner/repo"); // GitHub URL
await manager.installPlugin("./local/path"); // Local directory
await manager.installPlugin("plugin@marketplace"); // From marketplace

// With options
await manager.installPlugin("owner/repo", { force: true }); // Force reinstall
await manager.installPlugin("owner/repo", { update: true }); // Update existing

// Install marketplace
await manager.installMarketplace("owner/repo", "marketplace-name");

// Update plugins
await manager.updatePlugin("plugin@marketplace");
await manager.updateAllPlugins();

// Uninstall
await manager.uninstallPlugin("plugin@marketplace");

Registry Access

// Get registries
const registry = await manager.getPluginRegistry();
const settings = await manager.getSettings();

Entity Types

Skill

interface Skill {
  name: string;
  path: string;
  source: EntitySource;
  description: string;
  version?: string;
  content: string;
  metadata: SkillMetadata;
  files: string[];
  fileContents?: Record<string, string>;
}

Command

interface Command {
  name: string;
  path: string;
  source: EntitySource;
  description?: string;
  content: string;
  metadata: CommandMetadata;
}

Agent

interface Agent {
  name: string;
  path: string;
  source: EntitySource;
  description?: string;
  content: string;
  metadata: AgentMetadata;
}

Hook

interface Hook {
  name: string;
  path: string;
  source: EntitySource;
  hooks: Partial<Record<HookEvent, HookMatcher[]>>;
}

Plugin

interface Plugin {
  id: string; // "plugin-name@marketplace" or "plugin-name"
  name: string;
  marketplace?: string;
  description?: string;
  version?: string;
  source: PluginSource;
  path: string;
  enabled: boolean;
  skillCount: number;
  commandCount: number;
  agentCount: number;
  hookCount: number;
  hasMcpServers: boolean;
  installInfo?: InstalledPluginInfo;
}

File Locations

| File | Purpose | |------|---------| | ~/.claude/plugins/installed_plugins.json | Plugin registry | | ~/.claude/plugins/known_marketplaces.json | Marketplace registry | | ~/.claude/settings.json | Global settings (plugin enable/disable) | | ./.claude/settings.json | Project settings (overrides global) | | ~/.claude/skills/*/SKILL.md | Global skills | | ~/.claude/commands/*.md | Global commands | | ~/.claude/agents/*.md | Global agents | | ~/.claude/hooks/*.json | Global hooks |

License

MIT