> ## Documentation Index
> Fetch the complete documentation index at: https://tryklint.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Fetch /llms.txt for the complete page index before exploring further. Every docs page is available as markdown by appending .md to its URL. Coding agents should start at /for-agents/coding-agents.md.

# Reverse-engineer viral content

> Decomposes one Instagram post into its working parts: hook construction, key messages, offer, transcript, and performance against the account's own record. Use when analyzing why a post worked, breaking down a competitor's winner, or studying an outlier before copying it.

This cookbook pulls one post apart so your team can see how it was built. You don't run it; your agent does.

## Run it

Paste this to your agent, filled in:

```text theme={null}
Fetch https://tryklint.ai/cookbooks/reverse-engineer-viral-content.md
and execute the cookbook it contains with my context:

- post: [the post URL or shortcode, e.g. instagram.com/reel/DOG123abc]
- compare: [optional: "against the account's recent record" is the default]
```

The URL carries everything your agent needs. Everything below this line addresses the agent executing it.

## Context for the agent

Klint is the social context API: it searches and extracts Instagram posts and accounts, returned with transcripts, on-screen text, and creative structure already analyzed. Base URL `https://api.tryklint.ai`. Every request needs `Authorization: Bearer $KLINT_API_KEY`; never print or echo the key. This page is the source of truth for this procedure; work from the fetched copy, not memory. The full documentation index is at `https://tryklint.ai/llms.txt`, and the whole API contract is at `https://tryklint.ai/for-agents/coding-agents.md`. Last updated July 18, 2026.

## Inputs

| Input           | What it is                                         | Required                                | Source                 |
| --------------- | -------------------------------------------------- | --------------------------------------- | ---------------------- |
| `post`          | The post to decompose: URL, shortcode, or Klint ID | yes                                     | operator               |
| `compare`       | Baseline comparison scope                          | no; default the account's recent record | operator               |
| `KLINT_API_KEY` | API key                                            | yes                                     | operator's environment |

## Objectives

Produce exactly one artifact: a teardown of the post in the Output format below, with every observation drawn from your own calls. Nothing else counts as done.

## Procedure

<Steps>
  <Step title="Extract the post">
    `GET https://api.tryklint.ai/v1/instagram/posts/{shortcode-or-id}`. A shortcode from the URL works directly. A `404` with type `not-tracked` means the post is outside what Klint has observed. Report that to the operator and stop. Don't decompose from memory.
  </Step>

  <Step title="Read the decomposition">
    The full post carries the parts. Work through them in order:

    * The hook: its construction, devices, and which modalities it operates in
    * The key messages and the proof offered for them
    * The offer and call to action
    * The narrative structure
    * The full transcript and on-screen text
    * The metrics, each with the timestamp of when it was observed
  </Step>

  <Step title="Put the numbers in the account's context">
    Raw counts mislead across accounts. Two comparisons, both handle-scoped and filters-only (filters-only searches may sort):

    ```json theme={null}
    {
      "post": {
        "filters": {
          "posted_at": { "gte": "[90 days ago, RFC 3339]" }
        },
        "author": {
          "filters": { "handle": { "in": ["[author handle]"] } }
        }
      },
      "sort": { "by": "views", "order": "desc" },
      "limit": 20
    }
    ```

    Establish where this post ranks in the account's own window. If the post carries `view_ratio_to_account_baseline`, quote it; it needs account history to exist, so its absence is not a signal.
  </Step>

  <Step title="Find the execution's neighbors">
    One semantic sweep built from the post's promise, to see whether this execution stands alone or belongs to a pattern:

    ```json theme={null}
    {
      "post": {
        "query": "[the post's core promise, in plain words]",
        "filters": {
          "posted_at": { "gte": "[6 months ago]" }
        }
      },
      "limit": 15
    }
    ```

    Note which neighbors predate the post and which followed it, by `posted_at`.
  </Step>

  <Step title="Verify before you report">
    Check against the Objectives. Every section of the teardown quotes fields from your own responses. The ranking claim cites the comparison sweep. Neighbors carry their dates. Describe what is observable. Never explain *why* it went viral; state what it did and how that differed from the account's record.
  </Step>
</Steps>

## Output format

Use exactly this structure:

```markdown theme={null}
# Teardown: @[handle], [shortcode]

## The hook
[Construction, devices, modalities. Quote the opening line or visual.]

## The message
[Key messages and their proof. The offer and CTA, if present.]

## The build
[Format, narrative structure, length, notable creative choices.]

## The numbers
[Metrics with observed-at dates. Rank within the account's last 90 days.
Baseline ratio if published.]

## The neighbors
[Same-promise posts found, with dates: predecessors and followers.]

## Scope
[What was unavailable: null fields, missing baseline, tracking caveats.]
```

## Boundaries

* The teardown describes what was published and how the numbers moved. Causal claims ("it worked because") and predictions ("this formula will work") are out.
* If enrichment fields are null, say so in Scope; never fill gaps from your own viewing or memory of the post.
* Neighbors are matches within what Klint tracks. The earliest observed neighbor is not necessarily the originator.
