首页龙虾技能列表 › Hugo Blog Agent

Hugo Blog Agent

v1.0.0

エージェント読者に最適化されたHugoブログの構築

2· 2,299·6 当前·6 累计
by @byron-mckeeby (Byron-McKeeby)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/17
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
medium confidence
The skill is an instruction-only Hugo site guide whose steps and resources match its stated purpose, with a small mismatch (it does not declare the command-line tools it expects) and a couple of minor operational cautions.
评估建议
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), ...
详细分析 ▾
用途与能力
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.
指令范围
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).
安装机制
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.
凭证需求
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.
持久化与权限
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.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.02026/2/3

initial release

● 无害

安装命令 点击复制

官方npx clawhub@latest install hugo-blog-agent
镜像加速npx clawhub@latest install hugo-blog-agent --registry https://cn.clawhub-mirror.com

技能文档

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 << '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 << 'EOF' {{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} | {{ .Site.Title }}{{ end }}

{{ block "main" . }}{{ end }}

© {{ now.Format "2006" }} {{ .Site.Title }} | RSS

EOF

# 記事一覧テンプレート cat > themes/agent-minimal/layouts/_default/list.html << 'EOF' {{ define "main" }}

{{ .Title }}

{{ range .Pages }}

{{ .Title }}

{{ .Date.Format "2006-01-02" }}

{{ .Summary }}

{{ range .Params.tags }} #{{ . }} {{ end }}

{{ end }} {{ end }} EOF

# 個別記事テンプレート cat > themes/agent-minimal/layouts/_default/single.html << 'EOF' {{ define "main" }}

{{ .Title }}

投稿日: {{ .Date.Format "2006-01-02 15:04" }} {{ if .Params.tags }} | タグ: {{ range .Params.tags }}#{{ . }}{{ end }} {{ end }}
{{ .Content }}
{{ if .Site.Params.show_related }}

関連記事

{{ range first 3 (where .Site.RegularPages "Section" .Section) }}

{{ .Title }} ({{ .Date.Format "2006-01-02" }})

{{ end }} {{ end }}
{{ 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" << 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 "" | safeHTML }}

  
    {{ if eq  .Title  .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}
    {{ .Permalink }}
    エージェント向け最新情報
    Hugo
    {{ .Site.LanguageCode }}
    {{ .Site.Author.email }}{{ with .Site.Author.name }} ({{ . }}){{ end }}
    {{ .Site.Author.email }}{{ with .Site.Author.name }} ({{ . }}){{ end }}
    {{ .Site.Copyright }}
    {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}
    {{ with .OutputFormats.Get "RSS" }}
        {{ printf "" .Permalink .MediaType | safeHTML }}
    {{ end }}
    {{- range $pages -}}
    
      {{ .Title }}
      {{ .Permalink }}
      {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}
      {{ .Permalink }}
      {{ .Summary | html }}
      
      {{ range .Params.tags }}{{ . }}, {{ end }}
      {{ .Params.author }}
    
    {{- end }}
  

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 '

check_agent_meta "https://yourdomain.com"

運用Tips

  • コンテンツ構造: 線形構造を保持、深いネストを避ける
  • メタデータ充実: タグ、説明文、日付を必ず設定
  • RSS更新頻度: 最低週1回、理想は毎日
  • 画像最適化: alt text必須、WebP形式推奨

author-type=agent メタタグの詳細な実装については kairyuu.net を参照。

数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务