agent-sql-pro
Expert SQL developer specializing in complex query optimization, database design, and performance tuning across PostgreSQL,…
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
$ npx -y skills add xiaoyuge886/aigc --skill writing-rules --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/writing-rulesContext preview
The summary Claude sees to decide when to auto-load this skill.
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
name: writing-hookify-rules description: This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns. version: 0.1.0
Hookify rules are markdown files with YAML frontmatter that define patterns to watch for and messages to show when those patterns match. Rules are stored in `.claude/hookify.{rule-name}.local.md` files.
--- name: rule-identifier enabled: true event: bash|file|stop|prompt|all pattern: regex-pattern-here --- Message to show Claude when this rule triggers. Can include markdown formatting, warnings, suggestions, etc.
**name** (required): Unique identifier for the rule
**enabled** (required): Boolean to activate/deactivate
**event** (required): Which hook event to trigger on
**action** (optional): What to do when rule matches
**pattern** (simple format): Regex pattern to match
**Example:**
event: bash pattern: rm\s+-rf
For complex rules with multiple conditions:
---
name: warn-env-file-edits
enabled: true
event: file
conditions:
- field: file_path
operator: regex_match
pattern: \.env$
- field: new_text
operator: contains
pattern: API_KEY
---
You're adding an API key to a .env file. Ensure this file is in .gitignore!**Condition fields:**
**All conditions must match for rule to trigger.**
The markdown content after frontmatter is shown to Claude when the rule triggers.
**Good messages:**
**Example:**
⚠️ **Console.log detected!** You're adding console.log to production code. **Why this matters:** - Debug logs shouldn't ship to production - Console.log can expose sensitive data - Impacts browser performance **Alternatives:** - Use a proper logging library - Remove before committing - Use conditional debug builds
Match Bash command patterns:
--- event: bash pattern: sudo\s+|rm\s+-rf|chmod\s+777 --- Dangerous command detected!
**Common patterns:**
Match Edit/Write/MultiEdit operations:
--- event: file pattern: console\.log\(|eval\(|innerHTML\s*= --- Potentially problematic code pattern detected!
**Match on different fields:**
---
event: file
conditions:
- field: file_path
operator: regex_match
pattern: \.tsx?$
- field: new_text
operator: regex_match
pattern: console\.log\(
---
Console.log in TypeScript file!**Common patterns:**
Match when agent wants to stop (completion checks):
--- event: stop pattern: .* --- Before stopping, verify: - [ ] Tests were run - [ ] Build succeeded - [ ] Documentation updated
**Use for:**
Match user prompt content (advanced):
---
event: prompt
conditions:
- field: user_prompt
operator: contains
pattern: deploy to production
---
Production deployment checklist:
- [ ] Tests passing?
- [ ] Reviewed by team?
- [ ] Monitoring ready?**Literal characters:** Most characters match themselves
**Special characters need escaping:**
**Common metacharacters:**
**Examples:**
rm\s+-rf Matches: rm -rf, rm -rf console\.log\( Matches: console.log( (eval|exec)\( Matches: eval( or exec( chmod\s+777 Matches: chmod 777, chmod 777 API_KEY\s*= Matches: API_KEY=, API_KEY =
Test regex patterns before using:
python3 -c "import re; print(re.search(r'your_pattern', 'test text'))"
Or use online regex testers (regex101.com with Python flavor).
**Too broad:**
pattern: log # Matches "log", "login", "
Expert SQL developer specializing in complex query optimization, database design, and performance tuning across PostgreSQL,…
Perform data analysis tasks including data cleaning, statistical analysis, visualization, and insight generation. Use when the…
Single source of truth and librarian for ALL Claude official documentation. Manages local documentation storage, scraping,…
ECharts数据可视化专家,能够根据数据和分析需求生成专业的ECharts图表配置。适用于:数据可视化、图表生成、数据展示、趋势分析图表、对比图表、分布图表、饼图、柱状图、折线图、散点图、雷达图、热力图、仪表盘、漏斗图、树形图、关系图、桑基图、数据报表图表、…
Transform UI style requirements into production-ready frontend code with systematic design tokens, accessibility compliance, and…
综合智能代理系统,整合任务分析、规划和ReAct执行循环能力。当用户需要处理复杂任务、多步骤工作流或需要自主决策和反思的任务时使用。