Agent skill

brandify-session

Use this skill when the user says "brandify-session", "brandify session", "save session as MDX", or provides a session name to archive. Exports the current Claude Code session to a Fenrir-styled MDX chronicle. Output is written to content/blog/ and served at /chronicles/{slug} by the Next.js chronicles pages.

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/brandify-session

SKILL.md

Brandify Session — Session Chronicle Generator

Exports the current session to a styled MDX chronicle using the Fenrir Ledger visual system. Styling is provided by chronicle.css scoped to .chronicle-page. MDX with JSX-compatible markup (className, not class) is generated from JSON by a script and written to content/blog/.

The chronicles index at /chronicles and detail pages at /chronicles/{slug} are auto-generated by Next.js from the MDX files in content/blog/ — no manual index update is needed.


Step 1 — Resolve the Session Name

The user provides {{NAME}} — a kebab-case slug (e.g., card-form-refactor). If none provided, derive one from the session's primary topic (max 4 words).


Step 2 — Locate the Session Export

Check for the file at tmp/sessions/{{NAME}}.txt, then tmp/{{NAME}}.txt.

If not found: tell the user to run /export tmp/sessions/{{NAME}}.txt first.


Step 3 — Parse the Session into Acts JSON

Read tmp/sessions/{{NAME}}.txt. Parse into Acts — logical groupings of user intent + Claude response.

How to identify Acts: Each Act begins with a user message (after > or prompt). Group all tool uses, output, and narrative that follow.

Write a JSON file to tmp/sessions/{{NAME}}.json with this schema:

json
{
  "title": "Evocative Session Title",
  "date": "2026-03-07",
  "runes": "ᛏ ᚢ ᚢ ᛚ",
  "primary_rune": "ᛏ",
  "slug": "{{NAME}}",
  "excerpt": "One-sentence summary for the blog index.",
  "acts": [
    {
      "title": "Act Title (5 words max)",
      "rune": "ᛏ",
      "category": "Refactoring",
      "user_msg": "the user's raw message",
      "work_summary": "<p>JSX paragraphs. Use <span className=\"hl\">highlights</span> and <span className=\"mono\">code refs</span>.</p>",
      "code_snippet": "optional pre-formatted code (use <span className=\"ca\"> for adds, <span className=\"cr\"> for removes)",
      "bug_fix": "optional bug description",
      "files_new": ["new-file.ts"],
      "files_mod": ["existing-file.ts"],
      "files_mem": ["memory-file.md"]
    }
  ]
}

Rune assignment: Read templates/rune-guide.md for the Elder Futhark rune table.

Voice: Ancient, unhurried, knowing — rune inscriptions, not UI copy.


Step 4 — Generate content/blog/{{NAME}}.mdx

Determine REPO_ROOT via: git worktree list --porcelain | head -1 | sed 's/worktree //'

Run the pre-compiled generator script:

bash
REPO_ROOT="$(git worktree list --porcelain | head -1 | sed 's/worktree //')"
SCRIPT_DIR="$REPO_ROOT/.claude/skills/brandify-session/scripts"
BLOG_DIR="$REPO_ROOT/development/ledger/content/blog"
node "$SCRIPT_DIR/generate-chronicle.mjs" \
  --input tmp/sessions/{{NAME}}.json \
  --output "$BLOG_DIR/{{NAME}}.mdx"

The script generates a complete MDX file with frontmatter (title, date, rune, excerpt, slug) and chronicle body using JSX-compatible className attributes, styled via .chronicle-page classes from chronicle.css.

generate-chronicle.mjs is the sole source file — edit it directly. No build step needed.


Step 5 — Verify & Report

Confirm content/blog/{{NAME}}.mdx exists and is non-empty. The chronicles index at /chronicles is auto-generated from the MDX files — no manual index update needed.

Report: MDX path, act count, files documented, /chronicles/{{NAME}} URL where it will appear.


Step 6 — Commit, Push & PR

Create a branch, commit the generated file, and open a PR:

bash
git checkout -b chore/session-{{NAME}}
git add development/ledger/content/blog/{{NAME}}.mdx
git commit -m "chore: add session chronicle — {{NAME}}"
git push -u origin chore/session-{{NAME}}
gh pr create --title "chore: session chronicle — {{NAME}}" \
  --body "Adds brandified session chronicle for **{{NAME}}** to the chronicles at \`/chronicles/{{NAME}}\`."

Report the PR URL to the user. Do NOT merge — Odin decides when to merge.

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results