Automating Tasks with Skills
You've seen how Claude Code can follow your instructions to analyze data and generate reports. Now, imagine saving those instructions so you don't have to write them out every time. By the end of this lesson, you'll be able to create and run skills in Claude Code to automate repetitive tasks.
Core idea
A skill is a saved prompt that you can run with a single command in Claude Code. Think of it like a shortcut for a complex task. Instead of re-writing the same instructions repeatedly, you save them as a .md file within your project's .claude/skills/ directory. Then, you can execute that skill by typing /{skill_name} in Claude Code. This saves time and ensures consistency in your workflows.
Skills are stored as .md files within your project's .claude/skills/{skill_name}/ directory. Each skill has its own folder containing a SKILL.md file.
Example
Let's create a skill that analyzes meeting transcripts for key decisions, open questions, and problems.
Task: Create a skill called meeting-analysis.
- In Claude Code, enter the following prompt:
- Claude Code will ask clarifying questions to refine the skill. Answer them based on your desired outcome.
- Once the skill is created, restart Claude Code by typing
/quitthenclaude. - Run the skill by typing
/meeting-analysis.
Now, Claude Code will analyze the transcripts in your calls/ folder and generate a report in report.md.
Common mistakes
- Forgetting to restart Claude Code: If you create a new skill in the current session, you need to restart Claude Code for it to recognize the new skill.
- Incorrect file paths: Double-check that the file paths specified in your skill are correct. Claude Code won't be able to find the files if the paths are wrong.
- Overly complex prompts: Start with a simple skill and gradually add complexity as needed. This makes it easier to debug and maintain.
Key takeaways
- Skills are saved prompts that automate repetitive tasks in Claude Code.
- Skills are stored as
.mdfiles in the.claude/skills/{skill_name}/directory. - You can run a skill by typing
/{skill_name}in Claude Code. - Skills save time and ensure consistency in your workflows.
- Restart Claude Code after creating a new skill.
The student marks this lesson as read to continue. (Knowledge checks coming later.)