AGENT SKILL

metrics-and-okrs

Define OKRs, KPIs, success metrics, and engineering health metrics (DORA). Triggers: OKR, KPI, metrics, success metrics, key results, objectives, measure success, DORA metrics, engineering metrics, velocity, cycle time, deployment frequency, how do we measure, what should we track.

License 许可
MIT
最近更新
2026-11-12
Stars
★ 1
Forks
1

01 前言 Front Matter

name
metrics-and-okrs
description
Define OKRs, KPIs, success metrics, and engineering health metrics (DORA). Triggers: OKR, KPI, metrics, success metrics, key results, objectives, measure success, DORA metrics, engineering metrics, velocity, cycle time, deployment frequency, how do we measure, what should we track.

02 资源文件 3

03 SKILL.md 正文

Metrics & OKRs

Define meaningful metrics that drive decisions and OKRs that align engineering work with business outcomes. Good metrics answer "are we succeeding?" Bad metrics create busywork.

Core Rule

Every metric must drive a decision. If knowing the metric's value wouldn't change what you do, stop tracking it. Metrics without decisions are vanity metrics.

Workflow: OKRs

Step 1: Understand the Context

Before writing OKRs:

  • What's the time horizon? Quarterly is standard. Annual is too long for engineering.
  • What level? Company → Team → Individual? Start with team-level.
  • What's the business priority? Growth? Retention? Reliability? Cost reduction?
  • What did we learn from last quarter? What OKRs were hit, missed, and why?

Step 2: Write Objectives

An Objective is a qualitative, inspiring goal that answers "where do we want to go?"

Good Objectives:

  • "Make the checkout experience delightfully fast"
  • "Build a platform our enterprise customers trust"
  • "Eliminate the deployment bottleneck"

Bad Objectives:

  • "Improve latency by 40%" (this is a Key Result, not an Objective)
  • "Complete the Q3 roadmap" (this is output, not outcome)
  • "Increase revenue" (too vague, not actionable by engineering)

Rules: 3-5 objectives per team per quarter. Each should be ambitious but achievable. If you hit 100% of all OKRs, you aimed too low. 70% achievement is healthy.

Step 3: Write Key Results

Key Results are quantitative measures that prove the Objective is being met.

Good Key Results:

  • "Reduce checkout page load time from 3.2s to under 1.5s at P95"
  • "Achieve 99.95% API availability (up from 99.8%)"
  • "Reduce time from PR merge to production from 4 hours to 30 minutes"

Bad Key Results:

  • "Launch the new checkout page" (this is output, not outcome)
  • "Improve performance" (not measurable)
  • "No production incidents" (not realistic and incentivizes hiding incidents)

Each Objective should have 2-4 Key Results. Each Key Result needs:

  • Current value (baseline)
  • Target value (goal)
  • How it's measured (data source, calculation)

Step 4: Validate the OKRs

Check each OKR against these criteria:

  • [ ] Is the Objective inspiring and clearly directional?
  • [ ] Are Key Results measurable with a specific number?
  • [ ] Can we actually measure this today? (If not, first KR might be "instrument X")
  • [ ] Do Key Results measure outcomes, not outputs?
  • [ ] Is 70% achievement of all KRs realistic with focused effort?
  • [ ] Are there perverse incentives? (Reducing errors by not logging them)

Step 5: Produce the OKR Document

Use the template at templates/okr-document.md.

Workflow: Project Success Metrics

For any project or feature, define metrics in three categories:

Leading indicators (early signals during development):

  • Sprint velocity, burndown trend, scope change rate
  • Test coverage of new code, CI pipeline pass rate

Lagging indicators (results after launch):

  • User adoption (DAU, feature usage rate)
  • Performance metrics (latency, error rate, availability)
  • Business metrics (conversion rate, revenue, support ticket volume)

Health indicators (ongoing system health):

  • DORA metrics (see below)
  • Technical debt metrics (code quality trends, dependency freshness)

See references/metric-catalog.md for a catalog of useful metrics by category.

Workflow: DORA Engineering Metrics

The four DORA metrics are the industry standard for measuring engineering team effectiveness:

Metric What It Measures Elite High Medium Low
Deployment Frequency How often you deploy Multiple/day Weekly Monthly Quarterly
Lead Time for Changes PR merge to production < 1 hour < 1 day < 1 week > 1 month
Change Failure Rate % of deploys causing incidents < 5% < 10% < 15% > 30%
Mean Time to Recover Incident to resolution < 1 hour < 1 day < 1 week > 1 month

These four metrics together tell you if your team is delivering quickly and reliably. Optimizing one at the expense of another is a trap (deploying fast but breaking things, or never breaking things but never shipping).

Principles Applied

  • KISS: 3-5 OKRs per team, 2-4 KRs each. More means none get attention.
  • Outcomes over outputs: Measure "user checkout time reduced" not "new checkout page shipped."
  • YAGNI: Don't build a metrics dashboard for 50 KPIs. Start with the 5 that would actually change a decision.
  • Leading over lagging: Prefer metrics you can act on now over metrics you can only measure after the fact.

04 同仓库更多 Skills

SWEStash
SWEStash/swe-workflow-skills

writing-skills

Use when authoring, editing, or reviewing a skill in this library — a new SKILL.md, one that under-triggers, or hardening an existing one. Covers description and listing-budget rules, frontmatter, progressive disclosure, the 3-eval rule, and pressure-testing against rationalizations.

内容创作者财务测试与质量写作与文案
★ 1
SWEStash
SWEStash/swe-workflow-skills

working-agreement

Define and validate how a multi-session project is run — where plans, status and decisions live, session routines, new work, milestone close. README/CONTRIBUTING → project-documentation.

Skill与智能体开发
★ 1
SWEStash
SWEStash/swe-workflow-skills

verification-before-completion

Evidence gate before any claim that work is done, fixed, passing, or deployed. Route here when a message declares the work finished or asks to commit, push, merge, ship, or close it out, including a brief sign-off, and before git-workflow or release-management act on it. Writing the commit message or PR text itself → git-workflow.

Skill与智能体开发
★ 1
SWEStash
SWEStash/swe-workflow-skills

ui-ux-design

Design user experiences from an engineer's perspective — user flows, wireframes, interaction patterns, responsive strategy, navigation, loading/error/empty states. Triggers: design the UI, user flow, wireframe, how should this screen look, loading state, error state, empty state, responsive design, navigation, page layout, form design, mockup.

设计师视觉设计Skill与智能体开发
★ 1
SWEStash
SWEStash/swe-workflow-skills

threat-modeling

Design-time security analysis of a system or feature before it's built — trust boundaries, attack surface, STRIDE per element, abuse cases, prioritized mitigations that become security requirements. Triggers: threat model, STRIDE, trust boundary, attack surface, what could go wrong security-wise, security design review, abuse case, secure this design, security requirements. Reviewing EXISTING code/config for vulnerabilities → security-audit; use this skill while the design is still on the whiteboard.

开发工程师Skill与智能体开发
★ 1
SWEStash
SWEStash/swe-workflow-skills

test-suite-design

Design comprehensive test suites for existing code — strategy across unit/integration/e2e, fixtures, factories, helpers. Triggers: add tests, write tests for, increase coverage, test this module, testing strategy, test plan, what tests do I need, test infrastructure, test helpers, this has no tests. Not for TDD — use tdd-workflow.

开发工程师设计师测试与质量视觉设计
★ 1