一键导入
vertical-ordering
Use when writing new functions, extracting helpers, refactoring modules, or reorganizing code — any time function placement order is a decision
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when writing new functions, extracting helpers, refactoring modules, or reorganizing code — any time function placement order is a decision
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when creating, opening, or submitting a pull request in a Dimagi mobile/CommCare repo — identified by JIRA-prefixed branches (e.g. CCCT-1929-...), a `RELEASES.md` with `### Release Notes` and `### QA Notes` sections, and the dimagi PR template (Safety story / Product Description / Technical Summary / QA Plan). Also triggers on "ship this" or when implementation is complete and ready to push. For repos without these conventions, use the generic `create-pr` skill instead.
Fix CI failures and address review feedback on the current branch's PR. Use when CI is failing, review comments need addressing, or you need to push fixes for an open PR. Supports --dry-run to preview without changes.
Run a full dependency audit for a project — covers Python (pip-tools) and front-end (npm/yarn) if present. Produces report, applies safe bumps, emits Jira-ready ticket list for risky/EoL items. Use when running quarterly maintenance or on demand.
End of day wrap-up — captures what got done, what didn't, and plans for tomorrow. Weekly close-out on configurable review day (default Friday).
Conversational skill for reviewing, updating, and refining your professional goals.
Morning check-in — surfaces goals, summarizes where you left off, captures today's plan, and gives goal-alignment feedback. Weekly review mode on configurable review day (default Friday).
| name | vertical-ordering |
| description | Use when writing new functions, extracting helpers, refactoring modules, or reorganizing code — any time function placement order is a decision |
| user-invocable | false |
Place caller functions above their callees. High-level logic first, implementation details below. Read top-down like a newspaper article.
This is the "Vertical Ordering" principle from Clean Code (Robert C. Martin, Chapter 5).
# ✅ CORRECT: Caller above callee
def process_order(order):
validate_order(order)
submit_order(order)
def validate_order(order):
...
def submit_order(order):
...
# ❌ WRONG: Helpers defined before caller
def validate_order(order):
...
def submit_order(order):
...
def process_order(order):
validate_order(order)
submit_order(order)
| Scenario | Ordering |
|---|---|
| Extract a helper from a function | Helper goes below the function it was extracted from |
| Public API function calls private helpers | Public function first, private helpers below |
| Chain of calls: A → B → C | Order: A, then B, then C |
| Multiple callers share a helper | Helper goes below its first caller |