iTranslated by AI
I Had Claude Code Create Custom Agent Skills
Introduction
Claude Code's Agent Skills were announced the other day, and I'm surprised to see that Japanese documentation is already available. That was quick!
So, I tried Agent Skills right away.
I still don't fully understand Agent Skills, but I think it's meant to be used as a personal handy tool rather than something to be meticulously created and distributed. So, rather than focusing on what I made, I'll write about how I made it.
Please note that this skill was created with heavy reliance on generative AI, with the priority being on just trying it out, so there are no insights into the mechanism or best practices.
( The article is written by a human. It took me 5 times longer to write the article than to create the tool 😅 )
Asked Gemini to Research the Method
I assumed I would have Claude Code create it, but since it's a new feature, I thought it wouldn't know how to make it, so I first researched the method using Gemini's Deep Research.

Asked Claude Code to Create the Skill Using the Research Results
After I finished researching the method, I had Claude Code create the skill.
I made it a personal skill for searching Zenn technical articles.
I requested it with the following prompt:
😄 > I want to create a new agent skill. As a Personal Skills, please create a skill that searches and references Zenn technical articles. For the agent skill, please refer to this. (Attach Gemini's report)
Then, SKILL.md was created with the following structure:
~/.claude/skills
└── zenn-search
└── SKILL.md
However, when I looked inside, it was something like "search with web search", so I asked it to create a script to perform a more specific Zenn article search.
As a result, in addition to modifying SKILL.md, it also created a Python script for searching.
~/.claude/skills
└── zenn-search
├── scripts
│ └── search_zenn.py
└── SKILL.md
The content looked buggy, so I had Claude Code make several corrections and also verified the operation to complete it.
The Created SKILL.md
Full text of the created `SKILL.md`
---
name: "Zenn記事検索"
description: "Zennの技術記事を検索して参照します。ユーザーがZennの記事、Zennで検索、技術記事を探す、日本語の技術情報を調べる、などを依頼した際に使用してください。"
allowed-tools: Bash, WebSearch
---
# Zenn記事検索
このスキルは、Zenn (zenn.dev) に投稿された日本語技術記事を効率的に検索し、参照するために使用します。
## Instructions
### 推奨される検索方法
**1. Zenn API検索スクリプトの使用(推奨)**
このスキルには、Zenn公式APIを直接使用する専用スクリプトが含まれています。
スクリプトの実行方法:
```bash
python3 ~/.claude/skills/zenn-search/scripts/search_zenn.py "検索キーワード" [オプション]
```
利用可能なオプション:
- `--order {daily|alltime|latest}`: 並び順を指定(デフォルト: daily)
- `daily`: 本日の人気順
- `alltime`: 全期間の人気順
- `latest`: 最新順
- `--page N`: ページ番号を指定(デフォルト: 1)
- `--limit N`: 表示件数を指定(デフォルト: 5)
- `--json`: JSON形式で出力
スクリプトの使用例:
```bash
# 基本的な検索
python3 ~/.claude/skills/zenn-search/scripts/search_zenn.py "Next.js"
# 全期間人気順で10件表示
python3 ~/.claude/skills/zenn-search/scripts/search_zenn.py "React hooks" --order alltime --limit 10
# 2ページ目を表示
python3 ~/.claude/skills/zenn-search/scripts/search_zenn.py "TypeScript" --page 2
```
スクリプトを使用する利点:
- Zenn公式APIを直接利用するため、正確で最新の結果を取得
- いいね数、コメント数、公開日などの詳細情報を表示
- ページネーション対応で大量の結果も効率的に閲覧可能
**2. WebSearchツールの使用(代替手段)**
スクリプトが使用できない場合や、より広範な検索が必要な場合:
- WebSearchツールを使用して検索を実行
- `allowed_domains: ["zenn.dev"]` パラメータでZennドメインに限定
- 検索クエリの例:
- 「Next.js App Router 2025 site:zenn.dev」
- 「React Server Components zenn.dev」
### 検索結果の提示
検索結果について、以下の情報を整理して提示します:
- タイトル(絵文字付き)
- 著者名
- URL
- いいね数とコメント数
- 公開日
ユーザーに対して:
- 最も関連性の高い記事を3〜5件ピックアップ
- 必要に応じて追加検索のキーワードを提案
- より詳しく知りたい記事があれば、その記事の詳細を確認可能であることを伝える
## Examples
### 例1:基本的な検索(APIスクリプト使用)
```
ユーザー: Next.jsのApp Routerについて、最新のZenn記事を探して
Claude: Zenn API検索スクリプトを使用して、Next.js App Routerに関する記事を検索します。
実行コマンド:
python3 ~/.claude/skills/zenn-search/scripts/search_zenn.py "Next.js App Router" --order latest
結果を解析して、上位5件の記事を紹介します。
```
### 例2:全期間人気記事の検索
```
ユーザー: Reactのパフォーマンス最適化について、人気のある日本語記事を読みたい
Claude: 全期間人気順でReactパフォーマンス最適化の記事を検索します。
実行コマンド:
python3 ~/.claude/skills/zenn-search/scripts/search_zenn.py "React パフォーマンス最適化" --order alltime --limit 10
人気の記事トップ10を表示します。
```
### 例3:特定トピックの深掘り
```
ユーザー: TypeScript 5.5の新機能について詳しく知りたい
Claude: TypeScript 5.5の記事を検索し、さらに2ページ目も確認します。
実行コマンド1:
python3 ~/.claude/skills/zenn-search/scripts/search_zenn.py "TypeScript 5.5 新機能"
実行コマンド2(さらに多くの記事が必要な場合):
python3 ~/.claude/skills/zenn-search/scripts/search_zenn.py "TypeScript 5.5" --page 2
```
## Notes
- **Zenn API利用**: このスキルは `https://zenn.dev/api/search` エンドポイントを使用します
- **日本語コンテンツ**: Zennは日本語の技術記事が中心のプラットフォームです
- **検索のコツ**: 日本語と英語のキーワードを適切に組み合わせると効果的です
- **実践的な情報**: 開発者コミュニティによる投稿のため、実践的な知見が豊富です
- **並び順の選択**:
- `daily`: 今日話題になっている記事を探す
- `alltime`: 全期間で人気の記事を探す(殿堂入り記事など)
- `latest`: 最新の情報を優先する
- **結果の精度**: API直接利用により、いいね数やコメント数などの正確なメタデータが取得できます
Actually Using It
Now, I actually tried using the completed skill. Let me look up relevant knowledge on Zenn for a project related to MCP servers.
> Search Zenn for knowledge useful for this project
> zennでこのプロジェクトに役に立つ知識を調べて
⏺ このプロジェクトに役立つZennの技術記事を検索しますね。
> The "Zenn記事検索" skill is running
⎿ Allowed 2 tools for this command
> The "Zenn記事検索" skill is running
⎿ Allowed 2 tools for this command
⏺ このプロジェクトに役立つZenn記事を検索します。プロジェクトの主要な技術スタック(MCP、FastMCP、SharePoint、Azure
AD認証など)に関連する記事を探しますね。
⏺ Bash(python3 ~/.claude/skills/zenn-search/scripts/search_zenn.py "MCP Model Context Protocol" --order alltime --limit 5)
⎿ 検索結果: 48件を表示 (ページ 1)
… +28 lines (ctrl+o to expand)
(省略)
⏺ Zennで関連する技術記事を検索しました。このプロジェクトに役立つ記事を以下のカテゴリーごとに紹介します。
📚 MCP(Model Context Protocol)基礎
このプロジェクトの核となる技術についての記事です:
1. Model Context Protocol(MCP)とは?生成 AI の可能性を広げる新しい標準
- 著者: @cloud_ace | 💚 572
- https://zenn.dev/cloud_ace/articles/model-context-protocol
- MCPの基本概念と可能性について包括的に解説
2. Model Context Protocol (MCP) サーバを使ってみた・作ってみた
- 著者: @karaage0703 | 💚 309
- https://zenn.dev/karaage0703/articles/42f7b0655a6af8
- 実際にMCPサーバーを作成した実践例
3. Model Context Protocol (MCP)入門:公式ドキュメントベースで牛歩のごとくゆっくり理解する
- 著者: @su8 | 💚 97
- https://zenn.dev/su8/articles/edc7ac5a8e0046
- MCPを丁寧に理解するための入門記事
(省略)
💡 特におすすめの記事
プロジェクトへの関連性が高い順に:
1. FastMCPの使い分けと実践(最新記事)
2. uvとRuffを使った開発環境構築(今日の記事!)
3. MCPの基本概念と実装例
4. Python MCPサーバー開発の実例
これらの記事を参考にすることで、プロジェクトの技術スタックについてより深く理解できると思います。
It worked successfully.
In Conclusion
Impressions and such
- I think Agent Skills are convenient because they are easy to create casually.
- I saw on the former Twitter that "you can easily run Python scripts," so I thought "Do you have to write scripts in Python?" But actually, since it executes commands directly, it can handle "anything," not just Python.
- It's easy to use because it can be defined with Markdown text and offers a lot of freedom. However, given its high degree of freedom, from a security perspective, I still think it's best for personal use.
- While having more options is welcome, it also makes it more difficult to decide how to divide usage among sub-agents, MCP servers, or Claude.md. This is especially challenging for team development.
NCDC株式会社( ncdc.co.jp/ )のテックブログです。 主にエンジニアチームのメンバーが投稿します。 募集中のエンジニアのポジションや、採用している技術スタックの紹介などはこちら( github.com/ncdcdev/recruitment )をご覧ください!
Discussion
スクリプトがpythonなのはcode executionをベースにしているからかと思われます。
Anthropicが用意したコンテナの実行環境に制約されているので、何でもは動かないかなと。
コメントありがとうございます。
なるほどです。そうなんですね。後ほど追記しておきます。