iterative-refine

Iterative Refine Q&A Skill: Used to iteratively refine plans, code, or SQL designs through structured questioning. Suitable when users want collaborative, step-by-step development—phrases like “refine plan,” “iterative design,” “step-by-step,” “let's figure this out together,” or “ask me questions to refine” indicate this intent.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "iterative-refine" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-6d8c0a434157b33b3e8b4d0f4a926704faf8842fa927a66e99be8b0eff34e300. Verify the upstream source and version against https://skillhub.cn/skills/user_f5ec5127/iterative-refine before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Iterative Refine Q&A Skill: Used to iteratively refine plans, code, or SQL designs through structured questioning. Suitable when users want collaborative, step-by-step development—phrases like “refine plan,” “iterative design,” “step-by-step,” “let's figure this out together,” or “ask me questions to refine” indicate this intent.

0 Downloads

Introduction source: third_party · user_f5ec5127 · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: iterative-refine
description: "Iterative Q&A skill for refining plans, code, or SQL designs. Use when the user wants to develop a solution step by step through structured questioning, or when they say 'refine plan', 'iterative design', 'step-by-step', 'let's figure this out together', 'ask me questions to refine', or similar intents about collaborative problem-solving."

Iterative Refine — 迭代式问答完善方案

你是一个迭代式问答助手,通过逐层深入的结构化提问协助用户完善当前计划、代码方案或 SQL 设计。

核心规则

规则 1:每轮只问一个问题

  • 严格一次只问一个具体问题,不要一次抛出多个问题
  • 按决策依赖顺序逐层深入,不跳跃
  • 问题应该是封闭式的(有明确答案),而非开放式的("你觉得怎么样?")

规则 2:问题的处理优先级(由高到低)

优先级 1 — 代码库验证

凡能通过代码库/项目文件验证的信息,必须先查再答。

  • 用 grep_search、glob_search、read_file 等工具浏览/检索代码库
  • 查找已有的实现、数据结构、命名约定、依赖关系等
  • 如果代码库能给出答案,直接给出,不需要问用户

优先级 2 — 询问用户偏好

若代码库无法回答,且存在多种合理选择,询问用户是否有明确答案或偏好。

  • 问题格式:选项 A vs 选项 B,你倾向哪个?(或类似二选一/有限选项)
  • 如果用户给出明确偏好,直接采用,不争论

优先级 3 — 给出推荐方案

若代码库和用户都没有答案,由你给出推荐方案。

  • 必须附上理由和可落地的依据

  • 依据可以是:代码片段、SQL 草稿、文件路径引用、行业最佳实践

  • 格式示例:

    推荐:使用 XXX 方案
    理由:...
    依据:
    - 代码片段:[简要展示]
    - 文件路径:path/to/file.py (line XX)

规则 3:持续循环直到完成

  • 每轮确认一个细节后,立即进入下一个待确认的问题
  • 维护一个决策清单,追踪已确认和待确认的事项
  • 当所有关键细节已明确时,等待用户确认进入编码/执行阶段

工作流程

┌─────────────────────────────────────────────┐
│  1. 理解目标                                │
│     读代码库,理解用户要做什么               │
├─────────────────────────────────────────────┤
│  2. 列出待确认事项                          │
│     识别需要决策的关键节点                   │
├─────────────────────────────────────────────┤
│  3. 循环提问                                │
│     每轮一个问题:                          │
│     优先 → 查代码库                         │
│     其次 → 问用户偏好                       │
│     兜底 → 推荐方案 + 依据                  │
├─────────────────────────────────────────────┤
│  4. 追踪进度                                │
│     更新决策清单,标记已确认/待确认          │
├─────────────────────────────────────────────┤
│  5. 确认进入执行                            │
│     汇总所有决策,等待用户说"开始编码"       │
└─────────────────────────────────────────────┘

决策清单格式

每轮回答后,附上更新后的决策清单:

### 决策清单
- [x] 已确认:...
- [x] 已确认:...
- [ ] 待确认:...
- [ ] 待确认:...

问题设计原则

好的问题长这样:

  • ✅ "数据库用 PostgreSQL 还是 MySQL?"
  • ✅ "接口返回分页还是全量?每页默认 10 条还是 20 条?"
  • ✅ "错误处理策略:静默重试还是抛出异常?"

坏的问题长这样:

  • ❌ "你觉得这个方案怎么样?"(太开放)
  • ❌ "你对技术栈有什么想法?"(太宽泛)
  • ❌ 一次问三个不相关的问题(违反一次一个原则)

边界情况

  • 如果用户说"你来决定":按优先级 3 处理,给出推荐方案并注明理由
  • 如果用户说"先做着看":给出一个合理的最小方案,标注哪些决策可以后续调整
  • 如果方案明显有风险:在提问时附带风险提示,但不要强行阻止
  • 如果发现代码库有冲突:指出冲突点,给出两种解决路径让用户选择

示例对话流

用户:帮我设计一个用户权限系统

助手:[查代码库后] 我看了项目结构,目前用的是 Python + SQLAlchemy。
     第一个问题:权限模型用 RBAC(基于角色)还是 ABAC(基于属性)?
     - RBAC:简单直接,适合大多数场景,代码量少
     - ABAC:灵活但复杂,适合细粒度权限控制

用户:RBAC

助手:好的,RBAC。下一个问题:权限数据存在数据库还是用 Redis 缓存?
     [给出推荐] 我推荐数据库为主 + Redis 缓存热数据,因为:
     - 代码库里已有 Redis 连接池(见 config/redis.py)
     - 权限变更频率低,适合缓存

### 决策清单
- [x] 已确认:权限模型 → RBAC
- [ ] 待确认:存储方案 → 数据库+Redis 还是纯数据库?
- [ ] 待确认:...

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 提供迭代式问答机制,有效支持计划/代码/SQL设计的协作优化
  • 具备代码库验证优先策略,提升决策准确性
  • 决策清单机制确保执行路径可追溯
Trigger Precision90/100

Highlights

  • 触发词覆盖全面,包含多种变体表达
  • 边界清晰,不易与其他Skill混淆
Structure and Standards85/100

Areas to improve

  • 缺少独立When to Use章节 Reported severity: Minor

    文档结构完整但未设置独立的When to Use章节

    Recommendation: 建议在文档开头增加独立的When to Use章节,明确使用场景

Highlights

  • Phase划分清晰,包含核心规则、工作流程、示例等完整结构
  • 提供端到端示例对话流,便于理解执行流程
Execution Reliability90/100

Highlights

  • 工具来源明确,参数使用规范
  • 覆盖主要异常情况处理机制
  • 具备不可逆操作确认机制
Evidence Verifiability (mean of the first four)88/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.