Skip to main content
skill CX Codex

asc-analytics-reports — Claude Code skill: App Store Connect report

This skill pulls every segment of an App Store Connect analytics report through the asc CLI and checks each file against its size and MD5 before analysis.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add rorkai/app-store-connect-cli-skills --skill asc-analytics-reports -a claude-code
Open on GitHub

What asc-analytics-reports does

The skill walks the agent through a fixed sequence: inspect the installed CLI contract, create a private directory outside the repo, find an existing report request, pick instances by processing date and granularity, download each segment, then compare byte counts with sizeInBytes and the lowercase MD5 with checksum. It never interprets or aggregates report contents — that belongs to a separate workflow.

The filters --processing-date, --granularity, --paginate and --include-segments need asc 3.5.0 or newer. If asc analytics view --help does not list them, the skill asks for an upgrade and refuses to fall back to the deprecated --date flag. Creating a request changes App Store Connect state and needs an Admin-authorized profile, so the skill asks for explicit approval and prefers --reuse-existing. Without that approval the command does not run.

Downloaded files stay in a private temp directory with owner-only permissions, and downloadUrl is never printed. asc analytics download will not overwrite an existing output, so on a size or hash mismatch the skill retries once to a new path and verifies that copy on its own. Nothing gets parsed until verification passes.

What it helps with

  • download every segment of an App Store Connect analytics report in one run
  • select report instances by processing date and granularity
  • check a downloaded segment against Apple's size and MD5 metadata
  • reuse an existing report request instead of creating a new one
  • keep downloaded reports in a private directory outside the repo

Example prompts for the agent

  • Download the App Store Connect analytics report for my app with DAILY granularity
  • Verify size and MD5 for every downloaded segment before analysis
  • Find an existing report request and list the available processingDate values

How to install asc-analytics-reports

1Skills CLI (Vercel)

npx skills add rorkai/app-store-connect-cli-skills --skill asc-analytics-reports -a claude-code

2Manually: put the files in place

~/.claude/skills/asc-analytics-reports/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/asc-analytics-reports/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about asc-analytics-reports

How do I install asc-analytics-reports in Claude?

Run npx skills add rorkai/app-store-connect-cli-skills --skill asc-analytics-reports -a claude-code. The skill lands at ~/.claude/skills/asc-analytics-reports/SKILL.md.

What does asc-analytics-reports do?

It collects a full set of App Store Connect analytics report segments through the asc CLI, downloads them, and verifies each file by size and MD5. Interpreting the contents is out of scope.

What does the skill need to run?

The asc CLI at version 3.5.0 or newer, with --processing-date, --granularity, --paginate and --include-segments available. Creating a new report request requires an Admin-authorized profile and explicit user approval.

Source text

SKILL.md · MIT
---
name: asc-analytics-reports
description: Collect, download, and verify App Store Connect Analytics reports with asc. Use when users need to discover analytics report requests, select report instances by processing date or granularity, download every segment, or verify downloaded files against Apple's size and MD5 metadata before analysis.
---

# asc analytics reports

Collect a complete set of analytics report segments and verify the compressed
files before handing them to a separate analysis workflow. Do not interpret,
aggregate, or present the report contents as part of this skill.

## Guardrails

- Treat report inventories, signed URLs, downloaded segments, and identifiers as
  confidential business data.
- Prefer an existing request. Creating a request changes App Store Connect state
  and requires an Admin-authorized profile; obtain explicit user approval before
  running `asc analytics request`.
- Never delete or replace a request as part of collection.
- Use `asc analytics download`; do not fetch or persist signed segment URLs
  separately.
- Store private files outside the source repository with owner-only permissions.
- Do not claim the collection is complete if any expected segment is missing or
  fails verification.

## 1. Verify the CLI contract

Inspect the installed command before authentication or collection:

```bash
asc analytics view --help
```

Continue only when help lists `--processing-date`, `--granularity`,
`--paginate`, and `--include-segments`. These filters require asc 3.5.0 or
newer. If either filter is absent, ask the user to upgrade. Do not substitute
the deprecated `--date` flag because it uses legacy local matching rather than
Apple's server-side processing-date filter.

## 2. Prepare private storage

Create a private temporary directory outside the repository before capturing
JSON or downloading segments:

```bash
umask 077
ASC_ANALYTICS_DIR="$(mktemp -d "${TMPDIR:-/tmp}/asc-analytics.XXXXXX")"
mkdir -m 700 "$ASC_ANALYTICS_DIR/segments"
```

Redirect command output and errors into this directory. Do not paste raw
inventory JSON or error output into chat, commits, issues, or pull requests.

## 3. Find an existing request

Resolve the app ID and selected asc profile, then list every request:

```bash
asc --profile "$PROFILE" analytics requests \
  --app "$APP_ID" \
  --paginate \
  --output json \
  > "$ASC_ANALYTICS_DIR/requests.json" \
  2> "$ASC_ANALYTICS_DIR/requests.stderr"
```

Inspect the JSON structurally and select an existing usable request. Do not rely
on `--state` when discovery works without it. If no usable request exists, stop
and ask whether the user wants to create `ONGOING` or `ONE_TIME_SNAPSHOT`
access. State the target app and profile before requesting approval. After
approval, prefer `--reuse-existing` to avoid duplicates:

```bash
asc --profile "$APPROVED_PROFILE" analytics request \
  --app "$APP_ID" \
  --access-type "$ACCESS_TYPE" \
  --reuse-existing \
  --output json \
  > "$ASC_ANALYTICS_DIR/request.json" \
  2> "$ASC_ANALYTICS_DIR/request.stderr"
```

Do not run that command without explicit approval. Read the returned request ID
from the private JSON response before continuing:

```bash
REQUEST_ID="$(jq -er '.requestId' "$ASC_ANALYTICS_DIR/request.json")"
```

When a request was created or reused with the approved profile, set
`ANALYTICS_PROFILE="$APPROVED_PROFILE"`. For an existing request discovered
with the read-only profile, set `ANALYTICS_PROFILE="$PROFILE"`. Use that same
profile for every subsequent `analytics view` and `analytics download` call.

## 4. Discover and select report instances

First retrieve report and instance metadata without segment URLs:

```bash
asc --profile "$ANALYTICS_PROFILE" analytics view \
  --request-id "$REQUEST_ID" \
  --paginate \
  --output json \
  > "$ASC_ANALYTICS_DIR/discovery.json" \
  2> "$ASC_ANALYTICS_DIR/discovery.stderr"
```

Select an available `processingDate` and the granularity requested by the user.
Accept `DAILY`, `WEEKLY`, and `MONTHLY`, individually or as a comma-separated
list. Split the input on commas, trim each token, and normalize it to uppercase.
Validate every token against that allowlist, including empty tokens. Report the
invalid input and stop before running `analytics view`; never silently discard
unsupported values or continue with an empty filter. After validation, remove
duplicates and join the remaining values with commas.
Treat `processingDate` as the date Apple processed the report, not necessarily
the period represented by its rows.

Retrieve the filtered inventory, including all segment metadata:

```bash
asc --profile "$ANALYTICS_PROFILE" analytics view \
  --request-id "$REQUEST_ID" \
  --processing-date "$PROCESSING_DATE" \
  --granularity "$GRANULARITY" \
  --paginate \
  --include-segments \
  --output json \
  > "$ASC_ANALYTICS_DIR/inventory.json" \
  2> "$ASC_ANALYTICS_DIR/inventory.stderr"
```

Always use `--paginate`; asc follows Apple-provided report and instance next
links. Do not reconstruct, alter, or follow pagination URLs manually.

## 5. Download every segment

Parse `inventory.json` structurally. For every selected instance, enumerate all
segments and retain each segment's exact ID, `sizeInBytes`, and `checksum` for
verification. Do not print `downloadUrl`.

Download each segment by its request, instance, and segment IDs. Use a filename
derived only from the segment ID and keep the compressed bytes intact. Analytics
reports are tab-delimited text, so use `.txt.gz` rather than implying CSV:

```bash
SEGMENT_FILE="$ASC_ANALYTICS_DIR/segments/$SEGMENT_ID.txt.gz"
asc --profile "$ANALYTICS_PROFILE" analytics download \
  --request-id "$REQUEST_ID" \
  --instance-id "$INSTANCE_ID" \
  --segment-id "$SEGMENT_ID" \
  --output "$SEGMENT_FILE" \
  > /dev/null \
  2>> "$ASC_ANALYTICS_DIR/download.stderr"
```

Do not use `--decompress` before verification. If an instance has multiple
segments, download every one; never treat the first segment as the whole report.

## 6. Verify the downloaded files

For each file, compare the compressed byte count with `sizeInBytes` and the
lowercase MD5 digest with `checksum`. Use local system tools such as:

```bash
actual_size="$(wc -c < "$SEGMENT_FILE" | tr -d ' ')"
actual_md5="$(openssl dgst -md5 -r "$SEGMENT_FILE" | awk '{print tolower($1)}')"
expected_md5="$(printf '%s' "$CHECKSUM" | tr '[:upper:]' '[:lower:]')"
```

Require `actual_size` to equal `sizeInBytes` and `actual_md5` to equal
`expected_md5`. On a mismatch, mark that segment failed, keep the raw error
private, and do not claim a complete collection. `asc analytics download`
refuses to overwrite an existing output, so retry the failed segment once to a
new path such as `$ASC_ANALYTICS_DIR/segments/$SEGMENT_ID.retry-1.txt.gz`. Verify
the retry independently and use it only if both checks pass. Keep the original
failed file unless the user approves its deletion. Do not parse or analyze a
file until verification succeeds.

## 7. Report the result

Return a concise summary containing:

- the selected processing date and granularity values;
- counts of reports, instances, expected segments, downloaded segments, and
  verified segments;
- whether the collection is complete;
- failed or missing segment IDs, if any, without signed URLs or report rows;
- the private output directory when appropriate for the current user session.

Do not include analytics values, signed URLs, profile names, credentials, or raw
rows in a public artifact. Keep the verified files for the user's next workflow.
Ask before deleting the temporary directory or any downloaded evidence.

© rorkai · MIT · rorkai/app-store-connect-cli-skills

Similar skills

Everything for Mobile →

From the same set24

asc-crash-triage Triages TestFlight crashes, beta feedback, and build performance metrics using the asc CLI to produce actionable iOS reports. CX Codex +1 6,400installs asc-aso-audit Runs an offline ASO audit on local App Store metadata in ./metadata, flagging wasted keyword space, bad separators, and missing fields. CX Codex +1 6,200installs asc-revenuecat-catalog-sync Reconciles App Store Connect subscriptions and in-app purchases with RevenueCat catalog resources. Use it before release or when the two catalogs have drifted apart. CX Codex +1 6,100installs asc-wall-submit Files or updates your app's Wall of Apps entry in the App-Store-Connect-CLI repo: a dry run first, then a confirmed submit with a PR plan. CX Codex +1 5,800installs asc-whats-new-writer Turn commits, bullet points, or a plain description into localized App Store release notes. Useful when preparing update copy across the locales already in your metadata. CX Codex +1 5,700installs asc-screenshot-resize This skill prepares screenshots for App Store Connect by finding current size rules, resizing files, and checking them before upload. CX Codex +1 5,100installs asc-apple-ads A skill that teaches your agent to run Apple Ads through the asc CLI: campaigns, targeting, reports and recommendations. Useful once App Store ads are live. CX Codex +1 3,000installs asc-ad-hoc-distribution Builds and publishes private iOS ad hoc installs to S3-compatible storage for registered test devices without TestFlight. Works with .xcarchive packages and standalone IPAs. CX Codex +1 794installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor