# amplitude

> Install Amplitude in an existing application and verify its first event.

I want you to install Amplitude for me. Execute the steps below in the application's repository, within the user's authorized scope.

## OBJECTIVE

Fetch Amplitude's maintained setup skill, let it select the application's stack and emission surface, and follow it through verified ingestion.

## DONE WHEN

The application emits the chosen first event and the skill's ingestion check confirms it arrived in the intended Amplitude project. Report the changed files and verification result; if a prerequisite is missing, report that blocker instead of claiming success.

## TODO

- [ ] Identify the application root, existing toolchain, and target Amplitude project.
- [ ] Obtain the project's public ingestion API key and data region (us or eu).
- [ ] Fetch the integrating-amplitude skill using the pinned developer CLI.
- [ ] Follow the skill's selected setup journey and verify the first event.

## 1. Establish the target

Work in the selected application's repository and preserve its existing toolchain. Use the public ingestion API key supplied by the user or existing app configuration. If the intended project, key, or region is unclear, ask the user for the missing value. Never request a Secret Key or access token for this setup flow, and never commit credentials.

## 2. Fetch the maintained setup skill

Use a compatible installed CLI if available:

```sh
amp skills get integrating-amplitude --region us
```

Otherwise use the CLI version shipped by the setup-entry flow, without adding it to the application's dependencies:

```sh
npx --yes --package=@amplitude/developer-cli@0.3.1 amp skills get integrating-amplitude --region us
```

Replace us with eu for an EU project. Skill fetch and API-key ingestion verification require no CLI login. Keep using the npx prefix for subsequent CLI commands if amp is not on PATH. If Node, network access, or the required CLI commands are unavailable, report the prerequisite that failed.

## 3. Follow and verify

Read the returned skill and follow its selected journey with the target API key and region. The served skill owns SDK selection, framework integration, and ingestion verification; do not assume a JavaScript application or client-side events. Honor its stop conditions and docs handoffs for unsupported surfaces. Installation alone is not success: run the application's relevant checks and confirm first-event ingestion using the skill's verification command.

EXECUTE NOW: Complete the TODO list until the application's first event is confirmed in the intended project, or report the concrete blocker.

Additional context: [llms.txt](https://amplitude.com/llms.txt). Human setup reference: [Amplitude Quickstart](https://amplitude.com/docs/get-started/amplitude-quickstart).
