Chuyển đến nội dung
Skillpedia
Agent48k · #5792

skill-developer

Skill này làm gì

Hướng dẫn này dạy cách tạo và quản lý các “skill” (công cụ) cho AI Claude Code. Nó giải thích cách làm cho AI gợi ý hoặc thậm chí ngăn chặn một số hành động, theo các thực hành tốt nhất.

Khi nào nên dùng

  • ✓Khi bạn muốn dạy AI cách tạo công cụ mới.
  • ✓Khi bạn muốn hiểu cách AI quyết định khi nào dùng một công cụ.
  • ✓Khi bạn điều chỉnh các quy tắc để AI dùng đúng công cụ.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/skill-developer/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/skill-developer/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Làm sao để tạo một công cụ mới cho AI Claude Code?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Hệ thống dùng các “hook”, giống như bộ kích hoạt. Một hook kiểm tra điều bạn yêu cầu trước khi AI trả lời và gợi ý công cụ. Hook khác giúp AI ghi nhớ các thực hành tốt sau khi hoàn thành việc.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Skill Developer Guide

Purpose

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.

When to Use This Skill

Automatically activates when you mention:

  • Creating or adding skills
  • Modifying skill triggers or rules
  • Understanding how skill activation works
  • Debugging skill activation issues
  • Working with skill-rules.json
  • Hook system mechanics
  • Claude Code best practices
  • Progressive disclosure
  • YAML frontmatter
  • 500-line rule

System Overview

Two-Hook Architecture

1. UserPromptSubmit Hook (Proactive Suggestions)

  • File: .claude/hooks/skill-activation-prompt.ts
  • Trigger: BEFORE Claude sees user's prompt
  • Purpose: Suggest relevant skills based on keywords + intent patterns
  • Method: Injects formatted reminder as context (stdout → Claude's input)
  • Use Cases: Topic-based skills, implicit work detection

2. Stop Hook - Error Handling Reminder (Gentle Reminders)

  • File: .claude/hooks/error-handling-reminder.ts
  • Trigger: AFTER Claude finishes responding
  • Purpose: Gentle reminder to self-assess error handling in code written
  • Method: Analyzes edited files for risky patterns, displays reminder if needed
  • Use Cases: Error handling awareness without blocking friction

Philosophy 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.

Configuration File

Location: .claude/skills/skill-rules.json

Defines:

  • All skills and their trigger conditions
  • Enforcement levels (block, suggest, warn)
  • File path patterns (glob)
  • Content detection patterns (regex)
  • Skip conditions (session tracking, file markers, env vars)

Skill Types

1. Guardrail Skills

Purpose: Enforce critical best practices that prevent errors

Characteristics:

  • Type: "guardrail"
  • Enforcement: "block"
  • Priority: "critical" or "high"
  • Block file edits until skill used
  • Prevent common mistakes (column names, critical errors)
  • Session-aware (don't repeat nag in same session)

Examples:

  • database-verification - Verify table/column names before Prisma queries
  • frontend-dev-guidelines - Enforce React/TypeScript patterns

When to Use:

  • Mistakes that cause runtime errors
  • Data integrity concerns
  • Critical compatibility issues

2. Domain Skills

Purpose: Provide comprehensive guidance for specific areas

Characteristics:

  • Type: "domain"
  • Enforcement: "suggest"
  • Priority: "high" or "medium"
  • Advisory, not mandatory
  • Topic or domain-specific
  • Comprehensive documentation

Examples:

  • backend-dev-guidelines - Node.js/Express/TypeScript patterns
  • frontend-dev-guidelines - React/TypeScript best practices
  • error-tracking - Sentry integration guidance

When to Use:

  • Complex systems requiring deep knowledge
  • Best practices documentation
  • Architectural patterns
  • How-to guides

Quick Start: Creating a New Skill

Step 1: Create Skill File

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:

  • ✅ Name: Lowercase, hyphens, gerund form (verb + -ing) preferred
  • ✅ Description: Include ALL trigger keywords/phrases (max 1024 chars)
  • ✅ Content: Under 500 lines - use reference files for details
  • ✅ Examples: Real code examples
  • ✅ Structure: Clear headings, lists, code blocks

Step 2: Add to skill-rules.json

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"]
    }
  }
}

Step 3: Test Triggers

Test UserPromptSubmit:

echo '{"session_id":"test","prompt":"your test prompt"}' | \

…
Câu hỏi thường gặp

Skill là gì?

“Skill” giống như các chỉ dẫn hoặc công cụ nhỏ bạn đưa cho Claude Code để nó giúp bạn tốt hơn. Chúng có thể dùng để hướng dẫn AI hoặc đảm bảo AI tuân theo một số quy tắc.

Quy tắc 500 dòng là gì?

Đó là khuyến nghị giữ nội dung chính của mỗi skill ngắn gọn, dưới 500 dòng, để dễ hiểu và dễ dùng hơn.

Khác nhau giữa skill “Guardrail” và “Domain” là gì?

Skill “Guardrail” ngăn các lỗi nghiêm trọng và là bắt buộc. Skill “Domain” đưa ra hướng dẫn và gợi ý về một chủ đề cụ thể, nhưng không bắt buộc.

Chi tiết

Mô tả gốc của tác giả

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.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#5792
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự