/mainbranch:mb-wikifrom mainbranch
Creates and maintains personal wikis with atomic notes, WikiLinks, and auto-deploy via Cloudflare Pages. Supports setup, note-taking, research conversion, and publishing.
Ships in mainbranch. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Create and maintain personal wikis with atomic notes, WikiLinks, and auto-deploy.
Need help? Type /mb-help + your question anytime. If conversation compacts, /mb-help reloads fresh context.
See references/pull-engine-updates.md for the standard Main Branch update check. Run it at the start of every /mb-wiki invocation.
Wiki files go to YOUR WIKI REPO, not your business repo or the Main Branch engine.
your-wiki-repo/ <- Files saved here
├── src/content/notes/ <- Atomic notes (/mb-wiki add)
├── src/content/research/ <- Full research docs (/mb-wiki research)
└── src/content/updates/ <- Auto-generated updates (/mb-wiki recent)
~/.mainbranch/mb-wiki.json <- Config pointing to wiki repo
mainbranch/ (engine) <- Never modified by /mb-wiki
└── .claude/skills/mb-wiki/ <- This skill lives here
The skill reads ~/.mainbranch/mb-wiki.json to find your wiki repo location.
Before using this skill:
gh) installed and authenticatednpm install -g pnpm)Check for existing config:
cat ~/.mainbranch/mb-wiki.json 2>/dev/null || echo "No wiki configured yet"
| Mode | What It Does | When to Use |
|---|---|---|
setup | Clone template, deploy to CF Pages | First time (quick) |
configure | Personalize wiki (name, social, domain, etc.) | After setup |
add | Create atomic note with frontmatter | Daily note-taking |
publish | Git commit + push (auto-deploy) | After any changes |
research | Convert Gemini/GPT research to wiki | After deep research |
update | Pull upstream template changes | When fixes released |
recent | Generate "Recent Updates" from Git | Weekly or on threshold |
Quick first-time wiki setup. Installs default template and deploys via wrangler CLI. Run /mb-wiki configure after to personalize.
Quick gist: Ask repo name, check gh auth, create+clone repo, merge commune-wiki template upstream, apply Windows path fixes if needed, pnpm install && pnpm build, push to main, ensure Cloudflare account, create Pages project via dashboard with Git connect, capture the deployed URL, write site URL into astro.config.mjs, push to trigger deploy, save ~/.mainbranch/mb-wiki.json.
See references/setup-mode.md for the full 12-step procedure: every command, the Windows compat fixes, the Cloudflare dashboard click-path, and the exit message.
Create a new atomic note following evergreen note principles.
Usage: /mb-wiki add "Note Title"
Steps:
cat ~/.mainbranch/mb-wiki.json | jq -r '.wiki_repo'echo "Note Title" | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | tr -cd '[:alnum:]-'ls "$WIKI_REPO/src/content/notes/$SLUG.md" 2>/dev/nullgrep -r "concept" "$WIKI_REPO/src/content/notes/" --include="*.md" -lFrontmatter validation:
status values: draft, live, updatedvisibility values: public, private, draftExit: "Note created. Run /mb-wiki publish to deploy, or continue editing."
Commit changes and push to trigger auto-deploy.
Usage: /mb-wiki publish "commit message" or /mb-wiki publish
Steps:
git status --shortgit add -A && git commit -m "[type] Message" && git pushExit: "Pushed to GitHub. Cloudflare Pages will auto-deploy in ~90 seconds. Check status: https://dash.cloudflare.com → Workers & Pages → [project-name]"
Convert Gemini/GPT deep research into wiki format.
Usage: /mb-wiki research [path-to-research-file.md]
Steps:
notes/ — see references/research-format.mdresearch/Exit: "Created research summary and full research. Run /mb-wiki publish to deploy."
Pull upstream template improvements from commune-wiki.
Usage: /mb-wiki update
Steps:
git fetch upstreamgit log HEAD..upstream/main --onelinegit merge upstream/main --no-editpnpm install && pnpm buildExit: "Updated to latest template. Run /mb-wiki publish to deploy."
Generate "Recent Updates" note from Git history.
Usage: /mb-wiki recent
Triggers: Friday + >3 commits this week, >15 commits in single day, or manual.
Steps:
git log --since="1 week ago" --pretty=format:"%h %s" --name-onlysrc/content/updates/YYYY-MM-DD.mdPersonalize your wiki after setup. All customization in one place.
Usage: /mb-wiki configure
Prompts:
| Setting | Required | Default |
|---|---|---|
| Display name | Yes | — |
| Short name (mobile) | No | First word of display name |
| Avatar image | No | drag & drop to replace |
| Twitter/X handle | No | skip |
| GitHub username | No | skip |
| Website URLs | No | skip (comma-separated) |
| Custom domain | No | keep current |
| Delete sample notes | No | keep samples |
Steps:
Read config: cat ~/.mainbranch/mb-wiki.json
Show current settings, ask what to change
Update files based on selections:
src/components/Header.astro — display name, short name, avatar altsrc/components/Footer.astro — update "Powered by Commune" link to https://devonmeadows.com/ (external, target="_blank")src/pages/index.astro — meta author, structured datasrc/pages/notes/[...slug].astro — author metasrc/pages/research/[...slug].astro — footer attributionsrc/content/notes/my-working-notes.md — social linksastro.config.mjs — site URL (if domain changed)If avatar image provided:
cp "[path]" "$WIKI_REPO/public/avatar.jpg"cd "$WIKI_REPO" && node -e "
const sharp = require('sharp');
sharp('public/avatar.jpg')
.resize(32, 32)
.png()
.toFile('public/favicon-32x32.png');
"
If custom domain requested:
If delete sample notes:
rm -f src/content/notes/*.md
rm -f src/content/updates/*.md
Then create fresh my-working-notes.md with default welcome content and social links.
Rebuild and push: pnpm build && git add -A && git commit -m "[configure] Personalize wiki" && git push
Exit: "Wiki personalized! Changes will deploy in ~90 seconds."
See references/customization.md for manual edits.
~/.mainbranch/mb-wiki.json:
{
"wiki_repo": "/Users/you/mb-wiki",
"hosting": "cloudflare",
"domain": "yourdomain.com",
"cf_project": "your-wiki"
}
Why file-based: Skill reads at invocation — no need to add wiki as working directory.
User: /mb-wiki add "Compounding Knowledge"
Claude: Reading wiki config...
Creating note at src/content/notes/compounding-knowledge.md
[Writes note with frontmatter, suggests WikiLinks to existing notes]
Note created. Run `/mb-wiki publish` to deploy, or continue editing.
User: /mb-wiki research ~/Downloads/gemini-pricing-research.md
Claude: Reading research file (8,400 words)...
Creating:
1. Summary note: notes/research-pricing-strategy.md (tripwire)
2. Full research: research/pricing-strategy-full.md
[Formats links, suggests WikiLinks]
Created research summary and full research. Run `/mb-wiki publish` to deploy.
User: /mb-wiki publish
Claude: Reading wiki config...
3 files changed:
A src/content/notes/compounding-knowledge.md
M src/content/notes/active-reference.md
A src/content/research/pricing-strategy-full.md
Generating commit message: "[add] Compounding knowledge note, pricing research"
[Commits and pushes]
Pushed to GitHub. Cloudflare Pages will auto-deploy in ~90 seconds.
Live at: https://yourdomain.com
"No wiki configured"
Run /mb-wiki setup first.
Build failing on Windows with path error (C:\C:\Users\...)
The astro.backlinks.ts file needs a Windows path fix. Add this import:
import { fileURLToPath } from 'node:url';
And change:
// Before
const distPath = path.join(dir.pathname, 'backlinks.json');
// After
const distPath = path.join(fileURLToPath(dir), 'backlinks.json');
Build failing with sitemap "reduce" error
Temporarily disable sitemap in astro.config.mjs:
integrations: [
tailwind({ applyBaseStyles: false }),
backlinks(),
// sitemap({ ... }), // Comment out temporarily
],
Re-enable after first successful deploy.
"Not logged in" with wrangler
Run npx wrangler login — opens browser for Cloudflare OAuth. You can create a free account during this flow.
Build failing
pnpm build (not npm run build)distMerge conflicts on update
Stuck on CF Pages dashboard? Drag a screenshot into chat for help.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub dmthepm/mainbranch --plugin mainbranch22 skills in this plugin
/mb-adsCreate and review ads, and prepare provider-safe launch plans/checks. Flexible entry points: full pipeline (copy + images), copy only, images only, creative variations (hook library), video scripts, long-form video ads/VSL-style paid creative, paid video repurpose, compliance review, launch-plan, instrumentation, check, or optional Meta ad account check. Use when asked to create ads, ad copy, image prompts, video ad scripts, paid sales videos, creative variations, review ads, plan paid traffic, check analytics/GA4/GTM/pixels/booking/form readiness, or check launch performance. Short clips and organic social cuts from a sales video go to /mb-organic. Say /mb-ads or describe what you need./mb-betOpen, update, close, list, and narrate Main Branch business bets from repo truth. Use when the operator wants to frame an operating bet, track progress, capture a verdict, or draft public-safe narration./mb-booksReview books setup, monthly books close, reconciliation, and CPA handoff; answer what is settled, blocked, and ready. Runs read-only `mb books check` and `mb books doctor --repo` for safe facts./mb-endSession-closing skill that helps users wrap up intentionally. Use when: user says done, wrapping up, end my day, closing out, call it a day, goodnight, that's it for today, checkpoint, pause. Bookend to /mb-start. Scans git activity, surfaces what happened, spawns a crystallize agent for deep analysis, offers to save an approved checkpoint, and closes with a brief summary. Works for end-of-day, end-of-research-batch, end-of-decision-sprint, or mid-work checkpoints./mb-growRun a business's daily growth loop. Read the goal number, pick one move, act inside the owner's agreed limits, log it, and review the week with evidence of impact. Use when the owner says grow, growth, daily growth, what should we do today, push the goal, move the number, weekly growth review, or wants an agent to work on growth without being asked each day./mb-helpAnswer questions about Main Branch and Claude Code. Use when: user asks how/what/why questions, is confused about the business folder, CLI, skills, setup, errors, workflow, or what to do next.Other plugins' skills for the same job