Skip to content

Commit 93aaf22

Browse files
committed
Enhance skill
1 parent d52d75f commit 93aaf22

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

skills/paddleocr-doc-parsing/SKILL.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,13 @@ Then return:
198198

199199
### First-Time Configuration
200200

201+
You can generally assume that the required environment variables have already been configured. Only when a parsing task fails should you analyze the error message to determine whether it is caused by a configuration issue. If it is indeed a configuration problem, you should notify the user to fix it.
202+
201203
**When API is not configured**:
202204

203205
The error will show:
204206
```
205-
PADDLEOCR_DOC_PARSING_API_URL not configured. Get your API at: https://paddleocr.com
207+
CONFIG_ERROR: PADDLEOCR_DOC_PARSING_API_URL not configured. Get your API at: https://paddleocr.com
206208
```
207209

208210
**Configuration workflow**:
@@ -217,29 +219,25 @@ PADDLEOCR_DOC_PARSING_API_URL not configured. Get your API at: https://paddleocr
217219
- PADDLEOCR_ACCESS_TOKEN
218220
- Optional: PADDLEOCR_DOC_PARSING_TIMEOUT
219221
```
222+
- For security reasons, do not run `configure.py` or create a local `.env` file by default if the skill is installed under a host application directory (for example, `~/.claude/skills`). You should also advise the user not to do this.
220223
221-
3. **If the user provides credentials in chat anyway** (accept any reasonable format):
224+
3. **If the user provides credentials in chat anyway** (accept any reasonable format), for example:
222225
- `PADDLEOCR_DOC_PARSING_API_URL=https://xxx.paddleocr.com/layout-parsing, PADDLEOCR_ACCESS_TOKEN=abc123...`
223226
- `Here's my API: https://xxx and token: abc123`
224227
- Copy-pasted code format
225228
- Any other reasonable format
226229
- **Security note**: Warn the user that credentials shared in chat may be stored in conversation history. Recommend setting them through the host application's configuration instead when possible.
227230
228-
4. **Parse and validate the values**:
231+
Then parse and validate the values:
229232
- Extract `PADDLEOCR_DOC_PARSING_API_URL` (look for URLs with `paddleocr.com` or similar)
230233
- Confirm `PADDLEOCR_DOC_PARSING_API_URL` is a full endpoint ending with `/layout-parsing`
231234
- Extract `PADDLEOCR_ACCESS_TOKEN` (long alphanumeric string, usually 40+ chars)
232-
- Tell the user exactly which environment variables to set
233235
234-
5. **Ask the user to confirm the environment is configured**:
235-
- Wait for the user to confirm these values have been set in their host application, runtime environment, or appropriate config file
236-
- For security reasons, do not run `configure.py` or create a local `.env` file by default if the skill is installed under a host application directory (for example, `~/.claude/skills`)
236+
4. **Ask the user to confirm the environment is configured**.
237237
238-
6. **Retry only after confirmation**:
238+
5. **Retry only after confirmation**:
239239
- Once the user confirms the environment variables are available, retry the original parsing task
240240
241-
**IMPORTANT**: The error message format is STRICT and must be shown exactly as provided by the script. Do not modify or paraphrase it.
242-
243241
### Handling Large Files
244242
245243
There is no file size limit for the API. For PDFs, the maximum is 100 pages per request.

skills/paddleocr-text-recognition/SKILL.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ The output JSON structure is as follows:
156156
157157
### First-Time Configuration
158158

159+
You can generally assume that the required environment variables have already been configured. Only when an OCR task fails should you analyze the error message to determine whether it is caused by a configuration issue. If it is indeed a configuration problem, you should notify the user to fix it.
160+
159161
**When API is not configured**:
160162

161163
The error will show:
@@ -175,25 +177,23 @@ CONFIG_ERROR: PADDLEOCR_OCR_API_URL not configured. Get your API at: https://pad
175177
- PADDLEOCR_ACCESS_TOKEN
176178
- Optional: PADDLEOCR_OCR_TIMEOUT
177179
```
180+
- For security reasons, do not run `configure.py` or create a local `.env` file by default if the skill is installed under a host application directory (for example, `~/.claude/skills`). You should also advise the user not to do this.
178181
179-
3. **If the user provides credentials in chat anyway** (accept any reasonable format):
182+
3. **If the user provides credentials in chat anyway** (accept any reasonable format), for example:
180183
- `PADDLEOCR_OCR_API_URL=https://xxx.paddleocr.com/ocr, PADDLEOCR_ACCESS_TOKEN=abc123...`
181184
- `Here's my API: https://xxx and token: abc123`
182185
- Copy-pasted code format
183186
- Any other reasonable format
184187
- **Security note**: Warn the user that credentials shared in chat may be stored in conversation history. Recommend setting them through the host application's configuration instead when possible.
185188
186-
4. **Parse and validate the values**:
189+
Then parse and validate the values:
187190
- Extract `PADDLEOCR_OCR_API_URL` (look for URLs with `paddleocr.com` or similar)
188191
- Confirm `PADDLEOCR_OCR_API_URL` is a full endpoint ending with `/ocr`
189192
- Extract `PADDLEOCR_ACCESS_TOKEN` (long alphanumeric string, usually 40+ chars)
190-
- Tell the user exactly which environment variables to set
191193
192-
5. **Ask the user to confirm the environment is configured**:
193-
- Wait for the user to confirm these values have been set in their host application, runtime environment, or appropriate config file
194-
- For security reasons, do not run `configure.py` or create a local `.env` file by default if the skill is installed under a host application directory (for example, `~/.claude/skills`)
194+
4. **Ask the user to confirm the environment is configured**.
195195
196-
6. **Retry only after confirmation**:
196+
5. **Retry only after confirmation**:
197197
- Once the user confirms the environment variables are available, retry the original OCR task
198198
199199
### Error Handling

0 commit comments

Comments
 (0)