# Connect an agent to SeeAlso

Use the SeeAlso skill to draft your first pages, prepare walkthroughs, and send product changes to Review.

## Install the skill

1. As the site owner, open **Review** in your dashboard and create an agent key. Save the key in your CI secrets or password manager.
2. Set `MEEAD_SITE_URL` to the canonical origin of your hosted site, such as `https://help.example.com`. Set `MEEAD_REVIEW_TOKEN` to the key in the environment where you run the skill.
3. From your product repository, download the skill and runner. Codex reads repository skills under `.agents/skills`. For another agent, install the files in its skills directory.

   ```sh
   mkdir -p .agents/skills/meead-review
   for file in SKILL.md review.mjs; do
     curl --fail --silent --show-error --location \
       "$MEEAD_SITE_URL/meead-skill/$file" \
       --output ".agents/skills/meead-review/$file"
   done
   ```

4. Ask your agent to `Use the SeeAlso Review skill to prepare my first product pages and one walkthrough.` Check the drafts in **Review** and **Walkthroughs**.

## Send changes to Review from CI

Use Node.js 22 or later and the Codex CLI. Confirm that `codex exec --help` lists `--ignore-user-config`, `--ignore-rules`, `--ephemeral`, and `--output-schema`. Run from the product repository with both Git revisions available.

Fetch your published catalog so the scan can link suggestions to the right pages. The scan sends the selected diff and relevant page titles to the configured Codex provider. Use repositories approved for that provider. The submit command sends any suggestion to SeeAlso using the agent key.

```sh
node .agents/skills/meead-review/review.mjs catalog > meead-catalog.json

MEEAD_CATALOG_FILE=meead-catalog.json MEEAD_REPOSITORY=acme/product \
  node .agents/skills/meead-review/review.mjs scan "$BASE_SHA" "$HEAD_SHA" > meead-review.json

node .agents/skills/meead-review/review.mjs submit meead-review.json
```

Set `MEEAD_CATEGORY` to the ID of the destination subject. It defaults to `guides`. Set `MEEAD_LOCALE` to `ar` or `en`. It defaults to `en`. The runner uses `GITHUB_REPOSITORY` when `MEEAD_REPOSITORY` is unset. Provide the full base and head commit IDs.

For GitHub Actions, save the following as `.github/workflows/meead-review.yml`. Replace `main` with your protected release branch. Set repository variables `MEEAD_SITE_URL` and `MEEAD_CODEX_VERSION`. Use a pinned Codex CLI version that supports the flags above. Add `CODEX_API_KEY` and `MEEAD_REVIEW_TOKEN` as repository secrets.

```yaml
name: SeeAlso Review

on:
  push:
    branches: [main]

permissions:
  contents: read

jobs:
  review:
    if: github.ref_protected && !github.event.created && !github.event.deleted
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 0
          persist-credentials: false
      - name: Install Codex
        env:
          CODEX_VERSION: ${{ vars.MEEAD_CODEX_VERSION }}
        run: npm install --global "@openai/codex@$CODEX_VERSION"
      - name: Fetch the published catalog
        env:
          MEEAD_SITE_URL: ${{ vars.MEEAD_SITE_URL }}
          MEEAD_REVIEW_TOKEN: ${{ secrets.MEEAD_REVIEW_TOKEN }}
        run: node .agents/skills/meead-review/review.mjs catalog > "$RUNNER_TEMP/meead-catalog.json"
      - name: Identify changes
        env:
          BASE_SHA: ${{ github.event.before }}
          HEAD_SHA: ${{ github.sha }}
          CODEX_API_KEY: ${{ secrets.CODEX_API_KEY }}
        run: MEEAD_CATALOG_FILE="$RUNNER_TEMP/meead-catalog.json" node .agents/skills/meead-review/review.mjs scan "$BASE_SHA" "$HEAD_SHA" > "$RUNNER_TEMP/meead-review.json"
      - name: Submit suggestions
        env:
          MEEAD_SITE_URL: ${{ vars.MEEAD_SITE_URL }}
          MEEAD_REVIEW_TOKEN: ${{ secrets.MEEAD_REVIEW_TOKEN }}
        run: node .agents/skills/meead-review/review.mjs submit "$RUNNER_TEMP/meead-review.json"
```

Use the protected push trigger for the steps that receive secrets. GitHub explains why a [pull request workflow with secrets](https://docs.github.com/en/actions/reference/security/securely-using-pull_request_target) must not run fork code.

Open **Review** to see the suggestion. A retry of the same repository, commit range, and language uses the same key. If there is no customer-facing change in the diff, the runner sends nothing.
