Building Reusable Claude Code Skills By the end of this lesson, students should be able to: Skill file structure. A Skill is a markdown file with a frontmatter header and instruction content (verify current format at docs.anthropic.com/en/docs/claude-code): — ## PR Code Review Checklist When reviewing a PR, check in this order: 1. **Security**: Input validation on user-supplied data, authentication/authorization checks, no hardcoded credentials For each item: pass, flag for discussion, or request change. Writing effective triggers. Triggers are the phrases or conditions that activate the Skill. Effective triggers: For a code review Skill: Instruction structure for Skills. Structure Skill instructions as procedural guidance Claude follows: Common Skill writing mistakes. Enroll to continue this lesson. The preview above shows the lesson objectives and opening lesson content. Enroll to view the full lesson, complete the practice work, and take the lesson quiz.
Lesson 2: Writing Effective Skills
Lesson Objectives
Lesson Content
name: pr-code-review
description: Step-by-step code review checklist for pull requests
triggers:
– "review this PR"
– "review this code"
– "code review"
– "check this diff"
—
2. **Test coverage**: Are the happy path and error cases covered? Do tests test behavior or implementation?
3. **Error handling**: Are errors caught and handled or propagated appropriately?
4. **Readability**: Variable names, function names, and logic are clear without comments
5. **Performance**: Are there obvious N+1 queries, unnecessary re-computation, or missing indexes?["review this PR", "code review", "review this code", "check this diff", "review my changes"] – multiple phrasings of the same intent.
