@zhanngning/hecode 0.3.1 → 0.3.2
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.
- package/README.md +90 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -133,47 +133,118 @@ pip install akshare pandas
|
|
|
133
133
|
|
|
134
134
|
## Skill System
|
|
135
135
|
|
|
136
|
+
Hecode uses a skill-based architecture to handle different tasks. Each skill provides specialized instructions for specific domains.
|
|
137
|
+
|
|
136
138
|
### Built-in Skills
|
|
137
139
|
|
|
138
140
|
| Skill | Trigger Words | Description |
|
|
139
141
|
|-------|---------------|-------------|
|
|
140
|
-
| `coding` | code, fix, debug, refactor, implement | Write clean, minimal code |
|
|
141
|
-
| `testing` | test, unit test, TDD, BDD | Write
|
|
142
|
-
| `ppt` | ppt, presentation, slides,
|
|
143
|
-
| `planning` | plan, project, roadmap,
|
|
144
|
-
| `finance` | finance, 股票, 金融,
|
|
142
|
+
| `coding` | code, fix, debug, refactor, implement, write, create, build | Write clean, minimal code following best practices |
|
|
143
|
+
| `testing` | test, testing, unit test, integration test, e2e, TDD, BDD | Write tests, test-driven development |
|
|
144
|
+
| `ppt` | ppt, presentation, slides, 演示, 幻灯片, 汇报 | Create professional presentations |
|
|
145
|
+
| `planning` | plan, planning, project, roadmap, 项目, 计划, 规划 | Create project plans and roadmaps |
|
|
146
|
+
| `finance` | finance, 股票, 金融, 研究报告, stock | Financial analysis and research reports |
|
|
147
|
+
|
|
148
|
+
### Skill Details
|
|
145
149
|
|
|
146
|
-
|
|
150
|
+
#### Coding Skill
|
|
151
|
+
Write production-ready code with:
|
|
152
|
+
- Clean, minimal implementations
|
|
153
|
+
- Follow existing project conventions
|
|
154
|
+
- Proper error handling
|
|
155
|
+
- Type safety
|
|
147
156
|
|
|
148
157
|
```bash
|
|
149
|
-
|
|
150
|
-
hecode --skill coding "
|
|
158
|
+
hecode --skill coding "implement user authentication with JWT"
|
|
159
|
+
hecode --skill coding "refactor the database connection module"
|
|
160
|
+
hecode --skill coding "fix the memory leak in the event handler"
|
|
161
|
+
```
|
|
151
162
|
|
|
152
|
-
|
|
153
|
-
|
|
163
|
+
#### Testing Skill
|
|
164
|
+
Comprehensive testing support:
|
|
165
|
+
- Unit tests, integration tests, E2E tests
|
|
166
|
+
- TDD workflow (Red-Green-Refactor)
|
|
167
|
+
- Mocking and test fixtures
|
|
168
|
+
- Coverage analysis
|
|
154
169
|
|
|
155
|
-
|
|
156
|
-
hecode --skill
|
|
170
|
+
```bash
|
|
171
|
+
hecode --skill testing "write unit tests for the payment service"
|
|
172
|
+
hecode --skill testing "create integration tests for the API"
|
|
173
|
+
hecode --skill testing "help me practice TDD for a sorting algorithm"
|
|
174
|
+
```
|
|
157
175
|
|
|
158
|
-
|
|
159
|
-
|
|
176
|
+
#### PPT Skill
|
|
177
|
+
Create professional presentations:
|
|
178
|
+
- Title slides, content slides, data slides
|
|
179
|
+
- Consistent design and formatting
|
|
180
|
+
- Charts and visualizations
|
|
181
|
+
- Speaker notes
|
|
160
182
|
|
|
161
|
-
|
|
183
|
+
```bash
|
|
184
|
+
hecode --skill ppt "create a product demo presentation"
|
|
185
|
+
hecode --skill ppt "make a quarterly business review deck"
|
|
186
|
+
hecode --skill ppt "设计一个技术分享PPT"
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
#### Planning Skill
|
|
190
|
+
Project planning and management:
|
|
191
|
+
- Project scope and objectives
|
|
192
|
+
- Timeline and milestones
|
|
193
|
+
- Task breakdown and dependencies
|
|
194
|
+
- Risk assessment
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
hecode --skill planning "create a project plan for the new feature"
|
|
198
|
+
hecode --skill planning "制定Q3季度开发计划"
|
|
199
|
+
hecode --skill planning "create a roadmap for the next 6 months"
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
#### Financial Analysis Skill
|
|
203
|
+
Stock analysis and research reports:
|
|
204
|
+
- Real-time price data (A-shares, HK stocks)
|
|
205
|
+
- Technical indicators (MA, RSI, MACD)
|
|
206
|
+
- Trend analysis and signals
|
|
207
|
+
- Comprehensive research reports
|
|
208
|
+
|
|
209
|
+
```bash
|
|
162
210
|
hecode --skill finance "分析贵州茅台"
|
|
211
|
+
hecode --skill finance "analyze stock 600519"
|
|
212
|
+
hecode --skill finance "生成腾讯研究报告"
|
|
163
213
|
```
|
|
164
214
|
|
|
165
215
|
### Custom Skills
|
|
166
216
|
|
|
167
|
-
Create
|
|
217
|
+
Create your own skills by adding a `SKILL.md` file in `skills/<name>/`:
|
|
168
218
|
|
|
169
219
|
```markdown
|
|
170
|
-
# My Skill
|
|
220
|
+
# My Custom Skill
|
|
221
|
+
|
|
222
|
+
trigger: keyword1, keyword2, 关键词
|
|
223
|
+
|
|
224
|
+
## Instructions
|
|
171
225
|
|
|
172
|
-
|
|
226
|
+
You are an expert in [domain]. When helping users:
|
|
173
227
|
|
|
174
|
-
|
|
228
|
+
1. First understand the requirement
|
|
229
|
+
2. Provide step-by-step guidance
|
|
230
|
+
3. Use relevant tools
|
|
231
|
+
4. Verify the result
|
|
232
|
+
|
|
233
|
+
## Example
|
|
234
|
+
|
|
235
|
+
User: "help me with X"
|
|
236
|
+
Assistant: [detailed response following the skill instructions]
|
|
175
237
|
```
|
|
176
238
|
|
|
239
|
+
### Skill Selection
|
|
240
|
+
|
|
241
|
+
Skills are automatically matched based on:
|
|
242
|
+
- User input keywords
|
|
243
|
+
- Context analysis
|
|
244
|
+
- Explicit `--skill` flag
|
|
245
|
+
|
|
246
|
+
If no skill matches, the default coding behavior is used.
|
|
247
|
+
|
|
177
248
|
## Development
|
|
178
249
|
|
|
179
250
|
```bash
|