Generating Documentation
The generate_documentation prompt guides you through creating documentation tailored to your product and audience.
Starting the Workflow
In Claude Code or Cursor, use the prompt:
Generate documentation for my project7-Step Interactive Workflow
The AI will ask you about:
1. Product Description
What does your product do? (one sentence)
Example: "A React SDK for adding AI-powered chat to web applications"
2. Target Audience
Who will read this documentation?
Options:
- Developers (API focus)
- End users (task focus)
- DevOps (deployment focus)
- Non-technical (conceptual focus)
- Mixed audience
3. Technical Level
What's the technical level of your audience?
- Beginner (more explanation, basic examples)
- Intermediate (standard examples, some advanced topics)
- Advanced (concise, comprehensive API coverage)
4. Main Features
What are the 3-5 main features to document?
Example: "Chat widget, context system, tool calling, conversation history"
5. Common Tasks
What do users most commonly need to do?
Example: "Install the SDK, add chat to their app, customize appearance"
6. Documentation Style
What style should the documentation follow?
- Tutorial (step-by-step learning)
- Reference (API-first)
- Task-oriented (how-to guides)
- Balanced (mix of all)
7. Existing Documentation
Any existing docs to reference?
Point to README, JSDoc comments, or existing documentation.
Generated Structure
Based on your answers, documentation is created in ./cyborg-docs/:
For Developers:
cyborg-docs/
├── getting-started.md
├── api/
│ ├── useChat.md
│ ├── useCyborg.md
│ └── CyborgProvider.md
├── components/
│ └── ChatWidget.md
├── types/
│ └── CyborgConfig.md
└── guides/
└── tool-calling.mdFor End Users:
cyborg-docs/
├── getting-started.md
├── guides/
│ ├── basic-usage.md
│ └── common-tasks.md
└── faq.mdAfter Generation
- Review the generated files
- Make any necessary edits
- Upload to Cyborg:
upload_docs({ filePaths: ["./cyborg-docs/**/*.md"] })
Tips for Better Documentation
Be Specific About Features
Instead of: "It has chat features"
Say: "Chat widget with real-time streaming, conversation history, tool calling, and context awareness"
Define Your Audience Clearly
Instead of: "For developers"
Say: "For React developers building SaaS products who need to add AI chat"
List Common Tasks
Think about what users actually do:
- "Install and configure the SDK"
- "Add context to pages"
- "Register custom tools"
- "Style the chat widget"
Next Steps
- Upload Docs - Push generated docs to Cyborg
- Sync Docs - Keep docs updated as code changes