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

claude-skills-activation

v1.0.0

Published

CLI tool to initialize Claude Code skill activation system with hooks

Readme

Claude Skills Activation

A CLI tool to initialize the Claude Code skill activation system with hooks.

Overview

This package sets up an automated skill activation system for Claude Code that intelligently suggests relevant skills based on your prompts, file changes, and project context. It installs hooks that monitor your interactions and automatically recommend the right skills at the right time.

Features

  • 🔍 Environment Validation: Checks for Claude Code installation and project setup
  • 📁 Automatic Directory Creation: Sets up required .claude/ structure
  • 📝 File Scaffolding: Copies all necessary configuration and hook files
  • ⚙️ Smart Settings Merge: Intelligently updates .claude/settings.json without overwriting
  • 📦 Package Manager Detection: Automatically detects and uses npm, pnpm, or yarn
  • 🔐 Permission Management: Makes hook scripts executable
  • 🎯 Pre-configured Skills: Includes skill-developer skill with comprehensive documentation

Installation

Quick Start

Run directly with npx (no installation required):

npx claude-skills-activation

Global Installation

npm install -g claude-skills-activation
claude-skills-activation

Local Installation

npm install claude-skills-activation
npx claude-skills-activation

Usage

  1. Navigate to your Claude Code project directory
  2. Run the command:
    npx claude-skills-activation
  3. Follow the prompts
  4. Restart Claude Code to activate the hooks

What Gets Installed

The tool creates the following structure in your project:

.claude/
├── settings.json (updated with hook configuration)
├── skills/
│   ├── skill-rules.json
│   └── skill-developer/
│       ├── SKILL.md
│       ├── SKILL_RULES_REFERENCE.md
│       ├── TRIGGER_TYPES.md
│       ├── HOOK_MECHANISMS.md
│       ├── PATTERNS_LIBRARY.md
│       ├── ADVANCED.md
│       └── TROUBLESHOOTING.md
└── hooks/
    ├── skill-activation-prompt.sh
    ├── skill-activation-prompt.ts
    ├── package.json
    └── tsconfig.json

How It Works

Phase 1: Environment Validation

  • Checks if claude-code is installed
  • Verifies .claude/ directory exists or offers to create it

Phase 2: File Creation

  • Copies skill-rules.json with pre-configured skill triggers
  • Installs skill-developer documentation
  • Sets up TypeScript-based hook system
  • Asks before overwriting existing files

Phase 3: Settings Integration

  • Intelligently merges hook configuration into .claude/settings.json
  • Preserves existing settings
  • Adds UserPromptSubmit hook for skill activation

Phase 4: Installation & Verification

  • Detects your package manager (npm/pnpm/yarn)
  • Installs hook dependencies
  • Makes shell scripts executable
  • Verifies permissions

Included Skills

skill-developer

A meta-skill that activates when you:

  • Mention "skill system" or "create skill"
  • Work with skill-rules.json
  • Ask about skill development

The skill provides comprehensive documentation on:

  • Creating custom skills
  • Defining trigger patterns
  • Understanding hook mechanisms
  • Best practices and troubleshooting

Customization

After initialization, you can customize the system:

Add More Skills

Edit .claude/skills/skill-rules.json to add your own skills:

{
  "skills": {
    "your-skill-name": {
      "type": "domain",
      "enforcement": "suggest",
      "priority": "high",
      "description": "Your skill description",
      "promptTriggers": {
        "keywords": ["keyword1", "keyword2"],
        "intentPatterns": ["regex.*pattern"]
      }
    }
  }
}

Modify Trigger Patterns

  • Add project-specific keywords
  • Define custom regex patterns for intent matching
  • Configure file path patterns for file-based triggers

Adjust Hook Behavior

Modify .claude/hooks/skill-activation-prompt.ts to customize:

  • Skill matching logic
  • Display format
  • Priority grouping
  • Action messages

Requirements

  • Node.js >= 16.0.0
  • Claude Code installed and in PATH
  • npm, pnpm, or yarn

Troubleshooting

"Claude Code not found"

Ensure Claude Code is installed and available in your PATH:

which claude-code

"Not in a Claude Code project"

Run the command from your project root where .claude/ should exist, or let the tool create it.

Hook Not Triggering

  1. Restart Claude Code
  2. Verify .claude/settings.json contains the hook configuration
  3. Check that .claude/hooks/skill-activation-prompt.sh is executable:
    ls -la .claude/hooks/*.sh

Dependency Installation Failed

Manually install dependencies:

cd .claude/hooks
npm install

Development

Building from Source

git clone <repository>
cd claude-skills-activation-package
npm install
npm run build

Testing Locally

npm link
cd /path/to/test/project
claude-skills-activation

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For issues and questions:

  • Check .claude/skills/skill-developer/TROUBLESHOOTING.md after installation
  • Review the documentation in .claude/skills/skill-developer/
  • File an issue on the repository

Credits

Created to enhance the Claude Code experience with intelligent skill activation.

Credits

  • GitHub: https://github.com/diet103/claude-code-infrastructure-showcase
  • User: diet103
  • I just created this package as a automated way to set up the skill activation system and all the credits should go to the user diet103