Loading...
Loading...
Compare original and translation side by side
Skill by ara.so — Daily 2026 Skills collection.
由ara.so开发的Skill — 属于Daily 2026 Skills合集。
git clone https://github.com/leo-lilinxiao/codex-autoresearch.git
cp -r codex-autoresearch your-project/.agents/skills/codex-autoresearch$skill-installer install https://github.com/leo-lilinxiao/codex-autoresearch.agents/skills/codex-autoresearch/git clone https://github.com/leo-lilinxiao/codex-autoresearch.git
cp -r codex-autoresearch your-project/.agents/skills/codex-autoresearch$skill-installer install https://github.com/leo-lilinxiao/codex-autoresearch.agents/skills/codex-autoresearch/$codex-autoresearch$codex-autoresearch
I want to get rid of all `any` types in my TypeScript codego$codex-autoresearch$codex-autoresearch
我要移除TypeScript代码中所有的`any`类型goCodex: I found 47 `any` occurrences across src/**/*.ts.
Confirmed:
- Target: eliminate `any` types in src/**/*.ts
- Metric: `any` count (current: 47), direction: lower
- Verify: grep + tsc --noEmit as guard
Need to confirm:
- Run until all gone, or cap at N iterations?
Reply "go" to start, or tell me what to change.
You: Go, run overnight.
Codex: Starting — baseline: 47. Iterating until interrupted.Codex: 我在src/**/*.ts文件中发现了47处`any`类型。
已确认内容:
- 目标:消除src/**/*.ts中的`any`类型
- 指标:`any`类型数量(当前:47),方向:减少
- 验证:使用grep + tsc --noEmit作为防护手段
需要确认的内容:
- 运行到全部消除为止,还是设置N次迭代上限?
回复"go"开始,或告诉我需要修改的内容。
你: 开始,通宵运行。
Codex: 启动中——基准值:47。将持续迭代直到被中断。PHASE 0: Probe environment (CPU/GPU/RAM/toolchains), check for session resume
PHASE 1: Read context + lessons file from prior run (if any)
LOOP (forever or N times):
1. Review current state, git history, results log, lessons
2. Pick ONE hypothesis (apply perspectives, filter by environment)
-- or N hypotheses if parallel mode is active
3. Make ONE atomic change
4. git commit (before verification)
5. Run verify command → did the target metric improve?
Run guard command → did anything else break?
6. Improved → keep (extract lesson)
Worse → approved rollback strategy (git revert)
Crashed → fix or skip
7. Log the result to results log
8. Health check (disk, git, verify health)
9. If 3+ discards → REFINE; 5+ → PIVOT; 2 PIVOTs → web search
10. Repeat. Never stop. Never ask.Iterations: NPHASE 0: 探测环境(CPU/GPU/内存/工具链),检查是否可恢复会话
PHASE 1: 读取上下文 + 上一次运行的经验文件(如果存在)
循环(无限次或N次):
1. 回顾当前状态、git历史、结果日志、经验总结
2. 选择一个假设(结合视角,根据环境过滤)
-- 如果开启并行模式,则选择N个假设
3. 进行一次原子性修改
4. git提交(在验证前)
5. 运行验证命令 → 目标指标是否有提升?
运行防护命令 → 是否有其他内容被破坏?
6. 指标提升 → 保留修改(提取经验)
指标恶化 → 执行已批准的回滚策略(git revert)
运行崩溃 → 修复或跳过
7. 将结果记录到结果日志
8. 健康检查(磁盘、git、验证机制状态)
9. 如果连续3次丢弃修改 → **优化**;连续5次 → **转向**;2次转向后 → 网页搜索
10. 重复循环。永不停止,永不询问。Iterations: N| Gate | Purpose | Fails means |
|---|---|---|
| Verify | Did the target metric improve? | Change discarded, reverted |
| Guard | Did anything else break? | Change reworked (up to 2 attempts), then reverted |
Verify: pytest --cov=src --cov-report=term 2>&1 | grep TOTAL | awk '{print $NF}'
Guard: python -m mypy src --ignore-missing-importsVerify: grep -r "any" src --include="*.ts" | wc -l
Guard: npx tsc --noEmit| 验证门 | 作用 | 失败意味着 |
|---|---|---|
| Verify(验证) | 目标指标是否有提升? | 修改会被丢弃并回滚 |
| Guard(防护) | 是否有其他内容被破坏? | 修改会被重新处理(最多2次尝试),之后回滚 |
Verify: pytest --cov=src --cov-report=term 2>&1 | grep TOTAL | awk '{print $NF}'
Guard: python -m mypy src --ignore-missing-importsVerify: grep -r "any" src --include="*.ts" | wc -l
Guard: npx tsc --noEmitlooploop$codex-autoresearch
Improve test coverage in src/ to at least 80%$codex-autoresearch
Reduce bundle size — it's currently 2.3 MB, get it under 1 MB$codex-autoresearch
将src/目录的测试覆盖率提升至至少80%$codex-autoresearch
减小打包体积——当前为2.3 MB,目标降至1 MB以下planplan$codex-autoresearch
I want to make our API faster but I don't know where to start$codex-autoresearch
我想让我们的API更快,但不知道从哪里入手fixfix$codex-autoresearch
pytest is failing, 12 tests broken after the refactor — fix them all$codex-autoresearch
pytest运行失败,重构后有12个测试用例损坏——全部修复debugdebug$codex-autoresearch
Our API returns 503 randomly under load, no idea why$codex-autoresearch
我们的API在负载下会随机返回503错误,不知道原因securitysecurity$codex-autoresearch
Is this code secure?$codex-autoresearch
这段代码安全吗?shipship$codex-autoresearch
Ship it$codex-autoresearch
发布上线execexec$codex-autoresearch
Run the benchmark suite and summarize results$codex-autoresearch
运行基准测试套件并总结结果| Phrase | Effect |
|---|---|
| Cap the loop at 20 iterations |
| Test 3 hypotheses concurrently per round |
| Override the inferred guard command |
| Override the inferred verify command |
| Restrict changes to a subdirectory |
You: Go. Iterations: 30, Guard: npm test, Scope: src/api/| 语句 | 效果 |
|---|---|
| 将循环上限设置为20次 |
| 每轮同时测试3个假设 |
| 覆盖自动推断的防护命令 |
| 覆盖自动推断的验证命令 |
| 将修改限制在指定子目录 |
你: 开始。Iterations: 30, Guard: npm test, Scope: src/api/.agents/skills/codex-autoresearch/lessons.mdIteration 7 — KEPT
Hypothesis: replace explicit `any` with inferred generic in src/utils/mapper.ts
Change: added <T extends Record<string, unknown>> to mapKeys()
Result: any count 31 → 29
Lesson: Generic constraints on utility functions eliminate clusters of `any` downstream.$codex-autoresearch
Resume.agents/skills/codex-autoresearch/lessons.md第7次迭代 — 保留修改
假设:将src/utils/mapper.ts中的显式`any`替换为推断泛型
修改:为mapKeys()添加<T extends Record<string, unknown>>约束
结果:`any`类型数量从31降至29
经验:对工具函数添加泛型约束可消除下游大量的`any`类型。$codex-autoresearch
恢复You: Go, parallel 4你: 开始,并行4个假设| Consecutive discards | Action |
|---|---|
| 3 | REFINE — narrow hypothesis, try smaller atomic changes |
| 5 | PIVOT — change strategy entirely |
| 2 PIVOTs | Web search — Codex fetches external references to unstick itself |
| 连续丢弃修改次数 | 操作 |
|---|---|
| 3 | 优化 — 缩小假设范围,尝试更小的原子性修改 |
| 5 | 转向 — 完全改变策略 |
| 2次转向 | 网页搜索 — Codex会获取外部参考资料以打破僵局 |
anyanyundefinedundefined
Tell Codex during confirmation:
```text
Verify: python scripts/count_any.py
Guard: npx tsc --noEmit
在确认时告知Codex:
```text
Verify: python scripts/count_any.py
Guard: npx tsc --noEmitundefinedundefined
```text
$codex-autoresearch
Improve test coverage — target 85%
Verify: python scripts/coverage_pct.py
Guard: python -m mypy src
Direction: higher
Target: 85
Iterations: 50
```text
$codex-autoresearch
提升测试覆盖率——目标85%
Verify: python scripts/coverage_pct.py
Guard: python -m mypy src
Direction: higher
Target: 85
Iterations: 50undefinedundefined
```text
$codex-autoresearch
Reduce our JS bundle size, currently ~2300 KB, target under 900 KB
Verify: bash scripts/bundle_size.sh
Guard: npm test
Direction: lower
Target: 900
```text
$codex-autoresearch
减小我们的JS打包体积,当前约2300 KB,目标降至900 KB以下
Verify: bash scripts/bundle_size.sh
Guard: npm test
Direction: lower
Target: 900undefinedundefined
```text
$codex-autoresearch
Get our ESLint warning count to zero
Verify: bash scripts/lint_count.sh
Direction: lower
Target: 0
```text
$codex-autoresearch
将ESLint警告计数降至零
Verify: bash scripts/lint_count.sh
Direction: lower
Target: 0git commitgit revertgit clone . /tmp/autoresearch-sandbox
cd /tmp/autoresearch-sandboxgit commitgit revertgit clone . /tmp/autoresearch-sandbox
cd /tmp/autoresearch-sandbox
Results accumulate in git history. Pull the winning commits back to your main repo when done:
```bash
结果会累积在git历史中。完成后,将成功的提交合并回主仓库:
```bash
---
---| File | Contents |
|---|---|
| Structured lessons from every iteration |
| Full per-iteration log (metric value, kept/reverted, elapsed) |
| Current session state for resume |
| 文件 | 内容 |
|---|---|
| 每次迭代的结构化经验总结 |
| 完整的逐次迭代日志(指标值、保留/回滚、耗时) |
| 当前会话状态,用于恢复运行 |
bash -c "<your verify command>"Direction: lowerDirection: higherScope: src/specific-module/Do not touch tests/session.jsonrm .agents/skills/codex-autoresearch/session.jsonParallel: 2Guard: <command> || trueHint: try tree-shaking unused imports firstplanloopbash -c "<你的验证命令>"Direction: lowerDirection: higherScope: src/specific-module/不要修改tests/目录session.jsonrm .agents/skills/codex-autoresearch/session.jsonParallel: 2Guard: <command> || true提示:先尝试摇树优化未使用的导入planloopundefinedundefinedundefinedundefined