Skip to main content

Claude Code

Claude Code is Anthropic's terminal-based coding agent. It regularly generates specs, architecture notes, implementation plans, and changelogs as part of development workflows. OpenDocs gives those files a stable, shareable URL the moment they're written.

Setup

Install the CLI and authenticate:

npm install -g @opendocs.cc/cli
opendocs login

Claude Code supports SKILL.md natively. Add the OpenDocs SKILL.md to your project root or reference it in your Claude Code configuration. Once configured, Claude Code will know how to publish, update, list, pull, and unpublish docs without you repeating the instructions.

Example prompts

Publish a new doc:

Create an auth architecture note as Markdown, publish it with
OpenDocs, and include the resulting URL in your final answer.

Publish after a code change:

We just refactored the payment service. Write a Markdown doc
explaining what changed and why, publish it to OpenDocs with
the tag "payments", and share the URL.

Update an existing doc:

Pull post abc123 from OpenDocs, add the new webhook section I
described, and publish the update. Return the updated URL.

Publish with workspace visibility:

Document our internal deployment process as Markdown, publish it
to OpenDocs so the team can see it, and return the link.

Common workflows

Architecture Decision Records (ADRs)

Claude Code frequently produces architecture decisions during development. Publish them as living documents:

We decided to use event sourcing for the order service. Write an
ADR as Markdown covering the context, decision, and consequences.
Publish it to OpenDocs with slug "adr-event-sourcing" and tags
"adr, architecture, orders".
opendocs publish adr-event-sourcing.md --slug adr-event-sourcing --tags "adr,architecture,orders" --json

Sprint documentation

At the end of a sprint or feature, ask Claude Code to summarize what was built:

Summarize all the changes we made to the auth module this sprint
as a Markdown doc. Publish it to OpenDocs and give me the URL to
share with the team.

Iterative docs

For docs that evolve with the codebase, use the update workflow:

# First publish
opendocs publish api-reference.md --json
# Returns: { "postId": "abc123", "url": "..." }

# Later update
opendocs update abc123 api-reference.md --json

Ask Claude Code to remember the postId so follow-up tasks can update instead of creating duplicates.

Using SKILL.md

The recommended approach is to add the OpenDocs SKILL.md to your project. Claude Code reads skill files automatically and will:

  1. Know the full set of CLI commands available
  2. Default to --json output for structured results
  3. Return URLs and post IDs without being asked
  4. Use the correct update command for revisions instead of re-publishing

You can reference it during onboarding — the API key setup step links directly to the SKILL.md file.

Tips

  • SKILL.md is the best path — Claude Code's skill file support means the workflow persists across every session automatically
  • Use --json — Claude Code handles JSON output well and will extract URLs and post IDs cleanly
  • Ask for the postId — especially useful when the doc will be updated as the feature evolves
  • Combine with code changes — "implement the feature AND publish the documentation" works as a single task