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): “`markdown name: pr-code-review description: Step-by-step code review checklist for pull requests triggers: When reviewing a PR, check in this order: 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. A developer writes a documentation generation Skill for his team. First draft triggers: ["write docs", "document this", "add documentation"]. He tests it: it activates when he asks Claude to "document why we chose this architecture" – not a documentation generation task, more of an inline comment. He refines: ["generate API docs", "write JSDoc", "document this function", "add docstring"]. Much more specific. The refined triggers activate for documentation generation tasks and not for incidental documentation discussions. Skills containing security-sensitive instructions (credential handling, authentication workflows, data access patterns) should be reviewed by a security-aware team member before distribution. A poorly-written security Skill that Claude follows incorrectly can introduce consistent security issues across a team's code – the opposite of its intended effect. Log in and enroll to access lesson quizzes.
Lesson 2: Writing Effective Skills
Lesson Objectives
Lesson Content
PR Code Review Checklist
["review this PR", "code review", "review this code", "check this diff", "review my changes"] – multiple phrasings of the same intent.Practical Example
Safety Notes