felo-ai 0.2.6 → 0.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/.github/workflows/publish-npm.yml +39 -0
  2. package/CHANGELOG.md +30 -0
  3. package/CONTRIBUTING.md +346 -346
  4. package/README.en.md +129 -129
  5. package/README.md +435 -408
  6. package/docs/EXAMPLES.md +632 -632
  7. package/docs/FAQ.md +479 -479
  8. package/felo-search/LICENSE +21 -21
  9. package/felo-search/README.md +440 -440
  10. package/felo-search/SKILL.md +291 -291
  11. package/felo-slides/LICENSE +21 -21
  12. package/felo-slides/README.md +87 -87
  13. package/felo-slides/SKILL.md +166 -166
  14. package/felo-slides/scripts/run_ppt_task.mjs +251 -251
  15. package/felo-superAgent/LICENSE +21 -0
  16. package/felo-superAgent/README.md +125 -0
  17. package/felo-superAgent/SKILL.md +165 -0
  18. package/felo-web-fetch/README.md +127 -0
  19. package/felo-web-fetch/SKILL.md +204 -0
  20. package/felo-web-fetch/scripts/run_web_fetch.mjs +316 -0
  21. package/felo-x-search/SKILL.md +204 -0
  22. package/felo-x-search/scripts/run_x_search.mjs +385 -0
  23. package/felo-youtube-subtitling/README.md +59 -59
  24. package/felo-youtube-subtitling/SKILL.md +161 -161
  25. package/felo-youtube-subtitling/scripts/run_youtube_subtitling.mjs +239 -239
  26. package/package.json +37 -35
  27. package/src/cli.js +370 -252
  28. package/src/config.js +66 -66
  29. package/src/search.js +142 -142
  30. package/src/slides.js +332 -332
  31. package/src/superAgent.js +609 -0
  32. package/src/{webExtract.js → webFetch.js} +148 -148
  33. package/src/xSearch.js +366 -0
  34. package/src/youtubeSubtitling.js +179 -179
  35. package/tests/config.test.js +78 -78
  36. package/tests/search.test.js +100 -100
  37. package/felo-web-extract/README.md +0 -78
  38. package/felo-web-extract/SKILL.md +0 -200
  39. package/felo-web-extract/scripts/run_web_extract.mjs +0 -232
@@ -1,87 +1,87 @@
1
- # Felo Slides Skill for Claude Code
2
-
3
- Generate presentation slides with the Felo PPT Task API (asynchronous workflow).
4
-
5
- ## Features
6
-
7
- - Generate a PPT deck from a single prompt
8
- - Poll task status automatically until completion/failure/timeout
9
- - Return `ppt_url` immediately when the task is completed (fallback to `live_doc_url`)
10
- - Return `task_id` for follow-up tracking
11
-
12
- ## Quick Start
13
-
14
- ### 1) Install the skill
15
-
16
- ```bash
17
- npx @claude/skills add felo-slides
18
- ```
19
-
20
- Or install manually from this repository:
21
-
22
- ```bash
23
- # Linux/macOS
24
- cp -r felo-slides ~/.claude/skills/
25
-
26
- # Windows (PowerShell)
27
- Copy-Item -Recurse felo-slides "$env:USERPROFILE\.claude\skills\"
28
- ```
29
-
30
- ### 2) Configure API key
31
-
32
- Create an API key at [felo.ai](https://felo.ai) -> Settings -> API Keys, then set:
33
-
34
- ```bash
35
- # Linux/macOS
36
- export FELO_API_KEY="your-api-key-here"
37
- ```
38
-
39
- ```powershell
40
- # Windows PowerShell
41
- $env:FELO_API_KEY="your-api-key-here"
42
- ```
43
-
44
- ### 3) Trigger the skill
45
-
46
- - Intent trigger: "Create a 10-slide product pitch deck"
47
- - Explicit trigger: `/felo-slides your topic`
48
-
49
- ## API Workflow
50
-
51
- Based on Felo v2 PPT Task API:
52
-
53
- 1. Create task: `POST /v2/ppts`
54
- 2. Query status (optional): `GET /v2/tasks/{task_id}/status`
55
- 3. Query historical/result: `GET /v2/tasks/{task_id}/historical`
56
-
57
- The skill polls every 10 seconds (max wait 1800 seconds). It stops immediately on `COMPLETED`/`SUCCESS` and returns `ppt_url` (fallback `live_doc_url`).
58
-
59
- Internal script example:
60
-
61
- ```bash
62
- node felo-slides/scripts/run_ppt_task.mjs --query "Felo product intro, 3 slides" --interval 10 --max-wait 1800
63
- ```
64
-
65
- ## Troubleshooting
66
-
67
- ### `FELO_API_KEY` is missing
68
-
69
- Set the environment variable and restart the Claude Code session.
70
-
71
- ### `INVALID_API_KEY`
72
-
73
- The key is invalid or revoked. Generate a new key from [felo.ai](https://felo.ai).
74
-
75
- ### Task keeps running for too long
76
-
77
- The task may still be processing. Retry later with the same context, or run the script with `--verbose`.
78
-
79
- ### Task completed but no `ppt_url` / `live_doc_url`
80
-
81
- Use the returned `task_id` to query historical endpoint again.
82
-
83
- ## Links
84
-
85
- - [PPT Task API](https://openapi.felo.ai/docs/api-reference/v2/ppt-tasks.html)
86
- - [Felo Open Platform](https://openapi.felo.ai/docs/)
87
- - [Get API Key](https://felo.ai)
1
+ # Felo Slides Skill for Claude Code
2
+
3
+ Generate presentation slides with the Felo PPT Task API (asynchronous workflow).
4
+
5
+ ## Features
6
+
7
+ - Generate a PPT deck from a single prompt
8
+ - Poll task status automatically until completion/failure/timeout
9
+ - Return `ppt_url` immediately when the task is completed (fallback to `live_doc_url`)
10
+ - Return `task_id` for follow-up tracking
11
+
12
+ ## Quick Start
13
+
14
+ ### 1) Install the skill
15
+
16
+ ```bash
17
+ npx @claude/skills add felo-slides
18
+ ```
19
+
20
+ Or install manually from this repository:
21
+
22
+ ```bash
23
+ # Linux/macOS
24
+ cp -r felo-slides ~/.claude/skills/
25
+
26
+ # Windows (PowerShell)
27
+ Copy-Item -Recurse felo-slides "$env:USERPROFILE\.claude\skills\"
28
+ ```
29
+
30
+ ### 2) Configure API key
31
+
32
+ Create an API key at [felo.ai](https://felo.ai) -> Settings -> API Keys, then set:
33
+
34
+ ```bash
35
+ # Linux/macOS
36
+ export FELO_API_KEY="your-api-key-here"
37
+ ```
38
+
39
+ ```powershell
40
+ # Windows PowerShell
41
+ $env:FELO_API_KEY="your-api-key-here"
42
+ ```
43
+
44
+ ### 3) Trigger the skill
45
+
46
+ - Intent trigger: "Create a 10-slide product pitch deck"
47
+ - Explicit trigger: `/felo-slides your topic`
48
+
49
+ ## API Workflow
50
+
51
+ Based on Felo v2 PPT Task API:
52
+
53
+ 1. Create task: `POST /v2/ppts`
54
+ 2. Query status (optional): `GET /v2/tasks/{task_id}/status`
55
+ 3. Query historical/result: `GET /v2/tasks/{task_id}/historical`
56
+
57
+ The skill polls every 10 seconds (max wait 1800 seconds). It stops immediately on `COMPLETED`/`SUCCESS` and returns `ppt_url` (fallback `live_doc_url`).
58
+
59
+ Internal script example:
60
+
61
+ ```bash
62
+ node felo-slides/scripts/run_ppt_task.mjs --query "Felo product intro, 3 slides" --interval 10 --max-wait 1800
63
+ ```
64
+
65
+ ## Troubleshooting
66
+
67
+ ### `FELO_API_KEY` is missing
68
+
69
+ Set the environment variable and restart the Claude Code session.
70
+
71
+ ### `INVALID_API_KEY`
72
+
73
+ The key is invalid or revoked. Generate a new key from [felo.ai](https://felo.ai).
74
+
75
+ ### Task keeps running for too long
76
+
77
+ The task may still be processing. Retry later with the same context, or run the script with `--verbose`.
78
+
79
+ ### Task completed but no `ppt_url` / `live_doc_url`
80
+
81
+ Use the returned `task_id` to query historical endpoint again.
82
+
83
+ ## Links
84
+
85
+ - [PPT Task API](https://openapi.felo.ai/docs/api-reference/v2/ppt-tasks.html)
86
+ - [Felo Open Platform](https://openapi.felo.ai/docs/)
87
+ - [Get API Key](https://felo.ai)
@@ -1,166 +1,166 @@
1
- ---
2
- name: felo-slides
3
- description: "Generate PPT/slides with Felo PPT Task API in Claude Code. Use when users ask to create/make/generate/export presentations or slide decks, or when explicit commands like /felo-slides are used. Handles API key check, task creation, polling, and final ppt_url output."
4
- ---
5
-
6
- # Felo Slides Skill
7
-
8
- ## When to Use
9
-
10
- Trigger this skill for requests about creating presentation files:
11
-
12
- - Create/generate slides from a topic or outline
13
- - Turn notes into a PPT deck
14
- - Build a presentation with a page count requirement
15
- - Export presentation content into a shareable slide link
16
-
17
- Trigger keywords:
18
-
19
- - Chinese prompts about making slides or presentations
20
- - English: slides, PPT, presentation deck, generate presentation
21
- - Explicit commands: `/felo-slides`, "use felo slides"
22
-
23
- Do NOT use this skill for:
24
-
25
- - Real-time information lookup (use `felo-search`)
26
- - Questions about local codebase files
27
- - Pure text tasks that do not require slide generation
28
-
29
- ## Setup
30
-
31
- ### 1. Get API key
32
-
33
- 1. Visit [felo.ai](https://felo.ai)
34
- 2. Open Settings -> API Keys
35
- 3. Create and copy your API key
36
-
37
- ### 2. Configure environment variable
38
-
39
- Linux/macOS:
40
-
41
- ```bash
42
- export FELO_API_KEY="your-api-key-here"
43
- ```
44
-
45
- Windows PowerShell:
46
-
47
- ```powershell
48
- $env:FELO_API_KEY="your-api-key-here"
49
- ```
50
-
51
- ## How to Execute
52
-
53
- Use Bash tool commands and follow this workflow exactly.
54
-
55
- ### Step 1: Precheck API key
56
-
57
- ```bash
58
- if [ -z "$FELO_API_KEY" ]; then
59
- echo "ERROR: FELO_API_KEY not set"
60
- exit 1
61
- fi
62
- ```
63
-
64
- If key is missing, stop and return setup instructions.
65
-
66
- ### Step 2: Run Node Script (create + poll)
67
-
68
- Use the bundled script (no `jq` dependency):
69
-
70
- ```bash
71
- node felo-slides/scripts/run_ppt_task.mjs \
72
- --query "USER_PROMPT_HERE" \
73
- --interval 10 \
74
- --max-wait 1800 \
75
- --timeout 60
76
- ```
77
-
78
- Script behavior:
79
-
80
- - Creates task via `POST https://openapi.felo.ai/v2/ppts`
81
- - Polls via `GET https://openapi.felo.ai/v2/tasks/{task_id}/historical`
82
- - Treats `COMPLETED`/`SUCCESS` as success terminal (case-insensitive)
83
- - Treats `FAILED`/`ERROR` as failure terminal
84
- - Stops polling immediately on terminal status
85
- - Prints `ppt_url` on success (fallback: `live_doc_url`)
86
-
87
- Optional debug output:
88
-
89
- ```bash
90
- node felo-slides/scripts/run_ppt_task.mjs \
91
- --query "USER_PROMPT_HERE" \
92
- --interval 10 \
93
- --max-wait 1800 \
94
- --json \
95
- --verbose
96
- ```
97
-
98
- This outputs structured JSON including:
99
-
100
- - `task_id`
101
- - `task_status`
102
- - `ppt_url`
103
- - `live_doc_url`
104
- - `livedoc_short_id`
105
- - `ppt_business_id`
106
- - `error_message`
107
-
108
- ### Step 4: Return structured result
109
-
110
- On success, return:
111
-
112
- - `ppt_url` immediately (script default output, fallback `live_doc_url`)
113
- - if `--json` is used, also include `task_id`, terminal status, and optional metadata
114
-
115
- ## Output Format
116
-
117
- Use this response structure:
118
-
119
- ```markdown
120
- ## PPT Generation Result
121
-
122
- - Task ID: <task_id>
123
- - Status: <status>
124
- - PPT URL: <ppt_url>
125
- - Live Doc URL: <live_doc_url or N/A>
126
-
127
- ## Notes
128
-
129
- - livedoc_short_id: <value or N/A>
130
- - ppt_business_id: <value or N/A>
131
- ```
132
-
133
- Error format:
134
-
135
- ```markdown
136
- ## PPT Generation Failed
137
-
138
- - Error Type: <error code or category>
139
- - Message: <readable message>
140
- - Suggested Action: <next step>
141
- ```
142
-
143
- ## Error Handling
144
-
145
- Known API error codes:
146
-
147
- - `INVALID_API_KEY` (401): key invalid or revoked
148
- - `PPT_TASK_CREATE_FAILED` (502): create task downstream failed
149
- - `PPT_TASK_QUERY_FAILED` (502): query task downstream failed
150
-
151
- Timeout handling:
152
-
153
- - If timeout reached, return last known status and instruct user to retry later
154
- - Include `task_id` so user can query again
155
-
156
- ## Important Notes
157
-
158
- - Always execute this skill when user intent is slide generation.
159
- - Always return `task_id` so follow-up queries can continue from the same task.
160
- - Do not claim completion without a terminal status.
161
- - Keep API calls minimal: create once, then poll.
162
-
163
- ## References
164
-
165
- - [Felo PPT Task API](https://openapi.felo.ai/docs/api-reference/v2/ppt-tasks.html)
166
- - [Felo Open Platform](https://openapi.felo.ai/docs/)
1
+ ---
2
+ name: felo-slides
3
+ description: "Generate PPT/slides with Felo PPT Task API in Claude Code. Use when users ask to create/make/generate/export presentations or slide decks, or when explicit commands like /felo-slides are used. Handles API key check, task creation, polling, and final ppt_url output."
4
+ ---
5
+
6
+ # Felo Slides Skill
7
+
8
+ ## When to Use
9
+
10
+ Trigger this skill for requests about creating presentation files:
11
+
12
+ - Create/generate slides from a topic or outline
13
+ - Turn notes into a PPT deck
14
+ - Build a presentation with a page count requirement
15
+ - Export presentation content into a shareable slide link
16
+
17
+ Trigger keywords:
18
+
19
+ - Chinese prompts about making slides or presentations
20
+ - English: slides, PPT, presentation deck, generate presentation
21
+ - Explicit commands: `/felo-slides`, "use felo slides"
22
+
23
+ Do NOT use this skill for:
24
+
25
+ - Real-time information lookup (use `felo-search`)
26
+ - Questions about local codebase files
27
+ - Pure text tasks that do not require slide generation
28
+
29
+ ## Setup
30
+
31
+ ### 1. Get API key
32
+
33
+ 1. Visit [felo.ai](https://felo.ai)
34
+ 2. Open Settings -> API Keys
35
+ 3. Create and copy your API key
36
+
37
+ ### 2. Configure environment variable
38
+
39
+ Linux/macOS:
40
+
41
+ ```bash
42
+ export FELO_API_KEY="your-api-key-here"
43
+ ```
44
+
45
+ Windows PowerShell:
46
+
47
+ ```powershell
48
+ $env:FELO_API_KEY="your-api-key-here"
49
+ ```
50
+
51
+ ## How to Execute
52
+
53
+ Use Bash tool commands and follow this workflow exactly.
54
+
55
+ ### Step 1: Precheck API key
56
+
57
+ ```bash
58
+ if [ -z "$FELO_API_KEY" ]; then
59
+ echo "ERROR: FELO_API_KEY not set"
60
+ exit 1
61
+ fi
62
+ ```
63
+
64
+ If key is missing, stop and return setup instructions.
65
+
66
+ ### Step 2: Run Node Script (create + poll)
67
+
68
+ Use the bundled script (no `jq` dependency):
69
+
70
+ ```bash
71
+ node felo-slides/scripts/run_ppt_task.mjs \
72
+ --query "USER_PROMPT_HERE" \
73
+ --interval 10 \
74
+ --max-wait 1800 \
75
+ --timeout 60
76
+ ```
77
+
78
+ Script behavior:
79
+
80
+ - Creates task via `POST https://openapi.felo.ai/v2/ppts`
81
+ - Polls via `GET https://openapi.felo.ai/v2/tasks/{task_id}/historical`
82
+ - Treats `COMPLETED`/`SUCCESS` as success terminal (case-insensitive)
83
+ - Treats `FAILED`/`ERROR` as failure terminal
84
+ - Stops polling immediately on terminal status
85
+ - Prints `ppt_url` on success (fallback: `live_doc_url`)
86
+
87
+ Optional debug output:
88
+
89
+ ```bash
90
+ node felo-slides/scripts/run_ppt_task.mjs \
91
+ --query "USER_PROMPT_HERE" \
92
+ --interval 10 \
93
+ --max-wait 1800 \
94
+ --json \
95
+ --verbose
96
+ ```
97
+
98
+ This outputs structured JSON including:
99
+
100
+ - `task_id`
101
+ - `task_status`
102
+ - `ppt_url`
103
+ - `live_doc_url`
104
+ - `livedoc_short_id`
105
+ - `ppt_business_id`
106
+ - `error_message`
107
+
108
+ ### Step 4: Return structured result
109
+
110
+ On success, return:
111
+
112
+ - `ppt_url` immediately (script default output, fallback `live_doc_url`)
113
+ - if `--json` is used, also include `task_id`, terminal status, and optional metadata
114
+
115
+ ## Output Format
116
+
117
+ Use this response structure:
118
+
119
+ ```markdown
120
+ ## PPT Generation Result
121
+
122
+ - Task ID: <task_id>
123
+ - Status: <status>
124
+ - PPT URL: <ppt_url>
125
+ - Live Doc URL: <live_doc_url or N/A>
126
+
127
+ ## Notes
128
+
129
+ - livedoc_short_id: <value or N/A>
130
+ - ppt_business_id: <value or N/A>
131
+ ```
132
+
133
+ Error format:
134
+
135
+ ```markdown
136
+ ## PPT Generation Failed
137
+
138
+ - Error Type: <error code or category>
139
+ - Message: <readable message>
140
+ - Suggested Action: <next step>
141
+ ```
142
+
143
+ ## Error Handling
144
+
145
+ Known API error codes:
146
+
147
+ - `INVALID_API_KEY` (401): key invalid or revoked
148
+ - `PPT_TASK_CREATE_FAILED` (502): create task downstream failed
149
+ - `PPT_TASK_QUERY_FAILED` (502): query task downstream failed
150
+
151
+ Timeout handling:
152
+
153
+ - If timeout reached, return last known status and instruct user to retry later
154
+ - Include `task_id` so user can query again
155
+
156
+ ## Important Notes
157
+
158
+ - Always execute this skill when user intent is slide generation.
159
+ - Always return `task_id` so follow-up queries can continue from the same task.
160
+ - Do not claim completion without a terminal status.
161
+ - Keep API calls minimal: create once, then poll.
162
+
163
+ ## References
164
+
165
+ - [Felo PPT Task API](https://openapi.felo.ai/docs/api-reference/v2/ppt-tasks.html)
166
+ - [Felo Open Platform](https://openapi.felo.ai/docs/)