Docsbook
← Back to catalog
publishing

docs-publish

Push a local docs folder to GitHub in one step. Handles git init, commit, gh repo create and push — no Docsbook MCP required. Designed as the natural next step after /docs-from-site, /docs-from-code or /docs-from-docs.

Install & use this skill

Pick your AI client — install this single skill and call it.

1. Install
npx skills add Docsbook-io/docs-skills --skill docs-publish -a claude-code
2. Use
/docs-publish

Invoke as a slash command in chat.

Or: runtime discovery via Docsbook MCP

Already connected to the Docsbook MCP server? Skip install — ask your agent to load this skill on demand.

@docsbook find_skill "docs-publish"

docs-publish — Push a local docs folder to GitHub

The actual work is done by the docs-publisher subagent (Haiku, pinned model).

Workflow#

  1. Run gh auth status as the first step. If it fails, return manual instructions and exit — do not attempt to recover.
  2. Derive the repo name from the folder name (which upstream skills set from the site brand or source repo — not a guess). If the folder name looks placeholder-ish or generic (e.g. docs-output, untitled, a timestamp), ask the user for a real name instead of publishing under it. Also ask if there is a genuine collision with an existing repo on their account.
  3. If the folder is not already a git repo, run git init and make an initial commit. If .git already exists, skip init and reuse the current branch.
  4. Create a new public GitHub repo without --source. Add the remote manually, then push main.
  5. Use HTTPS with the gh auth token for the push, not SSH.
  6. Report the GitHub URL, computed Docsbook URL, file count, and any warnings.

Guardrails#

Acceptance Criteria#

View source on GitHub →Browse full catalog repo →
Keywords
publishgithubgitcommitpushrepo