Class: Anthropic::Models::Organization::AnalyticsSkillActivity
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Organization::AnalyticsSkillActivity
- Defined in:
- lib/anthropic/models/organization/analytics_skill_activity.rb,
sig/anthropic/models/organization/analytics_skill_activity.rbs
Defined Under Namespace
Modules: ShareStatus
Instance Attribute Summary collapse
-
#attributed_list_price ⇒ String?
List-price (rate-card) value of the member requests attributed to this skill, as a decimal string in the minor unit of
currency(cents for USD), from Claude Code, Cowork, and Office Agent request-level attribution — the value of requests that involved the skill, not the skill's incremental cost. -
#chat_cowork_unified_metrics ⇒ Anthropic::Models::Organization::AnalyticsSkillChatCoworkUnifiedMetrics?
Skill use recorded while members had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on, split into chat conversations and Cowork sessions.
-
#chat_metrics ⇒ Anthropic::Models::Organization::AnalyticsSkillChatMetrics
Claude.ai activity metrics for a single skill on a given day.
-
#claude_code_metrics ⇒ Anthropic::Models::Organization::AnalyticsSkillClaudeCodeMetrics
Claude Code activity metrics for a single skill on a given day.
-
#cowork_metrics ⇒ Anthropic::Models::Organization::AnalyticsSkillCoworkMetrics
Cowork activity metrics for a single skill on a given day.
-
#currency ⇒ String?
Currency for this row's monetary fields (
estimated_overage_spendandattributed_list_price), as an uppercase ISO-4217 code. -
#distinct_user_count ⇒ Integer
Number of distinct users who used the skill on the requested day, or, in date-range mode, over the requested window — recomputed as an exact distinct count over the window's per-member daily rows, never a sum of per-day values.
-
#enable_count ⇒ Integer?
Distinct accounts that enabled this skill on the requested day (claude.ai only — the skill analog of plugin
install_count). -
#estimated_overage_spend ⇒ String?
Estimated overage spend attributed to this skill, as a decimal string in the minor unit of
currency(cents for USD; "1250" is $12.50, fractional cents possible) — an allocation of each member's daily post-discount, pre-credit metered overage spend (the same cost basis as the organization's spend reporting and the Cost & Usage API, so per-skill figures are directly comparable; spend with no skill attribution — including any member-day without skill invocations — is not represented, so skill rows sum to at most those totals) across the skills the member used. -
#invocation_count ⇒ Integer?
Total number of times this skill was invoked on the requested day (the skill analog of plugin
invocation_count). -
#office_metrics ⇒ Anthropic::Models::Organization::AnalyticsSkillOfficeMetrics
Office Agent activity metrics for a single skill on a given day, broken out by Office product.
-
#product ⇒ String?
Product that produced this row's activity: one of
chat,claude_code,cowork,office_agent, orchat_cowork_unified(Chat and Cowork unified). -
#rbac_group_id ⇒ String?
Tagged RBAC group identifier (
rbac_group_...), matching the spend-limits API spelling. -
#rbac_group_name ⇒ String?
Resolved RBAC group display name, alongside
rbac_group_idwhen name resolution is available. -
#share_status ⇒ Symbol, ...
Skill share status (claude.ai only): one of
private,organization, orpublic. -
#skill_display_name ⇒ String?
Human-readable display name for rows whose
skill_nameis an opaque skill id (user/organization skill types and plugin-delivered skills, whose user-defined names usage reports generally withhold). -
#skill_name ⇒ String
Name of the skill.
-
#user_id ⇒ String?
Tagged user identifier (e.g.
user_...).
Instance Method Summary collapse
-
#initialize(attributed_list_price:, chat_metrics:, claude_code_metrics:, cowork_metrics:, currency:, distinct_user_count:, enable_count:, estimated_overage_spend:, invocation_count:, office_metrics:, share_status:, skill_display_name:, skill_name:, chat_cowork_unified_metrics: nil, product: nil, rbac_group_id: nil, rbac_group_name: nil, user_id: nil) ⇒ AnalyticsSkillActivity
constructor
Per-skill activity data for a given day.
- #to_hash ⇒ { attributed_list_price: String?, chat_metrics: Anthropic::Organization::AnalyticsSkillChatMetrics, claude_code_metrics: Anthropic::Organization::AnalyticsSkillClaudeCodeMetrics, cowork_metrics: Anthropic::Organization::AnalyticsSkillCoworkMetrics, currency: String?, distinct_user_count: Integer, enable_count: Integer?, estimated_overage_spend: String?, invocation_count: Integer?, office_metrics: Anthropic::Organization::AnalyticsSkillOfficeMetrics, share_status: Anthropic::Models::Organization::AnalyticsSkillActivity::share_status?, skill_display_name: String?, skill_name: String, chat_cowork_unified_metrics: Anthropic::Organization::AnalyticsSkillChatCoworkUnifiedMetrics?, product: String?, rbac_group_id: String?, rbac_group_name: String?, user_id: String? }
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(attributed_list_price:, chat_metrics:, claude_code_metrics:, cowork_metrics:, currency:, distinct_user_count:, enable_count:, estimated_overage_spend:, invocation_count:, office_metrics:, share_status:, skill_display_name:, skill_name:, chat_cowork_unified_metrics: nil, product: nil, rbac_group_id: nil, rbac_group_name: nil, user_id: nil) ⇒ AnalyticsSkillActivity
Per-skill activity data for a given day.
Some parameter documentations has been truncated, see Anthropic::Models::Organization::AnalyticsSkillActivity for more details.
|
|
# File 'lib/anthropic/models/organization/analytics_skill_activity.rb', line 218
|
Instance Attribute Details
#attributed_list_price ⇒ String?
List-price (rate-card) value of the member requests attributed to this skill, as
a decimal string in the minor unit of currency (cents for USD), from Claude
Code, Cowork, and Office Agent request-level attribution — the value of requests
that involved the skill, not the skill's incremental cost. Unlike
estimated_overage_spend this reflects usage value regardless of how it was
funded — seat-covered usage counts — but it is undiscounted and does not tie to
billed spend or the organization's spend reporting. claude.ai chat usage carries
no request-level attribution and contributes nothing: the field is null on
chat product rows and on office_agent product cuts dated before 2026-06-18
(the Office Agent attribution data-start), and on ungrouped rows it covers the
Claude Code + Cowork + Office Agent share only (null when no attributable usage
exists). Also null under the same conditions as estimated_overage_spend (spend
reporting not enabled for this organization, office_agent product cuts before
the 2026-06-18 data-start). "0" means attributable usage existed but none was
attributed to this skill. Addable across days: date-range rollup mode returns
the window's sum. On group_by[] and filter[] shapes both amounts can total
below the ungrouped value for the same skill over the same date or range: spend
attributed to a member–skill pair with no counted usage on that day is excluded
from those cuts.
29 |
# File 'lib/anthropic/models/organization/analytics_skill_activity.rb', line 29 required :attributed_list_price, String, nil?: true |
#chat_cowork_unified_metrics ⇒ Anthropic::Models::Organization::AnalyticsSkillChatCoworkUnifiedMetrics?
Skill use recorded while members had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on, split into chat conversations and Cowork sessions. A count is null in date-range mode where it cannot be computed. Omitted from the response where Chat and Cowork unified is not available.
177 178 179 |
# File 'lib/anthropic/models/organization/analytics_skill_activity.rb', line 177 optional :chat_cowork_unified_metrics, -> { Anthropic::Organization::AnalyticsSkillChatCoworkUnifiedMetrics }, nil?: true |
#chat_metrics ⇒ Anthropic::Models::Organization::AnalyticsSkillChatMetrics
Claude.ai activity metrics for a single skill on a given day.
35 |
# File 'lib/anthropic/models/organization/analytics_skill_activity.rb', line 35 required :chat_metrics, -> { Anthropic::Organization::AnalyticsSkillChatMetrics } |
#claude_code_metrics ⇒ Anthropic::Models::Organization::AnalyticsSkillClaudeCodeMetrics
Claude Code activity metrics for a single skill on a given day.
41 |
# File 'lib/anthropic/models/organization/analytics_skill_activity.rb', line 41 required :claude_code_metrics, -> { Anthropic::Organization::AnalyticsSkillClaudeCodeMetrics } |
#cowork_metrics ⇒ Anthropic::Models::Organization::AnalyticsSkillCoworkMetrics
Cowork activity metrics for a single skill on a given day.
47 |
# File 'lib/anthropic/models/organization/analytics_skill_activity.rb', line 47 required :cowork_metrics, -> { Anthropic::Organization::AnalyticsSkillCoworkMetrics } |
#currency ⇒ String?
Currency for this row's monetary fields (estimated_overage_spend and
attributed_list_price), as an uppercase ISO-4217 code. Always "USD" when
either amount is populated; null whenever both amounts are null.
55 |
# File 'lib/anthropic/models/organization/analytics_skill_activity.rb', line 55 required :currency, String, nil?: true |
#distinct_user_count ⇒ Integer
Number of distinct users who used the skill on the requested day, or, in date-range mode, over the requested window — recomputed as an exact distinct count over the window's per-member daily rows, never a sum of per-day values. A skill counts as used only when it is explicitly activated — the model (or the user, via the skill's slash command) invokes it, reading its instructions into context as part of that activation. Skills that are merely installed or listed as available, or whose content reaches the context without an activation (preloaded, hook-injected, or read as a plain file), are not counted.
68 |
# File 'lib/anthropic/models/organization/analytics_skill_activity.rb', line 68 required :distinct_user_count, Integer |
#enable_count ⇒ Integer?
Distinct accounts that enabled this skill on the requested day (claude.ai only —
the skill analog of plugin install_count). The count is org-wide: null when
enable reporting is not enabled for this organization, or when the request
scopes to user_id / rbac_group_id / product via group_by[] or filter[]
(an org-wide count would be misleading on per-cut rows). A distinct count, not
an event count: summing across days double-counts members who enable the skill
on more than one day, so it is also null in date-range rollup mode
(starting_date/ending_date).
81 |
# File 'lib/anthropic/models/organization/analytics_skill_activity.rb', line 81 required :enable_count, Integer, nil?: true |
#estimated_overage_spend ⇒ String?
Estimated overage spend attributed to this skill, as a decimal string in the
minor unit of currency (cents for USD; "1250" is $12.50, fractional cents
possible) — an allocation of each member's daily post-discount, pre-credit
metered overage spend (the same cost basis as the organization's spend reporting
and the Cost & Usage API, so per-skill figures are directly comparable; spend
with no skill attribution — including any member-day without skill invocations —
is not represented, so skill rows sum to at most those totals) across the skills
the member used. Overage only: usage covered by included seat allowances bills
nothing and allocates $0 here — see attributed_list_price for the
funding-independent usage-value companion. Claude Code, Cowork, and Office Agent
spend use request-level skill attribution; claude.ai chat spend is approximated
proportionally to skill-invoking messages. An estimate, not a billing number —
and the cost of the requests/messages that involved the skill, not the skill's
incremental cost (the same request would still have cost something without the
skill active). "0" means no overage spend was attributed; null when spend
reporting is not enabled for this organization, on office_agent product cuts
dated before 2026-06-18 (the Office Agent attribution data-start). Addable
across days: date-range rollup mode (starting_date/ending_date) returns the
window's sum. With group_by[]=user_id each row carries the user's own
attributed spend. On group_by[] and filter[] shapes both amounts can total
below the ungrouped value for the same skill over the same date or range: spend
attributed to a member–skill pair with no counted usage on that day is excluded
from those cuts.
109 |
# File 'lib/anthropic/models/organization/analytics_skill_activity.rb', line 109 required :estimated_overage_spend, String, nil?: true |
#invocation_count ⇒ Integer?
Total number of times this skill was invoked on the requested day (the skill
analog of plugin invocation_count). Unlike distinct_user_count — which
answers '# of users' — this is the true '# of uses'. A skill counts as used only
when it is explicitly activated — the model (or the user, via the skill's slash
command) invokes it, reading its instructions into context as part of that
activation. Skills that are merely installed or listed as available, or whose
content reaches the context without an activation (preloaded, hook-injected, or
read as a plain file), are not counted. Null when invocation reporting is not
enabled for this organization. Sum across a date range for total uses in the
window — date-range rollup mode (starting_date/ending_date) returns this sum
directly.
125 |
# File 'lib/anthropic/models/organization/analytics_skill_activity.rb', line 125 required :invocation_count, Integer, nil?: true |
#office_metrics ⇒ Anthropic::Models::Organization::AnalyticsSkillOfficeMetrics
Office Agent activity metrics for a single skill on a given day, broken out by Office product.
132 |
# File 'lib/anthropic/models/organization/analytics_skill_activity.rb', line 132 required :office_metrics, -> { Anthropic::Organization::AnalyticsSkillOfficeMetrics } |
#product ⇒ String?
Product that produced this row's activity: one of chat, claude_code,
cowork, office_agent, or chat_cowork_unified (Chat and Cowork unified).
These are the canonical Cost & Usage product names; an office_agent row's
per-surface breakdown is in its office_metrics. On /plugins only cowork,
claude_code and chat_cowork_unified occur (the only surfaces with plugin
attribution); on /artifacts only chat, claude_code, cowork and
chat_cowork_unified occur (the surfaces that create artifacts);
/apps/chat/projects does not support the product dimension (a product entry
in group_by[] or filter[] there is rejected). Present only when the request
grouped by product.
194 |
# File 'lib/anthropic/models/organization/analytics_skill_activity.rb', line 194 optional :product, String, nil?: true |
#rbac_group_id ⇒ String?
Tagged RBAC group identifier (rbac_group_...), matching the spend-limits API
spelling. Present only when the request grouped by rbac_group_id.
201 |
# File 'lib/anthropic/models/organization/analytics_skill_activity.rb', line 201 optional :rbac_group_id, String, nil?: true |
#rbac_group_name ⇒ String?
Resolved RBAC group display name, alongside rbac_group_id when name resolution
is available. Null if the group has been deleted or its name could not be
resolved; rbac_group_id remains the stable key.
209 |
# File 'lib/anthropic/models/organization/analytics_skill_activity.rb', line 209 optional :rbac_group_name, String, nil?: true |
#share_status ⇒ Symbol, ...
Skill share status (claude.ai only): one of private, organization, or
public. Null for skills used only in Claude Code or Office (no per-skill
share-status concept) and when share-status reporting is not yet available for
the organization. Filterable via filter[]=share_status:{value}.
141 142 143 |
# File 'lib/anthropic/models/organization/analytics_skill_activity.rb', line 141 required :share_status, enum: -> { Anthropic::Organization::AnalyticsSkillActivity::ShareStatus }, nil?: true |
#skill_display_name ⇒ String?
Human-readable display name for rows whose skill_name is an opaque skill id
(user/organization skill types and plugin-delivered skills, whose user-defined
names usage reports generally withhold). Organization-shared skills and skills
delivered by the organization's own plugins (its plugin marketplaces and its
library) resolve; plugin skill names are shown without their 'plugin:' prefix.
The literal 'unknown' bucket row gets a fixed 'Unknown skill' label. For a
member's own skill (private or personal-plugin) it is null, except when the
skill's owner used it from Claude Code or Cowork in the requested period: then
it shows the name that client reported at the time. Apart from that, the names
of members' own skills are not disclosed to analytics-key holders. Also null for
Anthropic-provided plugin skills (not resolved), for an organization skill or
plugin whose name can no longer be found (for example, one since deleted), when
skill_name is already a display name, or when display-name resolution is not
enabled for this organization.
162 |
# File 'lib/anthropic/models/organization/analytics_skill_activity.rb', line 162 required :skill_display_name, String, nil?: true |
#skill_name ⇒ String
Name of the skill
168 |
# File 'lib/anthropic/models/organization/analytics_skill_activity.rb', line 168 required :skill_name, String |
#user_id ⇒ String?
Tagged user identifier (e.g. user_...). Present only when the request grouped
by user_id.
216 |
# File 'lib/anthropic/models/organization/analytics_skill_activity.rb', line 216 optional :user_id, String, nil?: true |
Instance Method Details
#to_hash ⇒ { attributed_list_price: String?, chat_metrics: Anthropic::Organization::AnalyticsSkillChatMetrics, claude_code_metrics: Anthropic::Organization::AnalyticsSkillClaudeCodeMetrics, cowork_metrics: Anthropic::Organization::AnalyticsSkillCoworkMetrics, currency: String?, distinct_user_count: Integer, enable_count: Integer?, estimated_overage_spend: String?, invocation_count: Integer?, office_metrics: Anthropic::Organization::AnalyticsSkillOfficeMetrics, share_status: Anthropic::Models::Organization::AnalyticsSkillActivity::share_status?, skill_display_name: String?, skill_name: String, chat_cowork_unified_metrics: Anthropic::Organization::AnalyticsSkillChatCoworkUnifiedMetrics?, product: String?, rbac_group_id: String?, rbac_group_name: String?, user_id: String? }
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'sig/anthropic/models/organization/analytics_skill_activity.rbs', line 84
def to_hash: -> {
attributed_list_price: String?,
chat_metrics: Anthropic::Organization::AnalyticsSkillChatMetrics,
claude_code_metrics: Anthropic::Organization::AnalyticsSkillClaudeCodeMetrics,
cowork_metrics: Anthropic::Organization::AnalyticsSkillCoworkMetrics,
currency: String?,
distinct_user_count: Integer,
enable_count: Integer?,
estimated_overage_spend: String?,
invocation_count: Integer?,
office_metrics: Anthropic::Organization::AnalyticsSkillOfficeMetrics,
share_status: Anthropic::Models::Organization::AnalyticsSkillActivity::share_status?,
skill_display_name: String?,
skill_name: String,
chat_cowork_unified_metrics: Anthropic::Organization::AnalyticsSkillChatCoworkUnifiedMetrics?,
product: String?,
rbac_group_id: String?,
rbac_group_name: String?,
user_id: String?
}
|