npx skills add ...
npx skills add grasmash/drupal-claude-skills --skill skill-developer
Create and manage Claude Code skills following Anthropic best practices and the agentskills.io specification. Use when creating new skills, understanding trigger patterns, debugging skill activation, or implementing progressive disclosure. Covers SKILL.md structure, YAML frontmatter schema, trigger types, enforcement levels, hook mechanisms, and progressive disclosure.
npx skills add grasmash/drupal-claude-skills --skill skill-developer
Comprehensive guide for creating and managing skills in Claude Code, following the Agent Skills Specification and Anthropic's best practices including the 500-line rule and progressive disclosure pattern.
Skills in this project follow the open Agent Skills Specification. Key requirements:
Required Fields:
| Field | Requirements |
|---|---|
name | 1-64 chars, lowercase alphanumeric + hyphens, must match directory name |
description | 1-1024 chars, include keywords for agent activation |
Optional Fields:
| Field | Purpose |
|---|---|
license | License for sharing skills publicly |
compatibility | Environment requirements (packages, network access) |
metadata | Key-value pairs for custom properties |
allowed-tools | Pre-approved tools list (experimental) |
Use skills-ref tool or validate manually:
SKILL.md (uppercase)Automatically activates when you mention:
There are several approaches to skill activation, from simple to advanced:
1. Description-Based Activation (Default)
2. Example Implementation: Hook-Based Activation
For more sophisticated activation, you can build a hook system. This is an advanced pattern:
UserPromptSubmit Hook (Proactive Suggestions)
Stop Hook (Gentle Reminders)
Configuration for Hook Systems:
A rules file (e.g., skill-rules.json) can define:
Purpose: Enforce critical best practices that prevent errors
Characteristics:
"guardrail""block""critical" or "high"Examples:
database-verification - Verify table/column names before queriesfrontend-dev-guidelines - Enforce React/TypeScript patternsWhen to Use:
Purpose: Provide comprehensive guidance for specific areas
Characteristics:
"domain""suggest""high" or "medium"Examples:
backend-dev-guidelines - Node.js/Express/TypeScript patternsfrontend-dev-guidelines - React/TypeScript best practicesdrupal-search-api - Search API configuration guidanceWhen to Use:
Location: skills/{skill-name}/SKILL.md
Template:
Best Practices (per agentskills.io spec):
references/ directory for detailsIf using a hook-based activation system, add rules:
Basic Template:
Verify your skill activates correctly:
Example: Database column name verification
Example: Frontend development guidelines
Rarely used - most skills are either BLOCK or SUGGEST.
Purpose: Don't nag repeatedly in same session
How it works:
Purpose: Permanent skip for verified files
Marker: // @skip-validation
Usage:
NOTE: Use sparingly - defeats the purpose if overused
Purpose: Emergency disable, temporary override
Global disable:
Skill-specific:
When creating a new skill, verify:
skills/{name}/SKILL.mdFor teams building sophisticated activation systems, consider:
These topics are documented in optional reference files:
TRIGGER_TYPES.md - Complete trigger type guideSKILL_RULES_REFERENCE.md - Rules schema documentationHOOK_MECHANISMS.md - Hook internals deep diveTROUBLESHOOTING.md - Debugging activation issuesPATTERNS_LIBRARY.md - Ready-to-use pattern collectionskills/{name}/SKILL.md with frontmatter// @skip-validation (permanent skip)SKIP_SKILL_GUARDRAILS (emergency disable)references/ directory for detailed docsTest skill activation by trying prompts that should and should not trigger the skill. Refine description keywords iteratively.
Deep-dive documentation for the hook-based activation pattern described above (the advanced, optional architecture — description-based activation needs none of this):
Configuration:
skills/*/SKILL.md - Skill content filesSpecification:
The hook-based activation architecture and the reference files above are adapted from diet103/claude-code-infrastructure-showcase (MIT License).
{
"my-new-skill": {
"type": "domain",
"enforcement": "suggest",
"priority": "medium",
"promptTriggers": {
"keywords": ["keyword1", "keyword2"],
"intentPatterns": ["(create|add).*?something"]
}
}
}// @skip-validation
import { PrismaService } from './prisma';
// This file has been manually verifiedexport SKIP_SKILL_GUARDRAILS=true # Disables ALL blocksexport SKIP_DB_VERIFICATION=true