hugo-to-markdown

hugo-to-markdown is a skill for Codex from chaunsin/agent-skills. It costs 137 tokens per session (2,673 once invoked), scanned A, original, Apache-2.0.

A set of instructions for converting Hugo documentation sites into standard Markdown. Hugo is a tool that builds websites from content, templates, and configuration files.

In plain words
What is it for?
Inspecting a local Hugo repository and converting its content into Markdown with YAML front matter.
Why use it?
It helps preserve the site's meaning when Hugo-specific templates, shortcodes, front matter, and rendering rules cannot be used directly.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Inspecting a local Hugo repository and converting its content into Markdown with YAML front matter.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chaunsin/agent-skills/hugo-to-markdown
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add chaunsin/agent-skills --skill hugo-to-markdown
Clone the repo
git clone --depth 1 https://github.com/chaunsin/agent-skills

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hugo-to-markdown

README.md
[![agentmods](https://agentmods.dev/badge/skills/chaunsin/agent-skills/hugo-to-markdown/github.svg)](https://agentmods.dev/skills/chaunsin/agent-skills/hugo-to-markdown)
Your own site
<a href="https://agentmods.dev/skills/chaunsin/agent-skills/hugo-to-markdown"><img src="https://agentmods.dev/badge/skills/chaunsin/agent-skills/hugo-to-markdown/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hugo-to-markdown

Your own site · 80×15
<a href="https://agentmods.dev/skills/chaunsin/agent-skills/hugo-to-markdown"><img src="https://agentmods.dev/badge/skills/chaunsin/agent-skills/hugo-to-markdown.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 137 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,673 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00137 $0.02673
Opus 5 $0.00068 $0.01337
Sonnet 5 $0.00027 $0.00535
Haiku 4.5 $0.00014 $0.00267

Measured 12d ago against content hash cdceb0b1967a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

hugo-to-markdown scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/check_standard_markdown.py, scripts/inventory_hugo_rules.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/hugo-to-markdown/SKILL.md · 194 lines

How it starts

The opening of the file, as written. The whole thing — 194 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Hugo To Markdown

Overview

Use this skill when Markdown output must be derived from the local Hugo site, not guessed from generic Hugo knowledge. The conversion rules are the combination of Hugo's official behavior and the repository's own configuration, shortcode templates, render hooks, archetypes, and content conventions.

The target output is standard Markdown:

  • Keep plain Markdown and YAML front matter.
  • Replace or materialize Hugo-only constructs.
  • Preserve meaning when exact rendering is not safely reproducible.
  • Prefer explicit Markdown text over live Hugo template syntax.
  • Distinguish literal Hugo syntax examples from active Hugo features before rewriting anything.

Official Basis

Treat the repository's own Hugo configuration and templates as the primary ruleset. For any site under conversion, inspect these rule sources in the user's provided site root:

  • hugo.toml (or hugo.yaml, hugo.yml, hugo.json, or config/*)
  • archetypes/*
  • data/*
  • layouts/_shortcodes/* or layouts/shortcodes/*
  • layouts/_markup/*
  • content/**

Also read any local docs that define shortcode, front matter, bundle, resource, and render-hook behavior.

Do not assume built-in Hugo defaults if the repository overrides them locally.

Workflow

1. Inventory the site before converting files

Always inspect the site-level rules first.

python3 scripts/inventory_hugo_rules.py --site-root /path/to/hugo-site

Example invocation for the user's site:

python3 skills/hugo-to-markdown/scripts/inventory_hugo_rules.py \
  --site-root /path/to/your-hugo-site

This inventory step is mandatory for batch work. It identifies:

  • active config files
  • module mounts and content roots
  • custom shortcodes
  • custom render hooks
  • front matter keys seen in content
  • shortcode usage across content files

2. Convert with repository rules, not generic heuristics

Read references/conversion-workflow.md before changing files. Then:

  1. Resolve the real content root from hugo.toml, config.*, and module mounts.
  2. Read archetypes to understand expected front matter shape.
  3. Read the front matter configuration to understand date aliases, fallback order, filename-derived dates, and other inferred metadata.
  4. Read site data sources in data/ when shortcodes or partials pull structured content from them.
  5. Read custom shortcode templates in layouts/_shortcodes/ or layouts/shortcodes/.
  6. Classify each encountered shortcode as embedded, custom, or inline, then check whether it uses named or positional arguments, block syntax, or self-closing syntax.
  7. Read render hooks in layouts/_markup/.
  8. Check whether the repo already defines Markdown- or JSON-facing export templates and partials; if it does, use those as evidence for how the site itself downgrades Hugo constructs.
  9. Follow include-style shortcodes into referenced content files when the docs site composes content from shared fragments.
  10. Convert one file or one coherent section at a time.

Read the full file on GitHub · 194 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 194 lines · 137 tokens per session scan A cdceb0b1967a

Subscribe to this mod's changes

hugo-to-markdown is a skill published in the GitHub repository chaunsin/agent-skills (2 stars, last pushed yesterday), licensed Apache-2.0. It adds 137 tokens to every session and 2,673 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.