胥克谦式AI-Native产品开发方法论。适用于:(1) 使用AI Agent(Claude Code、Codex、Cursor等)进行产品级软件开发,(2) 设计和优化Harness/Skill体系,(3) 文档驱动开发(SDD)流程,(4) 构建自动化质量门禁和eval机制,(5) Token成本优化与缓存策略,(6) 产品人转型开发者的AI编程实践。触发场景包括"帮我设计开发流程"、"怎么降低token成本"、"怎么提高AI编码质量"、"文档驱动"、"质量门禁"、"harness设计"、"单agent vs multi-agent"、"自动化迭代"、"AI产品开发"、"SDD"、"eval机制"等。即使用户只是说"帮我用AI写代码"或"怎么让agent干活更靠谱"也应触发。注意:如果产品是行为开放、用户输入不可穷举的AI-native类型,请改用 xuefeng-method skill。不用于:单个bug修复或小改动(无需方法论)、PRD需求文档写作(用product-manager)。
npx skills add https://github.com/staruhub/ClaudeSkills --skill keqian-method
> 核心理念:产品人思维 × 极致单Agent × 文档驱动 × 质量门禁闭环
>
> 来源:胥克谦——从音乐教师到产品经理到AI-Native连续创业者,皮影客创始人,
> 十几万行自建skill和脚本的harness工程实践者。
概率乘是第一性原理。
每个环节的成功率相乘决定最终质量。即使每次0.99,n=51后也不及格。
因此:不追求一次完美,追求每个环节可验证、可修复、可迭代。
推论:
不盲目使用multi-agent。单agent做到极致,再考虑编排。
实践建议: 如果不确定,选顺序执行。慢但可靠。
7成精力投入文档质量和harness,3成精力写代码。
1. 需求文档(PRD/设计文档)
↓ AI辅助撰写 + 人工审核
2. 技术文档(架构决策、接口规范)
↓ AI维护 + 人工把关
3. 代码实现
↓ Agent执行 + 质量门禁拦截
4. 文档回写(代码变更 → 文档自动更新)
↓ 闭环
文档的自动化质量控制比代码难很多。关键点:
严格的质量门禁 = 高缓存命中率 = 高质量 = 低成本。
每个Action → 对应Eval → 通过/不通过
↓ 不通过
自动修复(最多N轮)→ 仍不通过 → 升级给人类
自动化修正流程表面上浪费token,但实际上:
实测数据: 缓存命中率99%+时,每1亿token ≈ 8.5 RMB,约等于不要钱。
推论: 省token其实很不划算。放开token使用量,反倒造成事实成本下降。
端到端都是复杂的,单维度都是简单的。
此方法适合场景明确、边界可定义的产品。
对于用户行为高度不可预测的AI-Native交互产品,需要补充上线后快速迭代的机制。
AI会联合你写的skill和门禁来对抗你的要求。
Phase 1: 文档先行(占总时间70%)
├── 撰写PRD(AI辅助 + 人工审核)
├── 技术架构文档(AI维护 + 人工把关)
├── 定义质量门禁和eval标准
└── 设计harness结构(skill + rule配置)
Phase 2: 代码实现(占总时间20%)
├── Agent顺序执行任务
├── 每个任务通过质量门禁
├── 不通过 → 自动修复 → 仍不通过 → 人工介入
└── 文档自动回写
Phase 3: 迭代收敛(占总时间10%)
├── 跑eval批量验证
├── 收集失败case → 分析 → 改进harness
└── 直到达到acceptable threshold
1. 不用子代理(除非任务明确无依赖)
2. 顺序给任务,每个任务带eval
3. 放着跑,定期查看
4. 门禁拦住的问题 → 分析是harness问题还是模型问题
5. harness问题 → 改skill/rule
6. 模型问题 → 换模型或降低任务粒度
基于实战经验:
"做一个马鞍,再做一个拆马鞍的工具" — 群友评价
"一抓就死,一放就乱" — 管理的永恒难题
"多烧 ≠ 多花钱" — 反直觉的真理
"端到端复杂,单维度简单" — 产品拆解的核心
"慢点就慢点,但牢靠" — 稳定性压倒一切
更多方法论细节请查阅:
references/sdd-framework.md — SDD文档驱动开发框架详细流程references/eval-patterns.md — 质量门禁和Eval模式库evals/routing-evals.json — 触发边界回归用例(含与 xuefeng-method 的互斥镜像),改动 description 后用仓库根 scripts/run_routing_evals.py 校验This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.
Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent.
Coding Agent Session Search - unified CLI/TUI to index and search local coding agent history from Claude Code, Codex, Gemini, Cursor, Aider, ChatGPT, Pi-Agent, Factory, and more. Purpose-built for AI agent consumption with robot mode.
Destructive Command Guard - High-performance Rust hook for Claude Code that blocks dangerous commands before execution. SIMD-accelerated, modular pack system, whitelist-first architecture. Essential safety layer for agent workflows.
Makepad UI development skills for Rust apps: setup, patterns, shaders, packaging, and troubleshooting.
Secure environment variable management ensuring secrets are never exposed in Claude sessions, terminals, logs, or git commits
Prompt for generating an AGENTS.md file for a repository
Take staruhub/keqian-method from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.