基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/cvsz/zeaz-platform --skill zai-analytics命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Master skill combining related sub-skills
Provides foundational definitions for the ZAI Agents Pack, encompassing the Omega Master Agent Matrix and associated lifecycle setups.
Comprehensive guide to Artificial Intelligence basics, including LLMs, Machine Learning, and Generative AI principles.
| name | zai-analytics |
| description | Techniques for data analysis, business intelligence (BI), and KPI tracking. |
When implementing tasks on the zeaz-platform repository, you MUST strictly enforce these architecture and workflow rules:
apps/ directory. Do not create top-level directories for apps. When refactoring or adding features, always scope your work to the specific apps/<app-name>/ folder..env files. Consolidate environment variables into a central .env.example inside the respective app folder. Canonical Cloudflare variables (e.g. CLOUDFLARE_API_TOKEN, CLOUDFLARE_ZONE_ID) MUST be used instead of legacy CF_ variants.git commit or git push directly. ALWAYS stage your intended files with git add and commit using make gpg-finalize COMMIT_MSG="..." from the repository root to ensure all GitOps and DevSecOps checks pass.test-secret-value-value-value, test-secret-value-value-value, test-secret-value-value-value are FORBIDDEN.Analytics is the systematic computational analysis of data. It transforms raw metrics into strategic decisions for marketing, product, and operations.
A data discipline for startups distilled from Alistair Croll and Benjamin Yoskovitz's Lean Analytics: separate metrics that change decisions from numbers that merely flatter, then point the whole company at the One Metric That Matters for your business model and stage. Use it to choose metrics, audit dashboards, set targets, and plan instrumentation.
Focus on the one metric that matters right now — everything else is noise that feels like progress. Startups die from lack of focus more often than lack of data. The discipline is knowing your business model, knowing your stage, and tracking the single number that tells you whether the riskiest part of the business is working. A metric earns attention only if it changes what you do next.
Goal: 10/10. Rate metric choices, dashboards, and instrumentation plans 0-10 against these principles. Report the current score and the specific changes needed to reach 10/10.
Core concept: A good metric is comparative (versus last week, versus another cohort), understandable (the team can recall and debate it), a ratio or rate (not an ever-growing total), and behavior-changing — if a number won't change what you do, stop measuring it. Vanity metrics — total signups, page views, cumulative anything — only go up and only make you feel good.
Why it works: The output of analytics is decisions, not data. Ratios are inherently comparative and operable, while totals hide decay: total registered users rises even while the product bleeds actives. Forcing every metric through the "what will we do differently?" test converts reporting into learning.
Key insights:
Applications:
| Context | Application | Example |
|---|---|---|
| Dashboard audit | Rewrite each total as a ratio | Total signups → % of visitors activating within 7 days |
| Board reporting | Show cohorts, not cumulative curves | Retention by signup month replaces "users over time" |
| Feature decision | Demand a behavior-changing metric | "If D7 retention doesn't rise 10%, the feature comes out" |
Ethical boundary: Metrics exist to describe and serve users, not manipulate them — instrument only what you need and respect privacy in what you collect.
See: references/good-metrics.md
Core concept: At any moment there is one number that matters above all others — the one that tells you whether the current riskiest assumption is working. Pick it, display it everywhere, and let it drive every experiment until you graduate to the next stage.
Why it works: The OMTM answers the most important question you have right now, forces you to draw a line in the sand so "good" is defined before results arrive, and focuses the entire company. A dashboard of forty numbers diffuses accountability; one number creates a shared scoreboard and a culture of experimentation.
Key insights:
Applications:
| Context | Application | Example |
|---|---|---|
| Quarterly planning | One OMTM per stage; experiments ladder up to it | Stickiness stage → all bets target week-4 retention |
| Dashboard design | OMTM big, 4-6 supporting metrics small | Wall display: paid conversion 3.2% huge; CAC, churn, NPS below |
| Team alignment | Pre-commit the miss response | "Under 10% by March 1 → we pivot to the agency segment" |
Ethical boundary: The line in the sand disciplines the company's bets, not individuals — turning the OMTM into personal quotas invites gaming and hides truth.
See: references/omtm.md
Core concept: Your business model dictates which metrics exist and which matter. Lean Analytics defines six archetypes — e-commerce, SaaS, free mobile app, media site, user-generated content, and two-sided marketplace — each with its own metric tree and its own definition of "working."
Why it works: Copying another company's north star fails because metrics encode the mechanics of a model: a marketplace lives or dies on liquidity, a SaaS business on churn, a media site on engaged attention. Naming your model first turns "what should we measure?" from a brainstorm into a lookup.
Key insights:
Applications:
| Context | Application | Example |
|---|---|---|
| New product instrumentation | Name the model, install its metric tree | Subscription box → primary model SaaS; churn tracked before AOV |
| North-star debate | Derive from model mechanics, don't copy | Marketplace adopts fill rate, not a SaaS-style MRR target |
| Investor dashboard | Report the model's canonical ratios | SaaS deck: MRR growth, net churn, LTV:CAC, CAC payback |
See: references/business-model-metrics.md
Core concept: Startups move through five stages — Empathy, Stickiness, Virality, Revenue, Scale — and each has a gate. The OMTM is the intersection of business model and current stage; working on a later stage's metric before passing the current gate is the canonical startup mistake.
Why it works: Sequencing prevents waste. Virality poured into a product that doesn't retain is a leaky bucket; paid acquisition before unit economics burns runway with precision. Each gate de-risks the next, larger investment of money and time.
Key insights:
Applications:
| Context | Application | Example |
|---|---|---|
| Growth-spend decision | Check the stickiness gate first | D30 retention at 4% → fix onboarding before buying ads |
| Roadmap prioritization | Stage picks the OMTM; OMTM picks the work | Stickiness stage ships onboarding fixes, not a referral program |
| Fundraising narrative | Pitch the passed gate and its evidence | "Week-4 retention flat at 35% — raising to scale acquisition" |
See: references/five-stages.md
Core concept: A metric without a target is trivia. Use published baselines as starting heuristics — not laws — to define "good enough," then draw your line in the sand: a number, a date, and a pre-committed action if you miss.
Why it works: Baselines convert open-ended measurement into falsifiable bets. Knowing that ~5% monthly churn is the early-SaaS ceiling tells you whether to optimize or rebuild; without a line, every result can be rationalized and no experiment can fail.
Key insights:
Applications:
| Context | Application | Example |
|---|---|---|
| Target setting | Baseline → line in the sand → pre-commitment | "Churn under 4% by Q3 or we rebuild onboarding" |
| Anomaly triage | Compare to your own baseline before benchmarks | Conversion fell 2.4% → 1.9% in a week — investigate the release |
| Channel evaluation | Re-derive benchmarks per channel | Paid social converts 0.8%, search 4% — budget follows the line |
See: references/case-studies.md
| Mistake | Why It Fails | Fix |
|---|---|---|
| A dashboard with 40 metrics | Diffuses focus; nobody owns anything | One OMTM big, 4-6 supporting metrics, archive the rest |
| Celebrating cumulative charts | Totals can't go down, so they hide decay | Plot rates, conversions, and cohort retention instead |
| Copying another company's north star | Metrics encode model mechanics you don't share | Derive the OMTM from your model × stage |
| Skipping cohorts | Blended averages mask whether the product improves | Track each signup cohort separately over time |
| Optimizing virality before stickiness | Growth multiplies churn — the leaky bucket | Pass the retention gate, then build invite loops |
| Measuring what's easy, not what's risky | Decisions still get made on gut | Instrument the riskiest assumption first |
| No line in the sand | Every result gets rationalized; experiments can't fail | Pre-commit target, date, and miss response |
| Confusing correlation with causation | You pump a metric that doesn't drive the outcome | Run a controlled experiment before investing |
| Question | If No | Action |
|---|---|---|
| Can you name your OMTM right now? | Focus is diffused across a dashboard | Pick one metric from current model × stage |
| Would this metric change what you do next? | You're reporting, not deciding | Drop it, or define the decision it gates |
| Is it a ratio or rate, not a total? | Vanity risk — totals only go up | Rewrite as a conversion, retention, or per-user rate |
| Do you know your business model archetype? | Wrong metric tree installed | Name one of the six models; adopt its metrics |
| Do you know your stage (Empathy → Scale)? | Probably optimizing a later stage too early | Find the first unpassed gate; that's your stage |
| Is there a target with a date and a miss plan? | Goalposts will move after results | Draw the line in the sand in writing |
| Is the data cohorted and segmented? | Averages are hiding the truth | Build cohort tables; split by channel and segment |
| Is a counter-metric guarding the OMTM? | The OMTM will be gamed | Pair it, e.g. signup growth × 30-day retention |
Alistair Croll is an entrepreneur and analyst who co-founded web performance company Coradiant, founded Solve For Interesting, and chairs Startupfest among other technology conferences. Benjamin Yoskovitz is a founding partner at venture studio Highline Beta and a serial founder and startup investor. They wrote Lean Analytics for Eric Ries's Lean Series.
Integration reference for Plankton (credit: @alxfazio), a write-time code quality enforcement system for Claude Code. Plankton runs formatters and linters on every file edit via PostToolUse hooks, then spawns Claude subprocesses to fix violations the agent didn't catch.
Every time Claude Code edits or writes a file, Plankton's multi_linter.sh PostToolUse hook runs:
Phase 1: Auto-Format (Silent)
├─ Runs formatters (ruff format, biome, shfmt, taplo, markdownlint)
├─ Fixes 40-50% of issues silently
└─ No output to main agent
Phase 2: Collect Violations (JSON)
├─ Runs linters and collects unfixable violations
├─ Returns structured JSON: {line, column, code, message, linter}
└─ Still no output to main agent
Phase 3: Delegate + Verify
├─ Spawns claude -p subprocess with violations JSON
├─ Routes to model tier based on violation complexity:
│ ├─ Haiku: formatting, imports, style (E/W/F codes) — 120s timeout
│ ├─ Sonnet: complexity, refactoring (C901, PLR codes) — 300s timeout
│ └─ Opus: type system, deep reasoning (unresolved-attribute) — 600s timeout
├─ Re-runs Phase 1+2 to verify fixes
└─ Exit 0 if clean, Exit 2 if violations remain (reported to main agent)
| Scenario | Agent sees | Hook exit |
|---|---|---|
| No violations | Nothing | 0 |
| All fixed by subprocess | Nothing | 0 |
| Violations remain after subprocess | [hook] N violation(s) remain | 2 |
| Advisory (duplicates, old tooling) | [hook:advisory] ... | 0 |
The main agent only sees issues the subprocess couldn't fix. Most quality problems are resolved transparently.
LLMs will modify .ruff.toml or biome.json to disable rules rather than fix code. Plankton blocks this with three layers:
protect_linter_configs.sh blocks edits to all linter configs before they happenstop_config_guardian.sh detects config changes via git diff at session end.ruff.toml, biome.json, .shellcheckrc, .yamllint, .hadolint.yaml, and moreA PreToolUse hook on Bash blocks legacy package managers:
pip, pip3, poetry, pipenv → Blocked (use uv)npm, yarn, pnpm → Blocked (use bun)npm audit, npm view, npm publishNote: Plankton requires manual installation from its repository. Review the code before installing.
# Install core dependencies
brew install jaq ruff uv
# Install Python linters
uv sync --all-extras
# Start Claude Code — hooks activate automatically
claude
No install command, no plugin config. The hooks in .claude/settings.json are picked up automatically when you run Claude Code in the Plankton directory.
To use Plankton hooks in your own project:
.claude/hooks/ directory to your project.claude/settings.json hook configuration.ruff.toml, biome.json, etc.)| Language | Required | Optional |
|---|---|---|
| Python | ruff, uv | ty (types), vulture (dead code), bandit (security) |
| TypeScript/JS | biome | oxlint, semgrep, knip (dead exports) |
| Shell | shellcheck, shfmt | — |
| YAML | yamllint | — |
| Markdown | markdownlint-cli2 | — |
| Dockerfile | hadolint (>= 2.12.0) | — |
| TOML | taplo | — |
| JSON | jaq | — |
| Concern | ECC | Plankton |
|---|---|---|
| Code quality enforcement | PostToolUse hooks (Prettier, tsc) | PostToolUse hooks (20+ linters + subprocess fixes) |
| Security scanning | AgentShield, security-reviewer agent | Bandit (Python), Semgrep (TypeScript) |
| Config protection | — | PreToolUse blocks + Stop hook detection |
| Package manager | Detection + setup | Enforcement (blocks legacy PMs) |
| CI integration | — | Pre-commit hooks for git |
| Model routing | Manual (/model opus) | Automatic (violation complexity → tier) |
If running both ECC and Plankton hooks:
Plankton's .claude/hooks/config.json controls all behavior:
{
"languages": {
"python": true,
"shell": true,
"yaml": true,
"json": true,
"toml": true,
"dockerfile": true,
"markdown": true,
"typescript": {
"enabled": true,
"js_runtime": "auto",
"biome_nursery": "warn",
"semgrep": true
}
}
Key settings:
volume_threshold — violations > this count auto-escalate to a higher model tiersubprocess_delegation: false — skip Phase 3 entirely (just report violations)| Variable | Purpose |
|---|---|
HOOK_SKIP_SUBPROCESS=1 | Skip Phase 3, report violations directly |
HOOK_SUBPROCESS_TIMEOUT=N | Override tier timeout |
HOOK_DEBUG_MODEL=1 | Log model selection decisions |
HOOK_SKIP_PM=1 | Bypass package manager enforcement |
Set strict quality behavior:
export ECC_HOOK_PROFILE=strict
export ECC_QUALITY_GATE_FIX=true
export ECC_QUALITY_GATE_STRICT=true
During quality enforcement, flag changes to config files in same iteration:
biome.json, .eslintrc*, prettier.config*, tsconfig.json, pyproject.tomlIf config is changed to suppress violations, require explicit review before merge.
Use the same commands in CI as local hooks:
Track: