bobo-ai-cli 1.0.1 → 1.1.0
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/bundled-skills/Skill_Seekers/SKILL.md +1722 -0
- package/bundled-skills/ab-test-setup/SKILL.md +557 -0
- package/bundled-skills/adversarial-verification/SKILL.md +95 -0
- package/bundled-skills/agent-sdk-dev/SKILL.md +238 -0
- package/bundled-skills/agent-tools/SKILL.md +136 -0
- package/bundled-skills/analytics-tracking/SKILL.md +597 -0
- package/bundled-skills/artifacts-builder/SKILL.md +89 -0
- package/bundled-skills/asana/SKILL.md +13 -0
- package/bundled-skills/backend-expert/SKILL.md +97 -0
- package/bundled-skills/brand-voice/SKILL.md +481 -0
- package/bundled-skills/browser-use/SKILL.md +419 -0
- package/bundled-skills/cache-optimization-skill/SKILL.md +179 -0
- package/bundled-skills/canvas-design/SKILL.md +147 -0
- package/bundled-skills/citation-validator/SKILL.md +203 -0
- package/bundled-skills/clangd-lsp/SKILL.md +52 -0
- package/bundled-skills/code-review/SKILL.md +280 -0
- package/bundled-skills/code-review-expert/SKILL.md +85 -0
- package/bundled-skills/code-simplifier/SKILL.md +13 -0
- package/bundled-skills/commit-commands/SKILL.md +258 -0
- package/bundled-skills/competitor-alternatives/SKILL.md +795 -0
- package/bundled-skills/content-atomizer/SKILL.md +910 -0
- package/bundled-skills/content-research-writer/SKILL.md +605 -0
- package/bundled-skills/context-budget-analyzer/SKILL.md +76 -0
- package/bundled-skills/context-compressor/SKILL.md +75 -0
- package/bundled-skills/context-optimization-suite/SKILL.md +162 -0
- package/bundled-skills/context7/SKILL.md +13 -0
- package/bundled-skills/copy-editing/SKILL.md +494 -0
- package/bundled-skills/copywriting/SKILL.md +510 -0
- package/bundled-skills/csharp-lsp/SKILL.md +40 -0
- package/bundled-skills/decision-making-framework/SKILL.md +154 -0
- package/bundled-skills/deep-research/SKILL.md +236 -0
- package/bundled-skills/developer-growth-analysis/SKILL.md +335 -0
- package/bundled-skills/direct-response-copy/SKILL.md +2336 -0
- package/bundled-skills/docker-expert/SKILL.md +229 -0
- package/bundled-skills/document-skills/SKILL.md +13 -0
- package/bundled-skills/documentation-expert/SKILL.md +126 -0
- package/bundled-skills/email-sequence/SKILL.md +1061 -0
- package/bundled-skills/email-sequences/SKILL.md +910 -0
- package/bundled-skills/example-plugin/SKILL.md +72 -0
- package/bundled-skills/explanatory-output-style/SKILL.md +82 -0
- package/bundled-skills/feature-dev/SKILL.md +458 -0
- package/bundled-skills/file-organizer/SKILL.md +466 -0
- package/bundled-skills/firebase.disabled/SKILL.md +13 -0
- package/bundled-skills/form-cro/SKILL.md +488 -0
- package/bundled-skills/free-tool-strategy/SKILL.md +636 -0
- package/bundled-skills/frontend-design/SKILL.md +41 -0
- package/bundled-skills/frontend-design-offical/SKILL.md +55 -0
- package/bundled-skills/frontend-expert/SKILL.md +93 -0
- package/bundled-skills/github/SKILL.md +13 -0
- package/bundled-skills/gitlab/SKILL.md +13 -0
- package/bundled-skills/gopls-lsp/SKILL.md +32 -0
- package/bundled-skills/got-controller/SKILL.md +218 -0
- package/bundled-skills/greptile/SKILL.md +72 -0
- package/bundled-skills/high-agency/SKILL.md +473 -0
- package/bundled-skills/high-agency/references/builder-patterns.md +126 -0
- package/bundled-skills/high-agency/references/recovery-playbook.md +298 -0
- package/bundled-skills/hookify/SKILL.md +376 -0
- package/bundled-skills/image-editor/SKILL.md +189 -0
- package/bundled-skills/image-enhancer/SKILL.md +109 -0
- package/bundled-skills/jdtls-lsp/SKILL.md +49 -0
- package/bundled-skills/json-canvas/SKILL.md +654 -0
- package/bundled-skills/keyword-research/SKILL.md +559 -0
- package/bundled-skills/kotlin-lsp/SKILL.md +28 -0
- package/bundled-skills/laravel-boost/SKILL.md +13 -0
- package/bundled-skills/launch-strategy/SKILL.md +394 -0
- package/bundled-skills/lead-magnet/SKILL.md +393 -0
- package/bundled-skills/learning-output-style/SKILL.md +106 -0
- package/bundled-skills/linear/SKILL.md +13 -0
- package/bundled-skills/lua-lsp/SKILL.md +47 -0
- package/bundled-skills/marketing-ideas/SKILL.md +720 -0
- package/bundled-skills/marketing-psychology/SKILL.md +534 -0
- package/bundled-skills/mcp-builder/SKILL.md +369 -0
- package/bundled-skills/meeting-insights-analyzer/SKILL.md +347 -0
- package/bundled-skills/memory-evolution-system/SKILL.md +172 -0
- package/bundled-skills/memory-manager/SKILL.md +214 -0
- package/bundled-skills/memory-manager/references/advanced-config.md +65 -0
- package/bundled-skills/multi-lens-thinking/SKILL.md +407 -0
- package/bundled-skills/nano-banana-pro/SKILL.md +116 -0
- package/bundled-skills/newsletter/SKILL.md +736 -0
- package/bundled-skills/notebooklm/SKILL.md +296 -0
- package/bundled-skills/obsidian-bases/SKILL.md +634 -0
- package/bundled-skills/obsidian-markdown/SKILL.md +651 -0
- package/bundled-skills/onboarding-cro/SKILL.md +494 -0
- package/bundled-skills/orchestrator/SKILL.md +681 -0
- package/bundled-skills/page-cro/SKILL.md +379 -0
- package/bundled-skills/paid-ads/SKILL.md +624 -0
- package/bundled-skills/paywall-upgrade-cro/SKILL.md +651 -0
- package/bundled-skills/php-lsp/SKILL.md +36 -0
- package/bundled-skills/planning-with-files/SKILL.md +193 -0
- package/bundled-skills/playwright/SKILL.md +13 -0
- package/bundled-skills/plugin-dev/SKILL.md +434 -0
- package/bundled-skills/popup-cro/SKILL.md +520 -0
- package/bundled-skills/positioning-angles/SKILL.md +330 -0
- package/bundled-skills/pr-review-toolkit/SKILL.md +359 -0
- package/bundled-skills/pricing-strategy/SKILL.md +777 -0
- package/bundled-skills/proactive-self-improving/SKILL.md +435 -0
- package/bundled-skills/programmatic-seo/SKILL.md +714 -0
- package/bundled-skills/pyright-lsp/SKILL.md +43 -0
- package/bundled-skills/quality-assurance-framework/SKILL.md +168 -0
- package/bundled-skills/question-refiner/SKILL.md +160 -0
- package/bundled-skills/ralph-loop/SKILL.md +205 -0
- package/bundled-skills/refactoring-expert/SKILL.md +103 -0
- package/bundled-skills/referral-program/SKILL.md +668 -0
- package/bundled-skills/research-executor/SKILL.md +164 -0
- package/bundled-skills/review-with-security/SKILL.md +12 -0
- package/bundled-skills/rust-analyzer-lsp/SKILL.md +50 -0
- package/bundled-skills/schema-markup/SKILL.md +647 -0
- package/bundled-skills/security-audit-expert/SKILL.md +124 -0
- package/bundled-skills/security-expert/SKILL.md +140 -0
- package/bundled-skills/security-guidance/SKILL.md +13 -0
- package/bundled-skills/seedance-prompt/SKILL.md +139 -0
- package/bundled-skills/self-evolution/SKILL.md +1160 -0
- package/bundled-skills/seo-audit/SKILL.md +432 -0
- package/bundled-skills/seo-content/SKILL.md +787 -0
- package/bundled-skills/serena/SKILL.md +13 -0
- package/bundled-skills/signup-flow-cro/SKILL.md +409 -0
- package/bundled-skills/skill-creator/SKILL.md +220 -0
- package/bundled-skills/skill-manager/SKILL.md +226 -0
- package/bundled-skills/skill-share/SKILL.md +98 -0
- package/bundled-skills/slack/SKILL.md +13 -0
- package/bundled-skills/social-content/SKILL.md +878 -0
- package/bundled-skills/spec-flow-skill/SKILL.md +124 -0
- package/bundled-skills/stripe/SKILL.md +13 -0
- package/bundled-skills/supabase/SKILL.md +13 -0
- package/bundled-skills/swift-lsp/SKILL.md +40 -0
- package/bundled-skills/synthesizer/SKILL.md +236 -0
- package/bundled-skills/template-skill/SKILL.md +16 -0
- package/bundled-skills/testing-expert/SKILL.md +99 -0
- package/bundled-skills/theme-factory/SKILL.md +72 -0
- package/bundled-skills/tiktok-research/SKILL.md +208 -0
- package/bundled-skills/typescript-lsp/SKILL.md +36 -0
- package/bundled-skills/ui-ux-pro-max/SKILL.md +247 -0
- package/bundled-skills/verify/SKILL.md +15 -0
- package/bundled-skills/visual-prompt-engineer/SKILL.md +102 -0
- package/bundled-skills/webapp-testing/SKILL.md +111 -0
- package/bundled-skills/wide-research/SKILL.md +191 -0
- package/dist/agent.js +65 -31
- package/dist/agent.js.map +1 -1
- package/dist/config.js +10 -1
- package/dist/config.js.map +1 -1
- package/dist/index.js +46 -2
- package/dist/index.js.map +1 -1
- package/dist/skills.d.ts +6 -2
- package/dist/skills.js +33 -6
- package/dist/skills.js.map +1 -1
- package/dist/ui.d.ts +2 -1
- package/dist/ui.js +37 -27
- package/dist/ui.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: context-compressor
|
|
3
|
+
description: 九段式上下文压缩 — 对话过长时生成结构化摘要,防止压缩后丢失关键上下文。解决"compact 后忘了之前在做什么"、"压缩后意图漂移"问题。适用于:(1) 对话接近 context 上限时 (2) 手动 /compact 时 (3) 需要生成对话摘要时。灵感源自 Claude Code Compact Prompt(prompt.ts 九段式模板)。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Context Compressor
|
|
7
|
+
|
|
8
|
+
## 核心理念
|
|
9
|
+
|
|
10
|
+
> 压缩不是删除 — 是把 10 万 token 的对话浓缩成 5000 token 但不丢任何关键信息。
|
|
11
|
+
|
|
12
|
+
## 压缩前准备
|
|
13
|
+
|
|
14
|
+
1. **移除图片块** — 替换为 `[image was shared]` 文本标记
|
|
15
|
+
2. **不调用任何工具** — 压缩是纯文本任务,tool call 会浪费 turn
|
|
16
|
+
|
|
17
|
+
## 九段式摘要模板
|
|
18
|
+
|
|
19
|
+
先用 `<analysis>` 整理思路(草稿,不进入最终上下文),再输出 `<summary>`:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
<analysis>
|
|
23
|
+
[按时间顺序分析每条消息,确保覆盖所有要点]
|
|
24
|
+
</analysis>
|
|
25
|
+
|
|
26
|
+
<summary>
|
|
27
|
+
1. 用户请求和意图
|
|
28
|
+
[所有明确请求,完整详述]
|
|
29
|
+
|
|
30
|
+
2. 关键技术概念
|
|
31
|
+
- [技术/框架/方案列表]
|
|
32
|
+
|
|
33
|
+
3. 文件和代码
|
|
34
|
+
- [文件名]
|
|
35
|
+
- 为什么重要
|
|
36
|
+
- 做了什么修改
|
|
37
|
+
- 关键代码片段
|
|
38
|
+
|
|
39
|
+
4. 错误和修复
|
|
40
|
+
- [错误描述]
|
|
41
|
+
- 如何修复
|
|
42
|
+
- 用户对此的反馈(如有)
|
|
43
|
+
|
|
44
|
+
5. 问题解决
|
|
45
|
+
[已解决的问题 + 正在排查的问题]
|
|
46
|
+
|
|
47
|
+
6. 所有用户消息
|
|
48
|
+
- [列出全部非工具结果的用户消息]
|
|
49
|
+
(⚠️ 这是捕捉用户意图变化的关键)
|
|
50
|
+
|
|
51
|
+
7. 待办任务
|
|
52
|
+
- [明确被要求但未完成的任务]
|
|
53
|
+
|
|
54
|
+
8. 当前工作
|
|
55
|
+
[压缩前正在做的事,附文件名和代码片段]
|
|
56
|
+
|
|
57
|
+
9. 下一步(可选)
|
|
58
|
+
[必须与最近请求直接相关]
|
|
59
|
+
> 原文引用:"用户说了什么" → 防止意图漂移
|
|
60
|
+
</summary>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## 关键规则
|
|
64
|
+
|
|
65
|
+
- **第 6 段(用户消息)是最重要的** — 不列用户消息 = 丢失意图变化
|
|
66
|
+
- **第 8 段必须具体** — 不是"正在修复 bug",而是"正在修复 src/auth.py:42 的空指针,已加了 null check 但测试还没跑"
|
|
67
|
+
- **第 9 段必须附原文引用** — 防止压缩后做跑偏的事
|
|
68
|
+
- **不要开始新的、切线的任务** — 只延续压缩前正在做的
|
|
69
|
+
|
|
70
|
+
## 压缩后恢复
|
|
71
|
+
|
|
72
|
+
压缩完成后自动恢复:
|
|
73
|
+
- 最近修改的文件内容(最多 5 个文件)
|
|
74
|
+
- 活跃 Skill 的指令重注入
|
|
75
|
+
- 工具列表变更提示
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: "context-optimization-suite"
|
|
3
|
+
title: "Context Optimization Suite"
|
|
4
|
+
category: "agent-engineering"
|
|
5
|
+
tags: ["context optimization suite", "when to use", "compressed context", "combined workflow", "quick reference"]
|
|
6
|
+
triggers: []
|
|
7
|
+
dependencies: []
|
|
8
|
+
source: "E:/Bobo's Coding cache/.claude/skills/context-optimization-suite"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
name: context-optimization-suite
|
|
13
|
+
description: Unified context management - combines context-budget-analyzer (token budget tracking) + context-compressor (95% context compression). Use when context is tight, approaching limits, or when resuming long sessions.
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Context Optimization Suite
|
|
17
|
+
|
|
18
|
+
> **Merged from**: context-budget-analyzer + context-compressor
|
|
19
|
+
> **Token savings**: Up to 95% context reduction while preserving critical information
|
|
20
|
+
|
|
21
|
+
## When to Use
|
|
22
|
+
|
|
23
|
+
- Context window approaching 70%+ capacity
|
|
24
|
+
- Resuming a long session with accumulated context
|
|
25
|
+
- Before compaction to preserve key information
|
|
26
|
+
- When `cacheCreationInputTokens` = 0 (cache miss)
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Module 1: Budget Analyzer
|
|
31
|
+
|
|
32
|
+
### Budget Threshold System
|
|
33
|
+
|
|
34
|
+
| Level | Usage | Action |
|
|
35
|
+
|-------|-------|--------|
|
|
36
|
+
| Green | <50% | Normal operation |
|
|
37
|
+
| Yellow | 50-75% | Efficiency awareness, prefer targeted tools |
|
|
38
|
+
| Orange | 75-90% | Consider compaction or session split |
|
|
39
|
+
| Red | >90% | Immediate compaction required |
|
|
40
|
+
|
|
41
|
+
### Token Category Tracking
|
|
42
|
+
|
|
43
|
+
Monitor these categories:
|
|
44
|
+
- **Human messages**: User input tokens
|
|
45
|
+
- **Assistant messages**: AI response tokens
|
|
46
|
+
- **Tool requests**: Tool call tokens
|
|
47
|
+
- **Tool results**: Tool output tokens (often the biggest waste)
|
|
48
|
+
- **Attachments**: File attachment tokens
|
|
49
|
+
- **System/Other**: System message tokens
|
|
50
|
+
|
|
51
|
+
### Optimization Rules
|
|
52
|
+
|
|
53
|
+
1. **Cache file contents** after first read — never re-read the same file
|
|
54
|
+
2. **Use Grep** instead of full file reads when searching
|
|
55
|
+
3. **Compress images** before attachment
|
|
56
|
+
4. **Limit bash output** with `head -N` / `tail -N`
|
|
57
|
+
5. **Keep assistant responses concise** — no trailing summaries
|
|
58
|
+
|
|
59
|
+
### Duplicate Detection
|
|
60
|
+
|
|
61
|
+
Track file reads per session. If a file is read 3+ times, it's a waste signal:
|
|
62
|
+
```
|
|
63
|
+
File: src/index.ts — Read 4 times — ~8,000 tokens wasted
|
|
64
|
+
Action: Cache content after first read
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Module 2: Context Compressor
|
|
70
|
+
|
|
71
|
+
### 9-Section Compression Template
|
|
72
|
+
|
|
73
|
+
When compressing context, produce exactly this structure:
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
## Compressed Context
|
|
77
|
+
|
|
78
|
+
### 1. User Request
|
|
79
|
+
[Original user prompt/goal in 1-2 sentences]
|
|
80
|
+
|
|
81
|
+
### 2. Key Technical Concepts
|
|
82
|
+
- [Concept 1]: [Brief explanation]
|
|
83
|
+
- [Concept 2]: [Brief explanation]
|
|
84
|
+
|
|
85
|
+
### 3. Key Files and Code
|
|
86
|
+
- `path/to/file.ts:L42-L58` — [What it does]
|
|
87
|
+
- `path/to/other.ts:L10-L25` — [Key function]
|
|
88
|
+
|
|
89
|
+
### 4. Key Errors and Fixes
|
|
90
|
+
- **Error**: [Error message] → **Fix**: [Solution applied]
|
|
91
|
+
|
|
92
|
+
### 5. Problem-Solving Process
|
|
93
|
+
1. [Step 1: What was tried]
|
|
94
|
+
2. [Step 2: What worked]
|
|
95
|
+
3. [Step 3: Current approach]
|
|
96
|
+
|
|
97
|
+
### 6. User Messages (condensed)
|
|
98
|
+
- [Message 1 summary]
|
|
99
|
+
- [Message 2 summary]
|
|
100
|
+
|
|
101
|
+
### 7. Todos and Tasks
|
|
102
|
+
- [ ] [Remaining task 1]
|
|
103
|
+
- [x] [Completed task 2]
|
|
104
|
+
|
|
105
|
+
### 8. Current Work
|
|
106
|
+
[What is being worked on RIGHT NOW — 2-3 sentences]
|
|
107
|
+
|
|
108
|
+
### 9. Next Steps
|
|
109
|
+
1. [Immediate next action]
|
|
110
|
+
2. [Following action]
|
|
111
|
+
3. [Final verification]
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Compression Ratios
|
|
115
|
+
|
|
116
|
+
| Context Size | Compressed Size | Ratio |
|
|
117
|
+
|-------------|----------------|-------|
|
|
118
|
+
| 100k tokens | ~5k tokens | 95% |
|
|
119
|
+
| 50k tokens | ~3k tokens | 94% |
|
|
120
|
+
| 20k tokens | ~2k tokens | 90% |
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Combined Workflow
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
Session starts
|
|
128
|
+
↓
|
|
129
|
+
Monitor budget (Module 1)
|
|
130
|
+
↓
|
|
131
|
+
Budget > 75%?
|
|
132
|
+
├─ No → Continue normally
|
|
133
|
+
└─ Yes → Apply compression (Module 2)
|
|
134
|
+
↓
|
|
135
|
+
Resume with compressed context
|
|
136
|
+
↓
|
|
137
|
+
Monitor budget again
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Cache-Aware Optimization (cc-cache-fix integration)
|
|
141
|
+
|
|
142
|
+
With cc-cache-fix installed (`claude-patched`):
|
|
143
|
+
- Cache TTL extended to 1 hour → fewer re-reads needed
|
|
144
|
+
- Delta attachments preserved → resume works better
|
|
145
|
+
- Hash stability → same content = same cache hit
|
|
146
|
+
|
|
147
|
+
**Strategy shift**: With good caching, prioritize keeping referenced files in cache rather than aggressively compressing.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Quick Reference
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
# Check context budget (mental model)
|
|
155
|
+
# Green: <50% — proceed normally
|
|
156
|
+
# Yellow: 50-75% — be efficient
|
|
157
|
+
# Orange: 75-90% — compress soon
|
|
158
|
+
# Red: >90% — compress NOW
|
|
159
|
+
|
|
160
|
+
# Compress context using the 9-section template
|
|
161
|
+
# Output only the compressed version, nothing else
|
|
162
|
+
```
|