Skip to content

Instantly share code, notes, and snippets.

@MasatoMakino
Created January 15, 2026 03:56
Show Gist options
  • Select an option

  • Save MasatoMakino/be469c419f0e5f234a52282d86c306b9 to your computer and use it in GitHub Desktop.

Select an option

Save MasatoMakino/be469c419f0e5f234a52282d86c306b9 to your computer and use it in GitHub Desktop.
Claude Code Skill: Validate Qiita article tags using Qiita API v2
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) and followers_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:

  1. Read the article file's YAML frontmatter to extract current tags
  2. For each tag, fetch JSON from Qiita API v2 using WebFetch:
    • Use items_count as the popularity metric (article count)
    • If API returns 404: tag does not exist (treat as 0 items)
  3. 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_count and followers_count for each tag
  4. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment