claude-skills-activation
v1.0.0
Published
CLI tool to initialize Claude Code skill activation system with hooks
Maintainers
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.jsonwithout 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-activationGlobal Installation
npm install -g claude-skills-activation
claude-skills-activationLocal Installation
npm install claude-skills-activation
npx claude-skills-activationUsage
- Navigate to your Claude Code project directory
- Run the command:
npx claude-skills-activation - Follow the prompts
- 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.jsonHow It Works
Phase 1: Environment Validation
- Checks if
claude-codeis installed - Verifies
.claude/directory exists or offers to create it
Phase 2: File Creation
- Copies
skill-rules.jsonwith pre-configured skill triggers - Installs
skill-developerdocumentation - 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
UserPromptSubmithook 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
- Restart Claude Code
- Verify
.claude/settings.jsoncontains the hook configuration - Check that
.claude/hooks/skill-activation-prompt.shis executable:ls -la .claude/hooks/*.sh
Dependency Installation Failed
Manually install dependencies:
cd .claude/hooks
npm installDevelopment
Building from Source
git clone <repository>
cd claude-skills-activation-package
npm install
npm run buildTesting Locally
npm link
cd /path/to/test/project
claude-skills-activationLicense
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
For issues and questions:
- Check
.claude/skills/skill-developer/TROUBLESHOOTING.mdafter 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
