Add the official OSS documentation as a persistent knowledge source in Cursor's @Docs system. The Cursor Agent can then answer OSS questions, generate standard SDK code, produce ossutil commands, and diagnose API errors — all grounded in the latest official documentation.
Prerequisites
Before you begin, ensure that you have:
Cursor installed and open
An active internet connection (Cursor fetches and indexes the documentation URL)
Add the OSS documentation to Cursor
In the menu bar, go to Cursor > Settings.
In the left navigation pane, click Indexing & Docs.
Click Add Docs.

Enter the OSS documentation URL:
https://www.alibabacloud.com/help/en/oss/In the Name field, enter a name you will recognize later, such as
Aliyun OSS Docs.
Confirm that the entry appears in the list with the status Indexed.

Use the OSS documentation for Q&A
In the Cursor AI chat window, type @Aliyun OSS Docs followed by your question. Cursor retrieves the relevant OSS documentation and generates an answer that includes code examples, configuration steps, and parameter details.
Example:
@Aliyun OSS Docs How do I use the OSS Java SDK to create a client and configure access credentials?
The AI returns an answer grounded in the indexed documentation, including working code and configuration steps.

Write effective prompts
| When you need to... | What to do | Expected output |
|---|---|---|
| Implement a specific SDK feature | Name the feature and the SDK language. For example: @Aliyun OSS Docs How do I use the Java SDK to upload a file to OSS? | Working code for that SDK, including the required imports and method calls |
| Configure an OSS feature | Include OSS-specific keywords such as bucket, object, or permission. For example: @Aliyun OSS Docs How do I configure cross-origin resource sharing (CORS) for OSS? | Configuration steps and the relevant parameter values |
| Set up permissions or access control | Name the access control mechanism. For example: @Aliyun OSS Docs How do I set permissions using a Resource Access Management (RAM) policy in OSS? | The policy structure and required settings |
| Get a complete working example | State the language and describe the task fully. For example: @Aliyun OSS Docs I need to upload a file to OSS in my Node.js project. Provide a complete code example. | Runnable code with the necessary imports, configuration, and inline comments |
| Work with large files | Be specific about the operation. For example: @Aliyun OSS Docs Provide best practices for multipart uploads of large files to OSS. | Recommended part sizes, concurrency settings, and error-handling patterns |
| Solve a complex, multi-step problem | Break the problem into smaller questions and ask them in sequence | Precise, focused answers for each step, which you can combine into a solution |
Prompts to avoid:
@Docs How do I use OSS? # Too broad — the AI cannot generate a useful answer
@Docs Upload file # Lacks context — no language, no operation detailsResolve errors with the OSS documentation
When you encounter an error while using the Alibaba Cloud OSS SDK to upload or download files, or perform other operations, open the Cursor Agent chat window and include @Aliyun OSS Docs in your prompt.

Include the error message and relevant code in your prompt. Cursor Agent cross-references your description against the official OSS documentation and returns a troubleshooting procedure with the most likely cause and fix.



Generate ossutil commands
Describe the operation in natural language using @Aliyun OSS Docs. Cursor Agent reads the official OSS documentation and your current file directory, then generates the corresponding ossutil command.
Example:
@Aliyun OSS Docs Use ossutil to upload the cname-configuration.xml file to the bucket named examplebucket
Cursor Agent checks whether cname-configuration.xml exists in the current directory, then extracts the key elements from your description — the operation (upload), the filename, and the bucket name — and generates the ossutil command from the official documentation.

If your access credentials are configured, Cursor Agent can also run the command directly.

What's next
Explore the full OSS documentation at https://www.alibabacloud.com/help/en/oss/ to discover more SDK guides, ossutil command references, and configuration topics you can query through Cursor.