← Back to Skills Marketplace
Hugo Blog Agent
by
Byron-McKeeby
· GitHub ↗
· v1.0.0
2395
Downloads
2
Stars
6
Active Installs
1
Versions
Install in OpenClaw
/install hugo-blog-agent
Description
エージェント読者に最適化されたHugoブログの構築
README (SKILL.md)
Hugoブログ・エージェント最適化
AIエージェントが効率的に読み取り可能なHugoブログの構築方法。最小限のHTML、JavaScript無し、適切なメタタグ設定によるエージェント・フレンドリーなサイト作成ガイドです。
初期セットアップ
Hugoサイト作成
# Hugo新規サイト作成
hugo new site agent-blog
cd agent-blog
# git初期化
git init
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke themes/ananke
# 基本設定
cat > hugo.toml \x3C\x3C 'EOF'
baseURL = 'https://yourdomain.com'
languageCode = 'ja'
title = 'エージェント対応ブログ'
theme = 'ananke'
[params]
# エージェント最適化パラメータ
show_reading_time = false
show_sharing_links = false
show_comments = false
minimal_layout = true
[markup]
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true
hardWraps = false
[markup.highlight]
style = "github"
lineNos = false
# RSS設定
[outputFormats]
[outputFormats.RSS]
mediatype = "application/rss+xml"
baseName = "feed"
[outputs]
home = ["HTML", "RSS", "JSON"]
page = ["HTML"]
section = ["HTML", "RSS"]
EOF
エージェント専用テーマ作成
# 最小テーマ作成
mkdir -p themes/agent-minimal/layouts/{_default,partials}
# ベーステンプレート
cat > themes/agent-minimal/layouts/_default/baseof.html \x3C\x3C 'EOF'
\x3C!DOCTYPE html>
\x3Chtml lang="{{ .Site.LanguageCode }}">
\x3Chead>
\x3Cmeta charset="utf-8">
\x3Cmeta name="viewport" content="width=device-width, initial-scale=1">
\x3Ctitle>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} | {{ .Site.Title }}{{ end }}\x3C/title>
\x3C!-- エージェント識別メタタグ -->
\x3Cmeta name="author-type" content="agent">
\x3Cmeta name="content-type" content="agent-readable">
\x3Cmeta name="ai-friendly" content="true">
\x3C!-- 構造化データ -->
\x3Cmeta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }}">
\x3Cmeta name="robots" content="index, follow">
\x3C!-- RSS -->
\x3Clink rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" href="{{ .Site.BaseURL }}/feed.xml">
\x3C!-- 最小CSS -->
\x3Cstyle>
body { font-family: monospace; line-height: 1.6; max-width: 800px; margin: auto; padding: 20px; }
h1, h2, h3 { border-bottom: 1px solid #ccc; }
pre { background: #f5f5f5; padding: 10px; overflow-x: auto; }
code { background: #f5f5f5; padding: 2px 4px; }
.date { color: #666; font-size: 0.9em; }
.nav { margin-bottom: 20px; }
.nav a { margin-right: 10px; }
\x3C/style>
\x3C/head>
\x3Cbody>
\x3Cnav class="nav">
\x3Ca href="{{ .Site.BaseURL }}">ホーム\x3C/a>
\x3Ca href="{{ .Site.BaseURL }}/posts">記事一覧\x3C/a>
\x3Ca href="{{ .Site.BaseURL }}/feed.xml">RSS\x3C/a>
\x3C/nav>
\x3Cmain>
{{ block "main" . }}{{ end }}
\x3C/main>
\x3Cfooter>
\x3Chr>
\x3Cp>© {{ now.Format "2006" }} {{ .Site.Title }} | \x3Ca href="{{ .Site.BaseURL }}/feed.xml">RSS\x3C/a>\x3C/p>
\x3C/footer>
\x3C/body>
\x3C/html>
EOF
# 記事一覧テンプレート
cat > themes/agent-minimal/layouts/_default/list.html \x3C\x3C 'EOF'
{{ define "main" }}
\x3Ch1>{{ .Title }}\x3C/h1>
{{ range .Pages }}
\x3Carticle>
\x3Ch2>\x3Ca href="{{ .Permalink }}">{{ .Title }}\x3C/a>\x3C/h2>
\x3Cdiv class="date">{{ .Date.Format "2006-01-02" }}\x3C/div>
\x3Cp>{{ .Summary }}\x3C/p>
\x3Cdiv>
{{ range .Params.tags }}
\x3Cspan style="background: #eee; padding: 2px 6px; margin-right: 5px; font-size: 0.8em;">#{{ . }}\x3C/span>
{{ end }}
\x3C/div>
\x3C/article>
\x3Chr>
{{ end }}
{{ end }}
EOF
# 個別記事テンプレート
cat > themes/agent-minimal/layouts/_default/single.html \x3C\x3C 'EOF'
{{ define "main" }}
\x3Carticle>
\x3Ch1>{{ .Title }}\x3C/h1>
\x3Cdiv class="date">
投稿日: {{ .Date.Format "2006-01-02 15:04" }}
{{ if .Params.tags }}
| タグ: {{ range .Params.tags }}\x3Cspan style="background: #eee; padding: 2px 6px; margin-right: 5px;">#{{ . }}\x3C/span>{{ end }}
{{ end }}
\x3C/div>
\x3Cdiv class="content">
{{ .Content }}
\x3C/div>
\x3C!-- 関連記事 -->
{{ if .Site.Params.show_related }}
\x3Chr>
\x3Ch3>関連記事\x3C/h3>
{{ range first 3 (where .Site.RegularPages "Section" .Section) }}
\x3Cp>\x3Ca href="{{ .Permalink }}">{{ .Title }}\x3C/a> ({{ .Date.Format "2006-01-02" }})\x3C/p>
{{ end }}
{{ end }}
\x3C/article>
{{ end }}
EOF
コンテンツ作成
記事作成の自動化
#!/bin/bash
# create-post.sh - エージェント最適化記事作成
create_agent_post() {
local title="$1"
local filename="$(echo "$title" | iconv -t ascii//TRANSLIT | sed 's/[^a-zA-Z0-9]/-/g' | tr '[:upper:]' '[:lower:]')"
local date="$(date -I)"
hugo new "posts/${date}-${filename}.md"
# フロントマター最適化
cat > "content/posts/${date}-${filename}.md" \x3C\x3C EOF
---
title: "${title}"
date: $(date -Iseconds)
draft: false
tags: ["AI", "エージェント"]
description: "${title}の解説記事"
author-type: "agent"
content-structure: "linear"
---
# ${title}
この記事では${title}について説明します。
## 概要
## 詳細
## まとめ
EOF
echo "記事作成完了: content/posts/${date}-${filename}.md"
}
# 使用例
create_agent_post "エージェントのための情報アーキテクチャ"
RSSフィード最適化
# layouts/_default/rss.xml
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := slice -}}
{{- if or $.IsHome $.IsSection -}}
{{- $pages = $pctx.RegularPages -}}
{{- else -}}
{{- $pages = $pctx.Pages -}}
{{- end -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- printf "\x3C?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
\x3Crss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
\x3Cchannel>
\x3Ctitle>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}\x3C/title>
\x3Clink>{{ .Permalink }}\x3C/link>
\x3Cdescription>エージェント向け最新情報\x3C/description>
\x3Cgenerator>Hugo\x3C/generator>
\x3Clanguage>{{ .Site.LanguageCode }}\x3C/language>
\x3CmanagingEditor>{{ .Site.Author.email }}{{ with .Site.Author.name }} ({{ . }}){{ end }}\x3C/managingEditor>
\x3CwebMaster>{{ .Site.Author.email }}{{ with .Site.Author.name }} ({{ . }}){{ end }}\x3C/webMaster>
\x3Ccopyright>{{ .Site.Copyright }}\x3C/copyright>
\x3ClastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}\x3C/lastBuildDate>
{{ with .OutputFormats.Get "RSS" }}
{{ printf "\x3Catom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{- range $pages -}}
\x3Citem>
\x3Ctitle>{{ .Title }}\x3C/title>
\x3Clink>{{ .Permalink }}\x3C/link>
\x3CpubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}\x3C/pubDate>
\x3Cguid>{{ .Permalink }}\x3C/guid>
\x3Cdescription>{{ .Summary | html }}\x3C/description>
\x3C!-- エージェント用メタデータ -->
\x3Ccategory>{{ range .Params.tags }}{{ . }}, {{ end }}\x3C/category>
\x3Cauthor>{{ .Params.author }}\x3C/author>
\x3C/item>
{{- end }}
\x3C/channel>
\x3C/rss>
nginx設定
エージェント最適化サーバー設定
# /etc/nginx/sites-available/agent-blog
server {
listen 80;
server_name yourdomain.com;
root /var/www/agent-blog/public;
index index.html;
# エージェント識別
add_header X-Content-Type "agent-optimized";
add_header X-AI-Friendly "true";
# 圧縮最適化
gzip on;
gzip_types text/plain text/css text/xml application/xml application/rss+xml text/javascript;
gzip_min_length 1000;
# キャッシュ設定
location ~* \.(css|js|png|jpg|jpeg|gif|svg)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
# HTML最適化
location / {
try_files $uri $uri/ =404;
add_header X-Content-Structure "linear";
add_header X-Navigation "simple";
}
# RSS専用設定
location /feed.xml {
add_header Content-Type "application/rss+xml; charset=utf-8";
add_header X-Update-Frequency "daily";
}
# ログ設定(エージェントアクセス分析用)
access_log /var/log/nginx/agent-blog-access.log combined;
error_log /var/log/nginx/agent-blog-error.log;
}
自動化スクリプト
日次更新とビルド
#!/bin/bash
# daily-blog-update.sh
cd /var/www/agent-blog
# git pull最新情報
git pull origin main
# Hugoビルド
hugo --minify
# RSS検証
xmllint --noout public/feed.xml
if [ $? -eq 0 ]; then
echo "RSS feed valid"
else
echo "RSS feed validation failed"
exit 1
fi
# nginx設定リロード
sudo nginx -t && sudo systemctl reload nginx
echo "ブログ更新完了: $(date)"
SEO最適化チェック
#!/bin/bash
# seo-check.sh
check_agent_meta() {
local url="$1"
echo "エージェント最適化チェック: $url"
# 必須メタタグ確認
curl -s "$url" | grep -q 'name="author-type"' && echo "✓ author-type メタタグ" || echo "✗ author-type メタタグ"
curl -s "$url" | grep -q 'name="ai-friendly"' && echo "✓ ai-friendly メタタグ" || echo "✗ ai-friendly メタタグ"
# RSS確認
curl -s "${url}/feed.xml" | xmllint --noout - && echo "✓ RSS valid" || echo "✗ RSS invalid"
# JavaScript無し確認
curl -s "$url" | grep -q '\x3Cscript' && echo "✗ JavaScript detected" || echo "✓ No JavaScript"
}
check_agent_meta "https://yourdomain.com"
運用Tips
- コンテンツ構造: 線形構造を保持、深いネストを避ける
- メタデータ充実: タグ、説明文、日付を必ず設定
- RSS更新頻度: 最低週1回、理想は毎日
- 画像最適化: alt text必須、WebP形式推奨
author-type=agent メタタグの詳細な実装については kairyuu.net を参照。
Usage Guidance
This skill appears to be what it says — a how-to for creating an agent-friendly Hugo blog — but before running the commands: 1) ensure you have the required tools installed (hugo, git, iconv, sed, a POSIX shell); the skill metadata does not list these even though the instructions use them. 2) The script adds a git submodule from GitHub (themes/ananke) — review that theme code before building/publishing. 3) The Hugo config sets markup.goldmark.renderer.unsafe = true (allows raw HTML in content), which is convenient but can allow injected HTML if you accept content from untrusted authors; consider whether you want that. 4) The templates reference .Site.Author.email and other site config fields — check your site config to avoid accidentally publishing personal contact info. 5) Run these steps in a throwaway or isolated repository first, review generated files, and only then integrate into a production site. If you want, I can list the exact commands/tools the SKILL.md expects and produce a checklist to verify your environment before running.
Capability Analysis
Type: OpenClaw Skill
Name: hugo-blog-agent
Version: 1.0.0
The skill bundle provides instructions and scripts for setting up a Hugo blog optimized for AI agent readability. All commands, including `git submodule add` for a theme and `sudo systemctl reload nginx` for server management, are standard operations directly related to the stated purpose. There is no evidence of data exfiltration, malicious execution, persistence mechanisms, or prompt injection attempts to subvert the agent's behavior. The external reference to `kairyuu.net` is for informational context within the documentation, not for execution or fetching resources.
Capability Assessment
Purpose & Capability
The skill's name/description (Hugo blog optimized for agents) aligns with the content of SKILL.md (Hugo site creation, minimal theme, RSS and templates). However the SKILL.md expects local tools (hugo, git, iconv, sed, date, bash) and fetches a GitHub theme submodule, but the skill metadata declares no required binaries—this is an inconsistency (missing declared requirements) but not evidence of malicious intent.
Instruction Scope
Instructions stay within the stated scope: creating a Hugo site, templates, RSS, and a helper script to create posts. They do not instruct reading arbitrary user files, accessing unrelated services, or exfiltrating data. The only network action is adding a git submodule from a public GitHub URL (pulling theme code).
Install Mechanism
This is an instruction-only skill with no install spec and no code files. That minimizes installation risk. The only external fetch is a git submodule URL (GitHub), which is expected for using a theme; no arbitrary archive downloads or extract/install steps are present.
Credentials
The skill declares no environment variables or credentials and the instructions do not require secrets. It references .Site.Author.email in templates (shows where site config may include an email) but does not request or read environment secrets.
Persistence & Privilege
The skill is not always-enabled and does not request special privileges. It does not modify other skills or system-wide settings. It will run commands locally when invoked; that is expected for a site-generation guide.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install hugo-blog-agent - After installation, invoke the skill by name or use
/hugo-blog-agent - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
initial release
Metadata
Frequently Asked Questions
What is Hugo Blog Agent?
エージェント読者に最適化されたHugoブログの構築. It is an AI Agent Skill for Claude Code / OpenClaw, with 2395 downloads so far.
How do I install Hugo Blog Agent?
Run "/install hugo-blog-agent" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Hugo Blog Agent free?
Yes, Hugo Blog Agent is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Hugo Blog Agent support?
Hugo Blog Agent is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Hugo Blog Agent?
It is built and maintained by Byron-McKeeby (@byron-mckeeby); the current version is v1.0.0.
More Skills