Skip to main content
commandsSource-backedReview first Safety Privacy

/docs - Documentation Drafting Custom Command

User-created Claude Code custom slash command recipe for drafting project documentation from source files, existing docs, and repository conventions.

by JSONbored·added 2025-09-16·
HarnessClaude Code
Invocation:Create .claude/commands/docs.md, then run: /docs <file-or-topic>
Review first review before installing

Open the source and read safety notes before installing.

Citation facts

Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.

Source URLs
https://code.claude.com/docs/en/skills, https://github.com/JSONbored/awesome-claude/blob/main/content/commands/docs.mdx
Safety notes
Generated documentation is a draft; verify examples, flags, endpoints, and behavior against the actual source before publishing., Do not let the command invent supported options, output formats, API fields, or guarantees that are not present in the code or official docs., If you add dynamic shell injection or allowed tools to the command file, scope those permissions narrowly because the command can run local commands.
Privacy notes
The target source files, existing docs, examples, error messages, and command arguments may be sent into the model context., Do not include private API keys, customer records, unreleased roadmap details, or production logs in generated examples.
Author
JSONbored
Claim status
unclaimed
Last verified
2025-09-16

Decision playbook

Review trust signals before you adopt

Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.

Compare context
Selected

0

Current score

78

Baseline

Delta

No baseline selected

No major trust-signal divergence detected in the current selection.

Source and provenance checks

Complete

Confirm ownership and provenance before trusting install instructions.

  • Source link availableRequired

    Open the canonical repository and verify ownership.

    Done
  • Source provenance statusRequired

    Marked as source-backed.

    Done
  • Metadata reviewed

    Registry metadata indicates a reviewed listing.

    Done

Safety and privacy checks

Complete

Validate risk disclosures before installation or API wiring.

  • Safety notes presentRequired

    Review the listed safety guidance before running commands.

    Done
  • Privacy notes presentRequired

    Review data handling notes before connecting accounts or secrets.

    Done
  • Trust level risk gateRequired

    Trust level does not block evaluation.

    Done

Package and install checks

Needs review

Check package metadata and artifact integrity signals.

  • Install payload available

    Install or copy payload is available for review.

    Done
  • Package verification flag

    No package verification flag provided.

    Pending
  • Checksum metadata

    No checksum provided for downloaded artifact.

    Pending

Compare-driven decision checks

Needs review

Use compare context to validate trade-offs before adoption.

  • Compare tray has multiple entries

    Add at least one more entry to compare trust differences.

    Pending
  • Baseline comparison available

    No baseline peer selected yet.

    Pending
  • Diverging trust signals identified

    No major trust-signal divergence found.

    Pending

Setup at a glance

CLI install

Copy-ready — paste the snippet to get started.

Install command

Provided

Config snippet

Not provided

Copy snippet

Provided

Prerequisites

None

Platforms

1 listed

Difficulty

55/100

Adoption plan

Balanced adoption plan

Current risk score 16/100. Use staged verification before broader rollout.

Risk 16

Pre-adoption checks

Validate source and review signals before any execution.

  • Confirm source provenanceRequired

    Source URL/provenance metadata is present.

    Done
  • Confirm metadata review state

    Listing has review metadata.

    Done
  • Verify install payload

    Install/config payload exists and can be inspected.

    Done

Security checks

Confirm safety, privacy, and package integrity signals.

  • Review safety notesRequired

    Safety notes are present.

    Done
  • Review privacy notesRequired

    Privacy notes are present.

    Done
  • Verify package integrity metadata

    No package verification/checksum metadata.

    Pending

Rollout

Adopt in controlled steps based on the selected plan.

  • Run in isolated sandbox firstRequired

    Use a constrained sandbox and observe behavior across multiple tasks.

    Pending
  • Roll out graduallyRequired

    Roll out to a small cohort before wider usage.

    Pending
  • Set monitoring and fallback

    Define rollback path and monitor errors after adoption.

    Pending

Evidence readiness

Evidence readiness matrix · balanced

Required evidence gates are covered (5/6 signals complete).

Risk 15

Source provenance

Present

Source repository/provenance is listed.

Required in this preset

Metadata review

Present

Review metadata is present.

Required in this preset

Safety notes

Present

Safety notes are present.

Required in this preset

Privacy notes

Present

Privacy notes are present.

Optional in this preset

Package integrity

Missing

Package integrity metadata is missing.

Optional in this preset

Install payload

Present

Install payload is available.

Required in this preset

Required evidence gates are covered for this preset.

Decision timeline

Decision timeline · balanced

5/6 steps complete with no blocking gaps for this preset.

Risk 14

triage

Confirm source provenanceRequired

Source/provenance metadata is available.

Done

triage

Check metadata review statusRequired

Review metadata is available.

Done

verify

Review safety notesRequired

Safety notes are available.

Done

verify

Review privacy notes

Privacy notes are available.

Done

verify

Validate package integrity metadata

Package integrity metadata is missing.

Pending

rollout

Verify install payload and commandsRequired

Install payload is available.

Done

No required blockers for this timeline preset.

Safety & privacy surface

Safety & privacy surface

3 safety and 2 privacy notes across 5 risk areas. Review closely: credentials & tokens, permissions & scopes, network access.

5 areas
  • SafetyNetwork accessGenerated documentation is a draft; verify examples, flags, endpoints, and behavior against the actual source before publishing.
  • SafetyExecution & processesDo not let the command invent supported options, output formats, API fields, or guarantees that are not present in the code or official docs.
  • SafetyPermissions & scopesIf you add dynamic shell injection or allowed tools to the command file, scope those permissions narrowly because the command can run local commands.
  • PrivacyLocal filesThe target source files, existing docs, examples, error messages, and command arguments may be sent into the model context.
  • PrivacyCredentials & tokensDo not include private API keys, customer records, unreleased roadmap details, or production logs in generated examples.

Safety notes

  • Generated documentation is a draft; verify examples, flags, endpoints, and behavior against the actual source before publishing.
  • Do not let the command invent supported options, output formats, API fields, or guarantees that are not present in the code or official docs.
  • If you add dynamic shell injection or allowed tools to the command file, scope those permissions narrowly because the command can run local commands.

Privacy notes

  • The target source files, existing docs, examples, error messages, and command arguments may be sent into the model context.
  • Do not include private API keys, customer records, unreleased roadmap details, or production logs in generated examples.

Schema details

Install type
cli
Reading time
5 min
Difficulty score
55
Troubleshooting
Yes
Breaking changes
No
Skill and platform metadata
Retrieval sources
https://code.claude.com/docs/en/skillshttps://code.claude.com/docs/en/commandshttps://spec.openapis.org/oas/latest.html
Runtime and command metadata
Command syntax
Create .claude/commands/docs.md, then run: /docs <file-or-topic>
Script body
Create .claude/commands/docs.md with a documentation drafting prompt, then run /docs with a file, package, feature, or documentation gap as the argument.
Full copyable content
/docs src/api/users.ts -- draft source-grounded usage docs and examples

About this resource

/docs is not documented as a built-in Claude Code command. This entry is a custom command recipe: create a Markdown file in .claude/commands/, and Claude Code exposes it as /docs because the command name comes from the filename.

Use this recipe when you repeatedly ask Claude to draft README sections, API notes, usage examples, contributor docs, or source-grounded explanations and you want that workflow to be consistent.

Create the command

Create .claude/commands/docs.md:

---
description: Draft source-grounded project documentation for a file, package, feature, or docs gap
argument-hint: [file-or-topic]
---

Draft documentation for $ARGUMENTS.

Before writing, inspect the relevant source files, existing docs, package
metadata, tests, and examples. Then produce:

1. The concrete behavior supported by the source.
2. Any prerequisites, environment variables, flags, or limits that are actually
   present in the project.
3. A concise draft in the repository's existing docs style.
4. Copy/paste-ready examples that use real names from the codebase.
5. A verification checklist listing the files or commands used to confirm the
   documentation.

Do not invent options, endpoint fields, CLI flags, output formats, diagrams, or
support claims that are not visible in the source or cited docs.

Usage

/docs src/api/users.ts
/docs "document the package installation flow in packages/registry"
/docs README.md -- refresh quickstart from the current package scripts

Text after /docs is normal prompt input, not a CLI option parser. There are no source-backed built-in flags such as --api, --pdf, --interactive, or --confluence; ask for those focuses in plain language only when the repository already supports them.

Suggested workflow

  1. Ground the target. Point the command at a real file, package, existing doc, or issue.
  2. Read before writing. Have Claude inspect source, tests, package scripts, schemas, and nearby docs before drafting prose.
  3. Match the repository. Reuse existing headings, tone, command examples, and terminology.
  4. Separate facts from guesses. Ask the command to list unsupported or uncertain claims instead of filling gaps with invented behavior.
  5. Verify examples. Run or inspect any command/API examples before merging the generated docs.

Source Verification Notes

Verified on 2026-06-19:

  • Claude Code's skills documentation says existing .claude/commands/*.md files still create slash invocations based on filename, while skills are the newer recommended form.
  • Claude Code's commands reference explains that slash commands take text after the command name as arguments.
  • This page packages those documented mechanics into a user-authored /docs recipe. It does not claim an official built-in /docs generator command.

Duplicate Check

/generate-tests and /test-advanced focus on automated test drafting. /docs focuses on source-grounded documentation prose, examples, and verification notes.

Troubleshooting

  • If the draft invents behavior, rerun with: "List only claims supported by the source files you inspected."
  • If examples are generic, point the command at a real test, route, config file, or package script.
  • If API docs are needed, verify the project already exposes an OpenAPI schema, route map, or typed client before asking for endpoint tables.

Source citations

Add this badge to your README

Show that /docs - Documentation Drafting Custom Command is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/commands/docs.svg)](https://heyclau.de/entry/commands/docs)

How it compares

/docs - Documentation Drafting Custom Command side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

2 trust signals differ across this comparison (Source provenance, Submitter).

Next steps differ across entries — use the actions in the table below to copy install commands and source links per resource.

Field

User-created Claude Code custom slash command recipe for drafting project documentation from source files, existing docs, and repository conventions.

Open dossier

Expert Claude Code checkpoint recovery capability pack for auditing automatic edit tracking, choosing restore versus summarize actions in /rewind, and recovering from bad turns without losing git history.

Open dossier

A starter kit for designing, documenting, and testing REST APIs with Claude: bundles an API-builder agent with the docs, generate-tests, and debug commands.

Open dossier

An automation bundle for keeping project documentation accurate and current: generate docs from code, measure documentation coverage, validate README structure and links, document API endpoints, and publish to a docs site.

Open dossier
Next stepsDiffers
Trust
Review statusReviewedMaintainer reviewedReviewedMaintainer reviewedReviewedMaintainer reviewedReviewedMaintainer reviewed
Package trustPackage not verifiedPackage not verifiedPackage not verifiedPackage not verified
Source provenanceDiffersSource-backedSubmission linkedSource submissionSource-backedSource-backed
SubmitterDifferskiannidevtechforgeworks
Install riskReview firstReview firstReview firstReview first
Notes Safety Privacy Safety Privacy Safety · Privacy · Safety Privacy
Brand
Categorycommandsskillscollectionscollections
Sourcesource-backedsource-backedsource-backedsource-backed
AuthorJSONboredkiannidevJSONboredtechforgeworks
Added2025-09-162026-06-132025-10-022026-06-04
Platforms
Claude Code
Claude CodeCodexWindsurfGeminiCursorCLI
Claude Code
Claude Code
Source repo
Safety notesGenerated documentation is a draft; verify examples, flags, endpoints, and behavior against the actual source before publishing. Do not let the command invent supported options, output formats, API fields, or guarantees that are not present in the code or official docs. If you add dynamic shell injection or allowed tools to the command file, scope those permissions narrowly because the command can run local commands.This skill recommends checkpoint actions; it must not run `/rewind` restore or summarize without explicit user approval. Restore code and conversation reverts both files and chat history to a prior prompt; confirm the target checkpoint before acting. Restore code alone keeps conversation but reverts file edits; restore conversation alone keeps current files but rewinds chat. Summarize compresses conversation segments without changing files on disk; it is not a substitute for git revert when bash commands modified files. Checkpointing does not track files changed by bash commands such as `rm`, `mv`, or `cp`; use git or manual recovery for those paths.— missingThis is a curated index of existing directory entries; the collection runs nothing itself - review each linked hook and command's own safety notes before installing it.
Privacy notesThe target source files, existing docs, examples, error messages, and command arguments may be sent into the model context. Do not include private API keys, customer records, unreleased roadmap details, or production logs in generated examples.The /rewind menu lists every user prompt in the session, which may expose internal task names, credentials pasted in prompts, or customer context. Restored prompts reappear in the input field and may contain sensitive instructions that should be redacted before sharing screens. Session transcripts persist with checkpoints for up to 30 days by default; treat resumed sessions as containing prior sensitive content. Public support notes should describe the recovery lane and checkpoint choice, not full prompt text or complete file diffs.— missingThe collection handles no data on its own; consult each linked entry's privacy notes for its runtime behavior and any local or network access.
Prerequisites— none listed
  • An active or resumable Claude Code session where checkpoint recovery is needed.
  • Permission to run `/rewind` or use double-Esc when the prompt input is empty.
  • Awareness of whether problematic changes came from Claude file tools, bash commands, or manual edits outside the session.
  • Git or other version control available when permanent history or collaboration rollback is required.
  • Node.js 18 or higher
  • Basic understanding of REST API concepts
  • Code editor with Claude integration
  • A project with source code and a README to document.
  • Claude Code with hooks enabled for the generation and validation guards.
Install
/docs src/api/users.ts
Config
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed
Open 4 picks in the interactive comparison tool

Related guides

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.