| description | allowed-tools |
|---|---|
Validate Qiita article tags for validity and popularity |
Read, WebFetch, Edit |
Validate the tags in the currently open Qiita article file or a specified file path.
Requirements:
- Maximum 5 tags allowed
- Check each tag's popularity using Qiita API v2: GET https://qiita.com/api/v2/tags/
- API returns JSON with
items_count(article count) andfollowers_count - No authentication required (rate limit: 60 requests/hour)
- Tag names are case-insensitive
- If more than 5 tags exist, prioritize tags with higher hit counts and remove less popular ones
- For tags with 0 hits or uncommon tags, suggest similar popular tags or remove them
- Exception: Allow new tags (0 hits) if they represent the core theme of the article and pioneer a new topic area
- When suggesting removal, consider whether the tag is essential to the article's subject matter
- Provide recommendations to optimize the tag list
Process:
- Read the article file's YAML frontmatter to extract current tags
- For each tag, fetch JSON from Qiita API v2 using WebFetch:
- Use
items_countas the popularity metric (article count) - If API returns 404: tag does not exist (treat as 0 items)
- Use
- Analyze the results and provide recommendations:
- If >5 tags: suggest which tags to remove based on
items_count - If unpopular tags found: suggest alternatives or removal
- Report the
items_countandfollowers_countfor each tag
- If >5 tags: suggest which tags to remove based on
- Suggest the optimized tag list if changes are needed
API Reference:
- Endpoint: GET /api/v2/tags/:tag_id
- Response fields: id, items_count, followers_count, icon_url
- Error: 404 if tag does not exist
- Docs: https://qiita.com/api/v2/docs