16|Claude Code with Crazyrouter Series 16: Chapter 13: Reusing Documentation to Solve Similar Problems#
This is Part 16 of the Crazyrouter Claude Code series. This article focuses on “Claude Code with Crazyrouter Series 16: Chapter 13: Reusing Documentation to Solve Similar Problems,” with key coverage of Chapter 13: Reusing Documentation to Solve Similar Problems, 13.1 Why You Should Capture Knowledge as Documentation, and How AI Can Learn Directly from Documentation.
Unified integration convention: Claude Code / Anthropic native clients use ANTHROPIC_BASE_URL=https://cn.crazyrouter.com; OpenAI-compatible SDKs, HTTP requests, and frontend/backend applications use base_url=https://cn.crazyrouter.com/v1.
What This Article Covers#
- Who this is for: developers who are using Claude Code, preparing to connect to domestic models, or want to unify team calls through Crazyrouter.
- What you will learn: how to configure environment variables according to the Crazyrouter documentation, organize workflows, and avoid
/v1/v1/... issues caused by an incorrect Base URL.
- Recommended preparation: first create a separate API Token in the Crazyrouter console, then follow the Claude Code integration documentation to complete the basic setup.
Chapter 13: Reusing Documentation to Solve Similar Problems#
13.1 Why You Should Capture Knowledge as Documentation#
Capturing knowledge as documentation allows AI to learn directly from documents, improving efficiency when solving similar problems and ensuring consistency across solutions.
AI Can Learn Directly from Documentation#
Documentation Example#
Knowledge point: how to generate product copy
Documented version:
Improving AI Efficiency When Solving Similar Problems#
Ways to Improve Efficiency#
- Fast response: AI can quickly retrieve documentation and respond quickly
- Accurate answers: AI can accurately understand documentation and provide accurate answers
- Consistent output: AI can produce consistent results based on documentation
- Continuous optimization: AI can keep learning and continuously optimize
Efficiency Improvement Example#
Scenario: generating copy for multiple products
Without documentation:
- You need to explain the requirements in detail every time
- You need to adjust the prompt every time
- You need to review the results every time
- Time required: 10–15 minutes per piece of copy
With documentation:
- AI can quickly retrieve the documentation
- AI can accurately understand the requirements
- AI can generate consistent results
- Time required: 3–5 minutes per piece of copy
Efficiency gains:
- Time saved: 60–70%
- Better quality: more consistent
- Lower cost: less manual intervention
Ensuring Consistency Across Solutions#
Why Consistency Matters#
- Quality assurance: consistent solutions help ensure quality
- Brand image: consistent output helps maintain brand image
- User experience: consistent experiences improve user satisfaction
- Easier management: consistent output is easier to manage
How to Ensure Consistency#
- Standardized processes: establish standardized processes
- Templated output: use templated output
- Documented knowledge: turn knowledge into documentation
- Regular reviews: regularly review output quality
Consistency Example#
Scenario: a team needs to generate a large volume of product copy
Without documentation:
- Everyone generates copy in a different style
- Quality is unstable each time
- A lot of manual adjustment is required
- Brand image is inconsistent
With documentation:
- Everyone generates copy based on the documentation
- The generated style is consistent
- Quality is stable
- Brand image is consistent
Easier Team Collaboration and Knowledge Sharing#
Benefits of Collaboration#
- Knowledge sharing: team members can share knowledge
- Experience transfer: experience can be passed on to new members
- Less duplication: avoid duplicate work and repeated learning
- Higher efficiency: improve overall team efficiency
Collaboration Methods#
- Build a knowledge base: create a team knowledge base
- Share documents: share useful documents
- Communicate regularly: regularly exchange experience and insights
- Keep it updated: continuously update the knowledge base
Collaboration Example#
Scenario: a team needs to handle a large volume of customer inquiries
Without documentation:
- Everyone handles cases independently
- Experience is not shared
- There is a lot of duplicate work
- Efficiency is low
With documentation:
- Build a customer inquiry knowledge base
- The team shares documents
- Experience is transferred quickly
- Efficiency improves significantly
Example Cases#
Case: Building a Product Copy Knowledge Base#
Requirement: the team needs to generate a large volume of product copy
Knowledge base setup:
- Document structure
- Document content
- Description of copy types
- Checklist of copy elements
- Standards for copy requirements
- Library of example cases
- Usage workflow
- Retrieve from the knowledge base
- Select the appropriate template
- Adjust based on product information
- Generate the copy
- Human review
Results:
- Previous time required: 10–15 minutes per piece of copy
- Current time required: 3–5 minutes per piece of copy
- Time saved: 60–70%
- Consistency improvement: significant
Tips#
- Document promptly: document new experience as soon as you have it
- Keep the structure clear: make the document structure clear and easy to search
- Provide detailed content: make the documentation detailed and easy to understand
- Include plenty of examples: provide rich examples for reference
- Keep it updated: continuously update the documentation so it stays current
Now, start turning your knowledge into documentation!
13.2 How to Capture Knowledge as Reusable Documentation#
Learning how to capture knowledge as reusable documentation helps preserve and transfer experience while improving work efficiency.
Record the Key Steps of Successful Solutions#
Recording Principles#
- Timeliness: record it immediately after success
- Accuracy: accurately record every step
- Completeness: record the complete solution
- Reusability: make the record easy to reuse
What to Record#
- Problem description: describe the problem clearly
- Solution: record the solution in detail
- Key steps: highlight the key steps
- Notes: record important considerations
- Result validation: record the validation results
Recording Example#
Problem: how to use Claude Code to generate high-quality product copy
Record:
Please help me generate product copy:
Product information:
- Product name: [Product name]
- Key features: [Feature 1], [Feature 2], [Feature 3]
- Target users: [Target users]
Copy requirements:
- Highlight the product’s core selling points
- Use vivid and engaging language that attracts the target users
- Keep the length around [word count]
- Style requirements: [style]
- Include a call to action
Organize Problem Types and Corresponding Solutions#
Classification Methods#
- By type: classify by problem type
- By domain: classify by application domain
- By difficulty: classify by solution difficulty
- By frequency: classify by occurrence frequency
Classification Example#
Category 1: By type
Category 2: By domain
Write clear operating guides#
Elements of an operating guide#
- Clear objective: Clearly define the goal of the operating guide
- Clear steps: Make the steps easy to understand
- Rich examples: Provide plenty of examples
- Notes: Call out important considerations
Operating guide example#
Topic: How to use Claude Code to generate meeting minutes
Operating guide:
Please help me generate meeting minutes based on the meeting notes:
Meeting notes:
[Paste meeting notes]
Meeting minutes requirements:
- Extract the key points of the meeting
- Organize the decisions made
- List action items, including owners and due dates
- Include the next meeting schedule
- Use standard formatting with a clear structure
Participants: Zhang San, Li Si, Wang Wu
Meeting content:
-
Discuss project progress
- Zhang San: Frontend development is 80% complete
- Li Si: Backend development is 70% complete
- Wang Wu: Testing has not started yet
-
Discuss issues
- Testing progress is behind schedule
- Test preparation needs to be accelerated
-
Decisions
- Hold another meeting next week
- Wang Wu will prepare the test plan
Project Progress Meeting Minutes#
Meeting time: January 15, 2024, 14:00-16:00
Participants: Zhang San, Li Si, Wang Wu
Key meeting points#
Project progress updates#
- Frontend development: 80% complete (owner: Zhang San)
- Backend development: 70% complete (owner: Li Si)
- Testing: Not started yet (owner: Wang Wu)
Issue discussion#
- Testing progress is behind schedule
- Test preparation work needs to be accelerated
Decisions#
- Hold a project progress follow-up meeting next week
- Wang Wu is responsible for preparing the test plan
Action items#
- Zhang San: Complete the remaining 20% of frontend development
- Li Si: Complete the remaining 30% of backend development
- Wang Wu: Prepare the test plan and test cases
- Everyone: Hold a progress follow-up meeting next Wednesday
Next meeting#
Time: Next Wednesday at 2:00 PM
Agenda: Project progress follow-up
Save cases and best practices#
How to save cases#
- Case description: Describe the case in detail
- Issue analysis: Analyze the causes of the issue
- Solution: Record the solution
- Impact evaluation: Evaluate the effect of the solution
Case-saving example#
Case: Use Claude Code to optimize product copy
Case description:
Product copy needs to be generated for a smartwatch. The first version was not engaging enough and needs to be optimized.
Issue analysis:
- The first prompt was not specific enough
- The target users were not clearly defined
- The style requirements were not clearly defined
Solution:
Optimize the prompt and add specific requirements:
Impact evaluation:
- The generated copy improved significantly in quality
- It better matched the needs of the target users
- It included a clear call to action
- It saved 60% of the time
Best practices:
- Make prompts specific and clear
- Clearly define the target users
- Clearly define the style requirements
- Include a call to action
- Iterate and optimize prompts
Tips#
- Record promptly: Record a success immediately after it happens
- Record in detail: Make records detailed so they are easy to reuse
- Organize by category: Categorize records so they are easy to find
- Update regularly: Update regularly to keep content current
- Share and discuss: Share with others and learn from each other
Now, start turning your knowledge into reusable documents!
13.3 Let AI use the accumulated documents#
After turning knowledge into documents, you need to make sure AI can use those documents so they can deliver real value.
Upload documents to the Claude Code knowledge base#
Upload methods#
- Upload individually: Upload documents one by one
- Bulk upload: Upload multiple documents in bulk
- Folder upload: Upload an entire folder
- Regular updates: Update documents regularly
Upload steps#
Step 1: Prepare documents
- Organize the documents you want to upload
- Make sure the document formats are correct
- Check that the document content is complete
Step 2: Open Claude Code
- Launch Claude Code
- Open the file browser area
Step 3: Upload documents
- Click the upload file button
- Select the documents to upload
- Confirm that the upload succeeded
Step 4: Verify the upload
- Check whether the documents were uploaded successfully
- Verify that the document content is complete
- Test whether the documents are accessible
Upload example#
Document list:
- Product Copy Generation Guide.md
- Meeting Minutes Generation Guide.md
- Data Analysis Guide.md
- Weekly Report Generation Guide.md
Upload steps:
- Open Claude Code
- Click the upload file button
- Select all documents
- Confirm that the upload succeeded
Principles for permission configuration#
- Security: Ensure document security
- Accessibility: Ensure AI can access the documents
- Flexibility: Support flexible configuration
- Manageability: Make permissions easy to manage
Permission configuration methods#
Method 1: Global configuration
- Configure access permissions for all documents
- Suitable for public documents
Method 2: Category-based configuration
- Configure access permissions by category
- Suitable for different types of documents
Method 3: Individual configuration
- Configure access permissions for each document individually
- Suitable for sensitive documents
Permission configuration examples#
Configuration 1: Global configuration
Configuration 2: Category-based configuration
Test how well AI learns from documents#
Testing methods#
- Functional testing: Test whether AI can access the documents
- Accuracy testing: Test whether AI can accurately understand the documents
- Application testing: Test whether AI can apply knowledge from the documents
- Efficiency testing: Test AI response speed
Test example#
Test 1: Functional test question: Please help me generate product copy
Expected result: AI can retrieve the Product Copy Generation Guide and generate copy based on the guide
Result: ✓ Success
Test 2: Accuracy test question: Generate copy for a smartwatch based on the product copy generation guide
Expected: The AI can accurately understand the guide requirements and generate copy that meets them
Result: ✓ Success
Test 3: Application test
Question: Please help me generate meeting minutes
Expected: The AI can apply the meeting minutes generation guide and produce high-quality meeting minutes
Result: ✓ Success
Test 4: Efficiency test question: Please help me generate a weekly report
Expected: The AI can quickly retrieve the weekly report generation guide and quickly generate the weekly report
Result: ✓ Success, response time 5 seconds
Optimize Document Structure to Improve AI Retrieval Efficiency#
Optimization Principles#
- Clear structure: The document structure should be clear
- Well-defined hierarchy: The document hierarchy should be easy to follow
- Explicit keywords: Keywords should be clear
- Complete indexes: Indexes should be comprehensive
Optimization Methods#
Method 1: Optimize the document structure
- Use clear headings
- Use a reasonable hierarchy
- Use explicit categories
Method 2: Add keywords
- Add keywords at the beginning of the document
- Add keywords in important sections
- Add keywords in examples
Method 3: Build indexes
- Build a document index
- Build a keyword index
- Build an example index
Optimization Example#
Before optimization:
After optimization:
Example Cases#
Case: Build and Use a Knowledge Base#
Requirement: Build a product copy knowledge base so the AI can generate copy based on it
Implementation steps:
Step 1: Organize knowledge
- Collect experience in generating product copy
- Organize copy types and requirements
- Summarize best practices
Step 2: Write documents
- Write a product copy generation guide
- Include detailed operating steps
- Include rich example cases
Step 3: Upload documents
- Upload the documents to Claude Code
- Verify that the upload succeeded
- Configure access permissions
Step 4: Test the results
- Test whether the AI can retrieve the documents
- Test whether the AI can apply the documents
- Test the AI's response speed
Step 5: Optimize the documents
- Optimize the documents based on the test results
- Optimize the document structure
- Add keywords and indexes
Results:
- The AI can accurately retrieve documents
- The AI can generate copy based on the documents
- Copy quality improves significantly
- Generation speed increases by 50%
Tips#
- Clear structure: Keep the document structure clear so the AI can retrieve it easily
- Explicit keywords: Make keywords explicit so the AI can understand them easily
- Rich examples: Provide plenty of examples so the AI can refer to them
- Regular updates: Update documents regularly to keep them current
- Test and validate: Regularly test the AI's retrieval and application performance
Now, let the AI use the documents you've accumulated!
13.4 Reuse Documents to Solve Similar Problems#
The ultimate goal of documenting knowledge is reuse, so the AI can quickly solve similar problems based on the documents.
Describe New Problems to the AI#
Description Principles#
- Clear and explicit: The problem description should be clear and explicit
- Complete and accurate: The problem description should be complete and accurate
- Sufficient context: Provide enough context
- Clear goal: Clearly state the goal of solving the problem
Description Methods#
Method 1: Direct description
- Describe the problem directly
- Provide relevant background
- Explain the expected result
Method 2: Reference documents
- Reference relevant documents
- Specify the relevant sections in the documents
- Explain how to apply the documents
Method 3: Compare with references
- Compare with similar problems
- Reference similar solutions
- Explain the differences
Description Examples#
Example 1: Direct description
Example 2: Reference documents
Example 3: Compare with a reference
AI Automatically Retrieves Relevant Documents#
Retrieval Mechanism#
- Keyword matching: Match documents based on keywords
- Semantic understanding: Understand documents based on semantics
- Contextual association: Associate documents based on context
- Learning-based optimization: Optimize retrieval based on learning
Retrieval Example#
Question: Please help me generate product copy
AI retrieval process:
- Analyze the question and extract keywords: product copy, generation
- Retrieve relevant documents from the knowledge base
- Find the "Product Copy Generation Guide" document
- Extract relevant content from the document
- Generate a solution based on the document
Retrieval result:
AI Generates Solutions by Combining Documented Experience#
Solution Generation Process#
- Understand the problem: The AI understands the user's problem
- Retrieve documents: The AI retrieves relevant documents
- Apply knowledge: The AI applies knowledge from the documents
- Generate a solution: The AI generates a solution
- Optimize and adjust: The AI optimizes and adjusts based on feedback
Solution Generation Example#
Question: Please help me generate product copy for a smart speaker
AI generation process:
- Understand the problem: Product copy needs to be generated for a smart speaker
- Retrieve documents: Retrieve the "Product Copy Generation Guide"
- Apply knowledge: Apply the copy elements and requirements from the document
- Generate a solution: Generate product copy
- Optimize and adjust: Optimize based on user feedback
Generated solution:
Validate the Solution Results#
Validation Methods#
- Accuracy validation: Validate whether the solution is accurate
- Completeness validation: Validate whether the solution is complete
- Practicality validation: Validate whether the solution is practical
- Efficiency validation: Validate whether the solution is efficient
Validation Examples#
Validation 1: Accuracy validation
- Check whether the copy accurately reflects the product features
- Check whether the copy meets the needs of the target users
- Check whether the copy includes a call to action
- Result: ✓ Accurate
Validation 2: Completeness validation
- Check whether the copy includes all product features
- Check whether the copy meets the word count requirement
- Check whether the copy meets the style requirement
- Result: ✓ Complete
Validation 3: Practicality validation
- Check whether the copy can be used directly
- Check whether the copy requires major revisions
- Check whether the copy achieves the expected results
- Result: ✓ Practical
Validation 4: Efficiency validation
- Check whether the generation time is reasonable
- Check whether time was saved
- Check whether efficiency was improved
- Result: ✓ Efficient, saves 70% of the time
Example Cases#
Case: Reuse Documents to Solve Multiple Similar Problems#
Requirement: Generate copy for multiple products
Document: Product Copy Generation Guide.md
Question 1: Generate copy for a smartwatch
Description: Please help me generate product copy for a smartwatch.
AI retrieval: Retrieved the product copy generation guide.
AI generation: Generated copy based on the documentation.
Validation: The copy is accurate, complete, practical, and efficient.
Result: ✓ Successful
Question 2: Generate copy for wireless earbuds
Description: Please help me generate product copy for wireless earbuds.
AI retrieval: Retrieved the product copy generation guide.
AI generation: Generated copy based on the documentation.
Validation: The copy is accurate, complete, practical, and efficient.
Result: ✓ Successful
Question 3: Generate copy for a portable speaker
Description: Please help me generate product copy for a portable speaker.
AI retrieval: Retrieved the product copy generation guide.
AI generation: Generated copy based on the documentation.
Validation: The copy is accurate, complete, practical, and efficient.
Result: ✓ Successful
Impact:
- Time to generate each piece of copy: 3-5 minutes
- Time saved compared with the previous process: 60-70%
- Copy quality: Significantly improved
- Consistency: Significantly improved
Tips#
- Be clear in your description: Make the problem description clear so the AI can understand it easily.
- Reference documentation: Reference relevant documentation to improve retrieval accuracy.
- Provide context: Provide enough context so the AI can apply it effectively.
- Validate results: Validate the effectiveness of the solution to ensure quality.
- Provide feedback and optimize: Provide feedback to help the AI improve.
Now let the AI solve your problems based on your documentation!
13.5 Continuously Update and Iterate on Documentation#
Documentation is not static. It needs to be continuously updated and iterated based on new cases and new experience to retain its value.
Update Documentation Based on New Cases#
Triggers for Updates#
- New cases appear: A new successful case appears.
- New methods are discovered: A new solution is found.
- New problems appear: A new type of problem appears.
- User feedback: User feedback is received.
Update Methods#
Method 1: Add a new case
- Add the new case to the documentation.
- Describe the case background.
- Describe the case solution.
- Describe the case results.
Method 2: Update a method
- Update an existing solution.
- Optimize the method steps.
- Add more explanation for the method.
Method 3: Add a new method
- Add a new solution.
- Describe where the new method applies.
- Describe the advantages of the new method.
Update Example#
Before the update:
After the update:
Optimize Documentation Content to Improve AI Understanding Efficiency#
Optimization Principles#
- Clear structure: The documentation structure should be clear.
- Distinct hierarchy: The documentation hierarchy should be easy to follow.
- Clear keywords: Keywords should be explicit.
- Rich examples: Examples should be comprehensive.
Optimization Methods#
Method 1: Optimize the structure
- Use clear headings.
- Use a reasonable hierarchy.
- Use explicit categories.
Method 2: Add keywords
- Add keywords at the beginning of the documentation.
- Add keywords in important sections.
- Add keywords in cases.
Method 3: Enrich examples
- Add more cases.
- Add different types of cases.
- Add cases for different scenarios.
Optimization Example#
Before optimization:
After optimization:
Please help me generate product copy:
Product information:
- Product name: [Product name]
- Key features: [Feature 1], [Feature 2], [Feature 3]
- Target users: [Target users]
Copy requirements:
- Highlight the product's core selling points.
- Use vivid and engaging language to attract the target users.
- Keep the length around [word count].
- Style requirement: [Style]
- Include a call to action.
Regularly Clean Up Outdated Content#
Cleanup Principles#
- Timeliness: Clean up outdated content promptly.
- Accuracy: Ensure the content is accurate.
- Relevance: Ensure the content is relevant.
- Practicality: Ensure the content is useful.
Cleanup Methods#
Method 1: Delete outdated content
- Delete outdated cases.
- Delete outdated methods.
- Delete outdated explanations.
Method 2: Update outdated content
- Update outdated information.
- Update outdated methods.
- Update outdated cases.
Method 3: Mark outdated content
- Mark outdated content.
- Explain why it is outdated.
- Provide alternatives.
Cleanup Example#
Before cleanup:
After cleanup:
Establish a Documentation Update Mechanism#
Designing the Update Mechanism#
- Regular updates: Check and update documentation regularly.
- Triggered updates: Trigger updates based on specific events.
- Version management: Manage documentation versions.
- Update records: Record update history.
Examples of Update Mechanisms#
Mechanism 1: Regular updates
- Check documentation once a month.
- Check whether there are new cases.
- Check whether there are new methods.
- Check whether there is user feedback.
Mechanism 2: Triggered updates
- Update when user feedback is received.
- Update when a new method is discovered.
- Update when a new case appears.
- Update when an error is found.
Mechanism 3: Version management
- Use version numbers to manage documentation.
- Record the content of each update.
- Keep historical versions.
- Support version rollback.
Mechanism 4: Update records
- Record the update time.
- Record the update content.
- Record the reason for the update.
- Record the impact of the update.
Example Case#
Case: Continuously Optimizing the Product Copy Generation Guide#
Initial version:
- Basic steps
- 1 example case
- Simple explanation
First update:
- Added 2 new cases
- Optimized the steps
- Added best practices
Second update:
- Added keywords
- Optimized the documentation structure
- Added more cases
Third update:
- Deleted outdated cases
- Updated outdated methods
- Added new methods
Final version:
- Clear documentation structure
- Rich example cases
- Detailed steps
- Complete best practices
Impact:
- AI retrieval efficiency improved by 50%
- Copy generation quality improved by 30%
- User satisfaction improved by 40%
Tips#
- Update promptly: Update documentation promptly when new content is available.
- Check regularly: Regularly check documentation accuracy.
- Version management: Manage documentation versions.
- Record updates: Record update history.
- User feedback: Collect user feedback and keep optimizing.
Now start continuously updating and iterating on your documentation!
Start Connecting to Crazyrouter#
If you're ready to connect Claude Code, domestic models, or your own applications to Crazyrouter through a unified entry point, follow this sequence:
- Go to the Crazyrouter console, create a dedicated API Token, and manage permissions separately by project or team.
- Claude Code uses the root domain:
https://cn.crazyrouter.com; OpenAI-compatible SDKs use: https://cn.crazyrouter.com/v1.
- When you need to automatically check the environment or quickly write configuration, use the Crazyrouter Claude Code One-Click Setup Script.
- If debugging fails, check the console logs first, then verify the API Endpoint guide. Pay special attention to whether the Base URL has an extra
/v1.
When you need to evaluate model costs or choose different models, start with the Crazyrouter pricing and models page, then add your commonly used models to the Token allowlist.