
dnd-character-import
by rossnelson
D&D character planning and sheets
SKILL.md
name: dnd-character-import description: Import D&D character data from D&D Beyond API and generate Hugo content pages. Use when the user wants to sync characters, import character data, or update character information from D&D Beyond.
D&D Character Import
Import character data from D&D Beyond and generate Hugo markdown pages.
Prerequisites
- Go installed (for building the CLI tool)
- CobaltSession token from D&D Beyond (for private characters)
Getting the CobaltSession Token
- Log into D&D Beyond in your browser
- Open Developer Tools (F12)
- Go to Application > Cookies > dndbeyond.com
- Copy the value of
CobaltSession
The token expires periodically and needs to be refreshed.
Running the Import
# From the project root
go run ./cmd/dnd sync --cobalt="YOUR_COBALT_SESSION_TOKEN"
This will:
- Fetch character data from the D&D Beyond API
- Generate Hugo markdown files in
content/characters/
Character IDs
Characters are configured in cmd/dnd/main.go. The current party:
- Theren Vale (ID: 137344936)
- Barzer (ID: 138486583)
- Kaltor Reinhardt (ID: 137427042)
- Nysera (ID: 137436498)
- Elaris Moonveil (ID: 137533498)
- Selena (ID: 137615566)
D&D Beyond API
The unofficial API endpoint:
https://character-service.dndbeyond.com/character/v5/character/{CHARACTER_ID}
Authentication requires the CobaltSession cookie in headers.
Generated Content Structure
Each character page includes:
- Frontmatter: name, race, class, level, HP, wealth, abilities, skills, proficiencies
- Body: Background, personality traits, ideals, bonds, flaws, features, spells
Key Files
cmd/dnd/main.go- CLI entry point with character IDsinternal/dndbeyond/client.go- API clientinternal/dndbeyond/types.go- Data structuresinternal/hugo/generator.go- Markdown generation
Troubleshooting
401 Unauthorized: CobaltSession token expired. Get a fresh token from browser cookies.
Missing spells: Spells come from both classSpells (main spell list) and spells (race/feat spells) in the API response.
Score
Total Score
Based on repository quality metrics
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
Reviews
Reviews coming soon