Agent skill

Attribution Analysis

by larry-zy in larry-zy/cognida

归因/根因分析技能,把指标的期间变化拆解到候选维度,定位驱动因子并给出置信与下钻建议. An agent skill from larry-zy/cognida.

MITAuto-check passed

Install Attribution Analysis

skills CLI
$ npx skills add larry-zy/cognida --skill attribution-analysis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install larry-zy/cognida attribution-analysis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/larry-zy/cognida.git skills-src && mkdir -p .claude/skills && cp -r skills-src/services/cognida-go/skills/attribution-analysis .claude/skills/attribution-analysis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
attribution-analysis
GitHub stars
182
Token cost
~524 tokens
SKILL.md length
79 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

归因/根因分析技能,把指标的期间变化拆解到候选维度,定位驱动因子并给出置信与下钻建议. An agent skill from larry-zy/cognida.

  • SKILL.md covers 何时用 / 何时不用, 标准流程, 工具 and 编排(按上下文重量分流), plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Attribution Analysis is an agent skill from larry-zy/cognida. 归因/根因分析技能,把指标的期间变化拆解到候选维度,定位驱动因子并给出置信与下钻建议。

Its SKILL.md is about 520 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: 不止是能问数据的助手——受治理、可审计、可度量的企业级「数据+知识」Agent 平台. The licence is MIT.

Example prompts

  • “/attribution-analysis”

What it can do on your machine

Read from SKILL.md and the folder at commit bf76257. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Attribution Analysis loads about 524 tokens when it runs. Until then it costs about 16 tokens; SKILL.md has 79 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~16
When it runs · the whole SKILL.md, loaded when a task matches
~524

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from larry-zy/cognida at commit bf76257, republished under its MIT licence (© larry-zy). 79 words, ~524 tokens.

Download SKILL.mdSave it as .claude/skills/attribution-analysis/SKILL.md (or your agent's skills folder).
name
attribution-analysis
description
归因/根因分析技能,把指标的期间变化拆解到候选维度,定位驱动因子并给出置信与下钻建议。
when_to_use
当用户追问某指标「为什么变化」「根因是什么」「谁在拉动/拖累」「按维度拆解贡献」(如“这个月 GMV 为什么跌了”“哪些品类拉低了复购”)时使用。
category
data
tags
attribution, root-cause, driver, analytics
version
1.0.0
author
Cognida Team

归因 / 根因分析

面向「指标变了 → 是什么在驱动」的场景:取「期间 × 候选维度 × 指标」的行集,用 data_analysis(analysis_type=attribution) 把期间变化拆解到各维度,得到驱动因子(drivers)、洞察与置信,再按下钻建议校验后定论。区别于趋势分析(量化怎么变)与即席取数(要一个值)。

何时用 / 何时不用

  • ✅ 用:追问「为什么变化」「根因」「谁在拉动/拖累」「各维度的贡献拆解」。
  • ❌ 不用:
    • 只问「涨了还是跌了、幅度多少」 → trend-analysis
    • 只要一个数/明细 → text2sql-adhoc

标准流程

1. 明确被归因的指标、对比的两个期间、候选拆解维度(如品类/地区/渠道)
   ↓
2. 取「期间 × 候选维度 × 指标」行集
   ↓  受治理指标优先 semantic_query,其余 get_schema 后 sql_execute
3. data_analysis(analysis_type=attribution, result_id=<行集>,
     options={value_col:<指标列>, period_col:<期间列>})
   → 得 drivers(各维度贡献)、insight、confidence、drill_down
   ↓
4. 以 drivers/insight 为准给结论,标注 confidence;
   按 drill_down 建议对可疑驱动因子下钻校验后再定论

必要时用 analysis_type=comparison(两期对比)或 correlation(相关性)做补充验证。

工具

  • semantic_query / sql_execute:取带期间列与候选维度列的指标行集。
  • data_analysis:
    • analysis_type=attribution,options.value_col(指标列)+ options.period_col(期间列),得 drivers/confidence/drill_down。
    • analysis_type=comparison / correlation:补充验证驱动因子。

编排(按上下文重量分流)

  • 归因通常上下文重(大行集 + 多轮下钻),默认委派:SQLAuthor 取「期间 × 候选维度 × 指标」行集回传 result_id,Analysis 做 analysis_type=attribution;你串 result_id、综合各轮下钻结论并标注 confidence。 子代理内部的试错与大结果不进你的主上下文。
  • 仅当行集小、单轮即可定论时才直接做,省委派往返。判据是上下文重量,不是步数。
  • 每次委派携最小 scope(read);drivers 落的新 result_id 再串进下钻委派的 inputs.result_id。

数据传递

  • 取数返回大结果以 result_id 承载;归因分析传 result_id,drivers 结果也会落新的 result_id 供下钻取回,不要复制大结果进参数。

渲染

  • 驱动因子排行首选一张 BarChart 或 Table(数字用 {"path":"/..."} 绑定),配 Callout 写根因结论与置信。
  • 两数值列相关性可用 ScatterChart。不要叠重复同列数字的多余组件。

约束

  • 归因结论以 data_analysis 的 drivers/insight 为准,并显式标注 confidence,不臆断成因。
  • confidence 低或存在混杂时,先按 drill_down 建议下钻校验,再给定论。
  • 拆解口径(指标列、期间列、维度粒度)在结论里写明。

© larry-zy, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in services/cognida-go/skills/attribution-analysis of larry-zy/cognida.

Open the folder on GitHubat commit bf76257

Compare with similar skills

Attribution Analysis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Attribution Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Attribution Analysis this skilllarry-zy/cognida182—~524Automated safety check: PassMIT
AttributionNexus-JPF/note-companion8701 repos~5.2kAutomated safety check: PassMIT
Performance AttributionHKUDS/Vibe-Trading35k—~3.1kAutomated safety check: PassMIT
Direction Attributethedaviddias/Front-End-Checklist74k—~534Automated safety check: PassMIT
Fetchpriority Attributethedaviddias/Front-End-Checklist74k—~535Automated safety check: PassMIT
Lang Attributethedaviddias/Front-End-Checklist74k—~995Automated safety check: PassMIT

Similar skills

  • Attribution

    Nexus-JPF/note-companion

    When the user wants to figure out which marketing actually drives conversions and revenue, choose or interpret an attribution model, or reconcile conflicting numbers across tools.

    870 GitHub starsUsed in 1 repo~5.2k tokens
    Marketing & SEOAuto-check passed
  • Performance Attribution

    HKUDS/Vibe-Trading

    Explains why a portfolio beat or lagged its benchmark with Brinson sector attribution, factor alpha and beta decomposition, timing evaluation and benchmark comparison.

    35k GitHub stars~3.1k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Direction Attribute

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing templates, rendered HTML, or shared components related to Set text direction for RTL languages.

    74k GitHub stars~534 tokensUpdated 3 days ago
    Auto-check passed
  • Fetchpriority Attribute

    thedaviddias/Front-End-Checklist

    A skill your agent uses when optimising Largest Contentful Paint (LCP), reducing render-blocking resource contention, or fine-tuning resource loading order in the critical rendering path.

    74k GitHub stars~535 tokensUpdated 3 days ago
    AI & LLM EngineeringAuto-check passed
  • Lang Attribute

    thedaviddias/Front-End-Checklist

    A skill your agent uses when applies to all HTML documents. An agent skill from thedaviddias/Front-End-Checklist.

    74k GitHub stars~995 tokensUpdated 3 days ago
    Frontend & DesignAuto-check passed
  • Ads Attribution

    AgriciDaniel/claude-ads

    Audit cross-platform attribution, conversion definitions, reporting windows, GA4, AdServices and AdAttributionKit, MMPs, browser and server events, offline conversions, and platform reconciliation.

    9.8k GitHub stars~499 tokensUpdated 2 days ago
    Marketing & SEOAuto-check passed

More from larry-zy/cognida

All 9 skills in this repo
  • Report Composition

    larry-zy/cognida

    综合报告生成技能,把多段取数(总览+趋势+分群等)整合成一份带洞察的结构化报告. An agent skill from larry-zy/cognida.

    182 GitHub stars~397 tokensUpdated 1 mo ago
    Auto-check passed
  • Semantic Metric

    larry-zy/cognida

    语义指标取数技能,先查治理好的指标语义模型,再按统一口径取指标,避免对物理表猜测. An agent skill from larry-zy/cognida.

    182 GitHub stars~329 tokensUpdated 1 mo ago
    Auto-check passed
  • Generate a comprehensive report of core e-commerce operating metrics (GMV, orders, average order value, repurchase)

    182 GitHub stars~470 tokensUpdated 1 mo ago
    Auto-check passed
  • Graph Retrieval

    larry-zy/cognida

    图谱与血缘检索技能,查询实体之间的关系、上下游依赖与数据血缘。

    182 GitHub stars~236 tokensUpdated 1 mo ago
    Auto-check passed
  • Text2sql Adhoc

    larry-zy/cognida

    即席取数技能,把一句话的具体数据问题翻译成 SQL 并执行返回结果。

    182 GitHub stars~390 tokensUpdated 1 mo ago
    Auto-check passed
  • Trend Analysis

    larry-zy/cognida

    趋势分析技能,取带时间维度的序列并量化其增长/变化幅度与异常点。

    182 GitHub stars~428 tokensUpdated 1 mo ago
    Auto-check passed

Questions about Attribution Analysis

What does Attribution Analysis do?

归因/根因分析技能,把指标的期间变化拆解到候选维度,定位驱动因子并给出置信与下钻建议. An agent skill from larry-zy/cognida. Attribution Analysis is an agent skill from larry-zy/cognida.

How do I install Attribution Analysis in Claude Code?

Run `npx skills add larry-zy/cognida --skill attribution-analysis -a claude-code`. Or copy the skill folder (services/cognida-go/skills/attribution-analysis in larry-zy/cognida) into .claude/skills/attribution-analysis in your project. Claude Code loads it when a task matches its description.

How do I install Attribution Analysis in Codex?

Run `npx skills add larry-zy/cognida --skill attribution-analysis -a codex`. Or copy the skill folder (services/cognida-go/skills/attribution-analysis in larry-zy/cognida) into .agents/skills/attribution-analysis in your project. Codex loads it when a task matches its description.

Can I use Attribution Analysis in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add larry-zy/cognida --skill attribution-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/attribution-analysis, .gemini/skills/attribution-analysis, .github/skills/attribution-analysis and .opencode/skills/attribution-analysis in your project.

What does Attribution Analysis need to run?

SKILL.md names no scripts, command-line tools or credentials: Attribution Analysis is instructions for the agent only.

Does Attribution Analysis access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Attribution Analysis safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Attribution Analysis use?

Attribution Analysis is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Attribution Analysis use?

About 524 tokens (SKILL.md is roughly 2.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Attribution Analysis?

Skills that share tags, products or a category with Attribution Analysis: Attribution (Nexus-JPF/note-companion, 870 stars), Performance Attribution (HKUDS/Vibe-Trading, 35k stars), Direction Attribute (thedaviddias/Front-End-Checklist, 74k stars) and Fetchpriority Attribute (thedaviddias/Front-End-Checklist, 74k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Attribution Analysis?

larry-zy (a GitHub user) maintains it in larry-zy/cognida, which has 182 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on August 31, 2026.

Source: larry-zy/cognida on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.