skill-developer by sickn33/antigravity-awesome-skills
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill skill-developer在 Claude Code 中创建和管理技能的综合指南,包含自动激活系统,遵循 Anthropic 的官方最佳实践,包括 500 行规则和渐进式披露模式。
当您提及以下内容时自动激活:
1. UserPromptSubmit Hook (主动建议)
.claude/hooks/skill-activation-prompt.ts2. Stop Hook - 错误处理提醒 (温和提醒)
.claude/hooks/error-handling-reminder.ts广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
理念变更 (2025-10-27): 我们不再使用阻塞 PreToolUse 的方式来进行 Sentry/错误处理。相反,我们使用温和的响应后提醒,这种方式不会阻塞工作流,但能保持代码质量意识。
位置 : .claude/skills/skill-rules.json
定义:
目的: 强制执行防止错误的关键最佳实践
特点:
"guardrail""block""critical" 或 "high"示例:
database-verification - 在 Prisma 查询前验证表/列名frontend-dev-guidelines - 强制执行 React/TypeScript 模式何时使用:
目的: 为特定领域提供全面的指导
特点:
"domain""suggest""high" 或 "medium"示例:
backend-dev-guidelines - Node.js/Express/TypeScript 模式frontend-dev-guidelines - React/TypeScript 最佳实践error-tracking - Sentry 集成指导何时使用:
位置: .claude/skills/{skill-name}/SKILL.md
模板:
---
name: my-new-skill
description: 简要描述,包括触发此技能的关键词。提及主题、文件类型和使用场景。明确说明触发术语。
---
# 我的新技能
## 目的
此技能帮助解决的问题
## 何时使用
具体场景和条件
## 关键信息
实际的指导、文档、模式、示例
最佳实践:
完整模式请参见 SKILL_RULES_REFERENCE.md。
基础模板:
{
"my-new-skill": {
"type": "domain",
"enforcement": "suggest",
"priority": "medium",
"promptTriggers": {
"keywords": ["keyword1", "keyword2"],
"intentPatterns": ["(create|add).*?something"]
}
}
}
测试 UserPromptSubmit:
echo '{"session_id":"test","prompt":"your test prompt"}' | \
npx tsx .claude/hooks/skill-activation-prompt.ts
测试 PreToolUse:
cat <<'EOF' | npx tsx .claude/hooks/skill-verification-guard.ts
{"session_id":"test","tool_name":"Edit","tool_input":{"file_path":"test.ts"}}
EOF
基于测试结果:
✅ 保持 SKILL.md 少于 500 行 ✅ 使用渐进式披露和参考文件 ✅ 为超过 100 行的参考文件添加目录 ✅ 编写包含触发关键词的详细描述 ✅ 在记录文档前使用 3 个以上真实场景进行测试 ✅ 根据实际使用情况进行迭代
示例: 数据库列名验证
示例: 前端开发指南
很少使用 - 大多数技能要么是 BLOCK,要么是 SUGGEST。
目的: 在同一会话中不重复提醒
工作原理:
状态文件: .claude/hooks/state/skills-used-{session_id}.json
目的: 对已验证的文件永久跳过
标记: // @skip-validation
用法:
// @skip-validation
import { PrismaService } from './prisma';
// 此文件已手动验证
注意: 谨慎使用 - 如果过度使用会失去其意义
目的: 紧急禁用,临时覆盖
全局禁用:
export SKIP_SKILL_GUARDRAILS=true # 禁用所有 PreToolUse 阻止
特定技能禁用:
export SKIP_DB_VERIFICATION=true
export SKIP_ERROR_REMINDER=true
创建新技能时,请验证:
.claude/skills/{name}/SKILL.md 中创建skill-rules.jsonjq . skill-rules.json有关特定主题的详细信息,请参见:
所有触发器类型的完整指南:
完整的 skill-rules.json 模式:
Hook 内部机制的深入探讨:
全面的调试指南:
即用型模式集合:
未来增强功能和想法:
.claude/skills/{name}/SKILL.md.claude/skills/skill-rules.json 添加条目npx tsx 命令进行测试完整详情请参见 TRIGGER_TYPES.md。
// @skip-validation (永久跳过)SKIP_SKILL_GUARDRAILS (紧急禁用)✅ 500 行规则 : 保持 SKILL.md 少于 500 行 ✅ 渐进式披露 : 使用参考文件获取详细信息 ✅ 目录 : 为超过 100 行的参考文件添加目录 ✅ 一级深度 : 不要深度嵌套引用 ✅ 丰富描述 : 包含所有触发关键词 (最多 1024 个字符) ✅ 先测试 : 在编写大量文档前构建 3 个以上评估 ✅ 动名词命名 : 优先使用动词 + -ing (例如 "processing-pdfs")
手动测试 Hook:
# UserPromptSubmit
echo '{"prompt":"test"}' | npx tsx .claude/hooks/skill-activation-prompt.ts
# PreToolUse
cat <<'EOF' | npx tsx .claude/hooks/skill-verification-guard.ts
{"tool_name":"Edit","tool_input":{"file_path":"test.ts"}}
EOF
完整调试指南请参见 TROUBLESHOOTING.md。
配置:
.claude/skills/skill-rules.json - 主配置.claude/hooks/state/ - 会话跟踪.claude/settings.json - Hook 注册Hook:
.claude/hooks/skill-activation-prompt.ts - UserPromptSubmit.claude/hooks/error-handling-reminder.ts - Stop 事件 (温和提醒)所有技能:
.claude/skills/*/SKILL.md - 技能内容文件技能状态 : 完成 - 已根据 Anthropic 最佳实践重构 ✅ 行数 : < 500 (遵循 500 行规则) ✅ 渐进式披露 : 使用参考文件获取详细信息 ✅
下一步 : 创建更多技能,根据使用情况优化模式
每周安装次数
326
仓库
GitHub 星标数
27.4K
首次出现
2026 年 1 月 19 日
安全审计
安装于
gemini-cli267
opencode265
claude-code258
antigravity237
codex231
cursor222
Comprehensive guide for creating and managing skills in Claude Code with auto-activation system, following Anthropic's official best practices including the 500-line rule and progressive disclosure pattern.
Automatically activates when you mention:
1. UserPromptSubmit Hook (Proactive Suggestions)
.claude/hooks/skill-activation-prompt.ts2. Stop Hook - Error Handling Reminder (Gentle Reminders)
.claude/hooks/error-handling-reminder.tsPhilosophy Change (2025-10-27): We moved away from blocking PreToolUse for Sentry/error handling. Instead, use gentle post-response reminders that don't block workflow but maintain code quality awareness.
Location : .claude/skills/skill-rules.json
Defines:
Purpose: Enforce critical best practices that prevent errors
Characteristics:
"guardrail""block""critical" or "high"Examples:
database-verification - Verify table/column names before Prisma 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 practiceserror-tracking - Sentry integration guidanceWhen to Use:
Location: .claude/skills/{skill-name}/SKILL.md
Template:
---
name: my-new-skill
description: Brief description including keywords that trigger this skill. Mention topics, file types, and use cases. Be explicit about trigger terms.
---
# My New Skill
## Purpose
What this skill helps with
## When to Use
Specific scenarios and conditions
## Key Information
The actual guidance, documentation, patterns, examples
Best Practices:
See SKILL_RULES_REFERENCE.md for complete schema.
Basic Template:
{
"my-new-skill": {
"type": "domain",
"enforcement": "suggest",
"priority": "medium",
"promptTriggers": {
"keywords": ["keyword1", "keyword2"],
"intentPatterns": ["(create|add).*?something"]
}
}
}
Test UserPromptSubmit:
echo '{"session_id":"test","prompt":"your test prompt"}' | \
npx tsx .claude/hooks/skill-activation-prompt.ts
Test PreToolUse:
cat <<'EOF' | npx tsx .claude/hooks/skill-verification-guard.ts
{"session_id":"test","tool_name":"Edit","tool_input":{"file_path":"test.ts"}}
EOF
Based on testing:
✅ Keep SKILL.md under 500 lines ✅ Use progressive disclosure with reference files ✅ Add table of contents to reference files > 100 lines ✅ Write detailed description with trigger keywords ✅ Test with 3+ real scenarios before documenting ✅ Iterate based on actual usage
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:
State File: .claude/hooks/state/skills-used-{session_id}.json
Purpose: Permanent skip for verified files
Marker: // @skip-validation
Usage:
// @skip-validation
import { PrismaService } from './prisma';
// This file has been manually verified
NOTE: Use sparingly - defeats the purpose if overused
Purpose: Emergency disable, temporary override
Global disable:
export SKIP_SKILL_GUARDRAILS=true # Disables ALL PreToolUse blocks
Skill-specific:
export SKIP_DB_VERIFICATION=true
export SKIP_ERROR_REMINDER=true
When creating a new skill, verify:
.claude/skills/{name}/SKILL.mdskill-rules.jsonjq . skill-rules.jsonFor detailed information on specific topics, see:
Complete guide to all trigger types:
Complete skill-rules.json schema:
Deep dive into hook internals:
Comprehensive debugging guide:
Ready-to-use pattern collection:
Future enhancements and ideas:
.claude/skills/{name}/SKILL.md with frontmatter.claude/skills/skill-rules.jsonnpx tsx commandsSee TRIGGER_TYPES.md for complete details.
// @skip-validation (permanent skip)SKIP_SKILL_GUARDRAILS (emergency disable)✅ 500-line rule : Keep SKILL.md under 500 lines ✅ Progressive disclosure : Use reference files for details ✅ Table of contents : Add to reference files > 100 lines ✅ One level deep : Don't nest references deeply ✅ Rich descriptions : Include all trigger keywords (max 1024 chars) ✅ Test first : Build 3+ evaluations before extensive documentation ✅ Gerund naming : Prefer verb + -ing (e.g., "processing-pdfs")
Test hooks manually:
# UserPromptSubmit
echo '{"prompt":"test"}' | npx tsx .claude/hooks/skill-activation-prompt.ts
# PreToolUse
cat <<'EOF' | npx tsx .claude/hooks/skill-verification-guard.ts
{"tool_name":"Edit","tool_input":{"file_path":"test.ts"}}
EOF
See TROUBLESHOOTING.md for complete debugging guide.
Configuration:
.claude/skills/skill-rules.json - Master configuration.claude/hooks/state/ - Session tracking.claude/settings.json - Hook registrationHooks:
.claude/hooks/skill-activation-prompt.ts - UserPromptSubmit.claude/hooks/error-handling-reminder.ts - Stop event (gentle reminders)All Skills:
.claude/skills/*/SKILL.md - Skill content filesSkill Status : COMPLETE - Restructured following Anthropic best practices ✅ Line Count : < 500 (following 500-line rule) ✅ Progressive Disclosure : Reference files for detailed information ✅
Next : Create more skills, refine patterns based on usage
Weekly Installs
326
Repository
GitHub Stars
27.4K
First Seen
Jan 19, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli267
opencode265
claude-code258
antigravity237
codex231
cursor222
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
105,000 周安装