Build Your Own Dev Agent — Lesson 5: Skills and Scheduling
A skill is a complete workflow defined in a single markdown file. A cron job triggers that skill on a schedule. Together, they turn your agent from reactive (waits for you) to proactive (works on its own).
Where You Are
your-project/
CLAUDE.md
.claude/
preferences.md
tasks-active.md
progress.txt
error-log.md
learnings.md
settings.json
hooks/
stop-telegram.sh
permission-gate.sh
See It: What Is a Skill
A skill is a SKILL.md file inside .claude/skills/{skill-name}/. It defines a complete workflow with four parts:
- Input -- What the skill reads before acting
- Process -- Step-by-step instructions for what to do
- Output -- What the skill produces
- State Update -- What files get updated when the skill finishes
Every skill follows the same structure. The daily planner reads your calendar and tasks, scores the day, and writes a summary. The git reviewer reads commit history and writes a digest. Different inputs and outputs, identical structure.
Skills are not code. They are instructions. Claude Code reads them and follows them. This means you can edit a skill by editing a markdown file. No redeployment. No compilation.
See It: How Scheduling Works
The cron-jobs.json file defines which skills run and when. Each entry specifies:
{
"id": "daily-planner",
"skill": ".claude/skills/daily-planner/SKILL.md",
"schedule": "33 17 * * *",
"description": "Daily review and scoring",
"enabled": true,
"expires": "7d"
}Key concept: cron jobs expire after 7 days. If your agent goes down and comes back up two weeks later, it will not have 14 days of stale cron jobs trying to execute. The heartbeat skill (lesson 09) renews all crons before they expire.
Note: cron-jobs.json is a convention file. Scheduling requires a running Claude Code session (lesson 10 covers persistence).
To run a scheduled skill, you tell Claude Code: "Run the daily-planner skill." Claude Code reads the SKILL.md file, follows the instructions, and updates state.
See It: Priority Levels
Not all tasks are equal. The priority map defines four levels:
- P0 — Critical / Blocking. Drop everything, act immediately, notify.
- P1 — High / Today. Process in current session.
- P2 — Medium / This week. Queue for next available slot.
- P3 — Low / Someday. Log and defer.
Invoked: the agent checks priority-map.md whenever it has multiple tasks to decide what comes first. The daily planner uses it when scoring the day. The meeting ingest skill uses it when assigning priority to extracted action items.
You also add tasks-completed.md — an append-only archive. Invoked: when a task finishes, the agent moves it here from tasks-active.md. The standup generator and daily planner read it to know what was done recently.
Build It: Priority Map + Completed Tasks
Two more state files. Describe what you need:
Prompt for Claude Code:
Create two files in .claude/:
1. priority-map.md — define 4 priority levels:
P0 (critical: production incidents, security — act immediately, notify),
P1 (high: due today — process now),
P2 (medium: due this week — queue),
P3 (low: backlog — track only).
Add decision rules: highest priority first, oldest within same level,
never skip P0 for P2.
2. tasks-completed.md — an append-only archive where finished tasks
move from tasks-active.md. Start empty.
Expected output: Two files in .claude/. The agent creates the format — review and adjust to match how you think about priorities.
Build It: Your First Skill -- Daily Planner
Intent: Create the daily planner skill that reviews the day and plans tomorrow.
Prompt for Claude Code:
Create the directory .claude/skills/daily-planner/ and then create
.claude/skills/daily-planner/SKILL.md with this content:
# Daily Planner Skill
Schedule: 5:33 PM daily
## Input
Read these files before processing:
- .claude/tasks-active.md -- current work
- .claude/tasks-completed.md -- what got done today
- .claude/progress.txt -- today's action log
- .claude/preferences.md -- user identity and calendar info
## Process
1. **Review Today**
- Count tasks completed today (from tasks-completed.md)
- Count tasks still active (from tasks-active.md)
- List key actions from progress.txt (today's entries only)
2. **Score the Day**
- Rate productivity 1-10 based on:
- Tasks completed vs planned
- P0/P1 items cleared
- Any blockers resolved
- Note what went well
- Note what could improve
3. **Plan Tomorrow**
- List carry-over tasks from tasks-active.md
- Identify top 3 priorities for tomorrow
- Flag any deadlines within 48 hours
4. **Generate Summary**
- Format as a concise daily report
- Include: score, completed count, carry-over count, top 3 tomorrow
## Output
Write the daily report to .claude/daily-reports/[date].md
## State Update
- Append to progress.txt: "[timestamp] -- Daily planner: scored [X]/10,
[N] tasks completed, [M] carry-over"
- If any task has been active for more than 5 days without progress,
flag it in the report and add a note to tasks-active.md
Expected output: A complete skill file at .claude/skills/daily-planner/SKILL.md.
Build It: Cron Jobs File
Intent: Create the scheduling file with the daily planner as the first entry.
Create a cron-jobs.json file with entries for each skill. The prompt handles the format.
Prompt for Claude Code:
Create .claude/cron-jobs.json with one entry for the daily-planner skill.
Schedule it at 5:33 PM daily. Set expires to 7d. Use the skill path
.claude/skills/daily-planner/SKILL.md.
Expected output: A cron jobs file with one entry.
Build It: Update CLAUDE.md
Intent: Add skill and scheduling awareness to the master instruction file.
Prompt for Claude Code:
Append the following to CLAUDE.md:
## Skills
Each skill file in .claude/skills/ defines a complete workflow.
When told to "run the [name] skill," read the corresponding SKILL.md
and follow its instructions exactly.
## Scheduling
Cron jobs are defined in .claude/cron-jobs.json. At session startup:
1. Read cron-jobs.json
2. Check which jobs are due
3. Execute due jobs in priority order
Cron jobs expire after 7 days. The heartbeat skill renews them.
Expected output: CLAUDE.md updated with skill and scheduling sections.
Build It: Test the Daily Planner
Intent: Run the skill manually to verify it works.
Prompt for Claude Code:
Run the daily-planner skill. Read .claude/skills/daily-planner/SKILL.md
and follow its instructions.
Expected output: A daily report file and an updated progress.txt entry.
Checkpoint
Your .claude/ directory should now contain: priority-map.md, tasks-completed.md, cron-jobs.json, skills/daily-planner/SKILL.md (in addition to all previous files). CLAUDE.md should include skills and scheduling sections.
This is part of the Build Your Own Dev Agent course. ← Previous Lesson | Next Lesson →