初めてのSkill作成チュートリアル / Writing Your First Skill
- 日本語
- English
- 简体中文
🛠 自分だけの「業務マニュアル」をAIに持たせる
前のページでSkillの概念を理解しました。ここでは実際に手を動かして、日報を自動生成するSkillを一つ作ってみましょう。
完成イメージ
毎晩18時のCronジョブで、AIがその日のワークスペース内の変更ファイルを集計し、決まったフォーマットの「日報」を daily-report-YYYY-MM-DD.md として自動生成する——というワークフローです。
Step 1: Skillフォルダを作る
ワークスペースの skills/ ディレクトリの中に、新しいフォルダを作成します。
mkdir -p skills/daily-report
Step 2: SKILL.md を書く
このファイルがSkillの**核(コア)**です。AIがこのファイルを読み込んで、手順通りに行動します。
---
name: daily-report
description: ワークスペース内の当日の変更ファイルを集計し、日報を自動生成するスキル
---
# 日報自動生成スキル
## 目的
毎日の業務終了時に、ワークスペース内で変更されたファイルの一覧を取得し、
Markdown形式の日報を自動生成して保存すること。
## 手順
1. ターミナルで `find workspace/ -mtime 0 -type f` を実行し、
当日中に更新されたファイルの一覧を取得してください。
2. 取得したファイル名リストを以下のフォーマットに整形してください。
3. `workspace/daily-report-YYYY-MM-DD.md` として保存してください。
(YYYY-MM-DDは本日の日付に置き換えること)
## 出力フォーマット
以下のテンプレートに必ず従ってください:
### テンプレート
# 日報 YYYY-MM-DD
## 本日の変更ファイル一覧
- ファイル名1
- ファイル名2
- ...
## 所感
(AIとしてのコメントを1〜2文で簡潔に)
## 注意事項
- `node_modules/` や `.git/` 内のファイルは無視してください。
- ファイルが0件の場合は「本日の変更はありませんでした」と記載してください。
Step 3: Cronジョブと連携させる(任意)
毎日自動で実行させたい場合は、cron/jobs.json からこのスキルを呼び出すように設定します。
{
"jobs": [
{
"cron": "0 18 * * *",
"payload": {
"message": "daily-report スキルを実行してください。"
}
}
]
}
Step 4: テスト実行
エージェントを起動し、手動で呼び出してみましょう。
daily-report スキルを実行してください。
ワークスペースに daily-report-2026-02-21.md のようなファイルが生成されれば成功です 🎉
💡 応用のヒント
- ファイル一覧だけでなく、
git diff --statを使うと変更行数の統計まで含んだ日報が作れます。 - 日報をDiscord Webhookで送信するステップを追加すれば、報告の完全自動化が実現します。
🛠 Give Your AI Its Own "SOP Manual"
In the previous page, you understood the concept of Skills. Now, let's get hands-on and create a Daily Report Generator Skill.
What We'll Build
A workflow where, at 6 PM via a Cron job, the AI tallies all files modified in the workspace that day and auto-generates a "daily report" as daily-report-YYYY-MM-DD.md.
Step 1: Create the Skill Folder
Create a new folder inside your workspace's skills/ directory:
mkdir -p skills/daily-report
Step 2: Write SKILL.md
This file is the core of the Skill. The AI reads it and follows the instructions.
---
name: daily-report
description: Tallies files modified today in the workspace and auto-generates a daily report
---
# Daily Report Auto-Generation Skill
## Objective
At the end of each workday, retrieve a list of files modified in the workspace,
generate a Markdown daily report, and save it.
## Steps
1. Run `find workspace/ -mtime 0 -type f` in the terminal
to get a list of files updated today.
2. Format the file list into the template below.
3. Save as `workspace/daily-report-YYYY-MM-DD.md`
(replace YYYY-MM-DD with today's date).
## Output Template
Strictly follow this template:
# Daily Report YYYY-MM-DD
## Files Modified Today
- filename1
- filename2
- ...
## Comments
(Brief 1-2 sentence AI commentary)
## Notes
- Ignore files inside `node_modules/` or `.git/`.
- If no files were modified, write "No changes were made today."
Step 3: Link to a Cron Job (Optional)
To run it automatically every day:
{
"jobs": [
{
"cron": "0 18 * * *",
"payload": {
"message": "Please execute the daily-report skill."
}
}
]
}
Step 4: Test It
Start the agent and manually trigger the skill:
Please execute the daily-report skill.
If a file like daily-report-2026-02-21.md appears in workspace, it's a success 🎉
💡 Advanced Tips
- Use
git diff --statinstead offindfor reports with change line counts. - Add a Discord Webhook step to achieve fully automated reporting end-to-end.
🛠 为您的 AI 打造专属"业务操作手册"
在前一页中,您已经理解了 Skill 的概念。现在,让我们亲手操作,创建一个日报自动生成技能。
最终效果
通过每天下午 6 点的 Cron 任务,AI 自动统计工作空间中当天被修改的所有文件,并按照固定格式自动生成日报文件 daily-report-YYYY-MM-DD.md。
第一步:创建 Skill 文件夹
在工作空间的 skills/ 目录中创建新文件夹:
mkdir -p skills/daily-report
第二步:编写 SKILL.md
这个文件是 Skill 的核心。AI 将读取此文件并按照指令行动。
---
name: daily-report
description: 统计工作空间中当天修改的文件,并自动生成日报
---
# 日报自动生成技能
## 目标
在每天工作结束时,获取工作空间中当天修改过的文件列表,
生成 Markdown 格式的日报并保存。
## 步骤
1. 在终端中执行 `find workspace/ -mtime 0 -type f`
获取今天更新过的文件列表。
2. 将文件列表整理为以下模板格式。
3. 以 `workspace/daily-report-YYYY-MM-DD.md` 的文件名保存
(将 YYYY-MM-DD 替换为今天的日期)。
## 输出模板
请严格按照以下模板:
# 日报 YYYY-MM-DD
## 今日修改的文件
- 文件名1
- 文件名2
- ...
## 感想
(以 AI 的身份简短评论 1-2 句话)
## 注意事项
- 忽略 `node_modules/` 或 `.git/` 中的文件。
- 如果没有修改任何文件,请写"今日没有任何变更"。
第三步:与 Cron 任务联动(可选)
如果希望每天自动执行,在 cron/jobs.json 中添加调用配置:
{
"jobs": [
{
"cron": "0 18 * * *",
"payload": {
"message": "请执行 daily-report 技能。"
}
}
]
}
第四步:测试运行
启动代理并手动触发:
请执行 daily-report 技能。
如果工作空间中出现了 daily-report-2026-02-21.md 这样的文件,恭喜您成功了 🎉
💡 进阶技巧
- 使用
git diff --stat代替find,可以生成包含代码变更行数统计的更详细日报。 - 在流程末尾添加 Discord Webhook 发送步骤,即可实现报告的完全闭环自动化。