Skip to content

Install widgets with an AI coding agent

If you work on your website in a code editor (React, Vue, Next.js, plain HTML, or a WordPress or Shopware theme), you don’t have to follow a click-by-click guide. We publish a skill that teaches your AI coding agent how ReviewForest widgets work. Install it once, then tell your agent what you want in plain language.

It works with Claude Code, Cursor, Codex, GitHub Copilot and dozens of other agents, because it follows the open Agent Skills standard.

The skill covers both, and your agent will ask which one you want.

Widget embed (recommended) Custom rendering via API
What happens Your agent places our ready-made widget on the page Your agent fetches your review data and builds its own components
Design Configured in your ReviewForest dashboard Fully yours, in your own framework
Loads our JavaScript Yes No
You need A widget ID An API key with Website-Widgets access

Start with the widget embed. Only go the API route if none of our widgets fit the design you have in mind.

Run this in your project folder:

Terminal window
npx skills add reviewforest/skills

It detects the agents you have installed and may ask where the skill should go, then writes it into that agent’s folder: .claude/skills/ for Claude Code, .agents/skills/ for Cursor and Codex, and so on. Because it lands in your project, you can commit it like anything else and your teammates get it too.

Want it available in every project on your machine instead? Add the global flag:

Terminal window
npx skills add reviewforest/skills --global

To pick up later changes, run npx skills update.

If you’d rather not add a file to your repo, have the CLI generate the prompt instead:

Terminal window
npx skills use reviewforest/skills

That pulls the skill into a temporary folder and prints a prompt for you to paste into your agent. With --agent claude-code it starts Claude Code with that prompt already loaded.

This step is for the widget embed. If you’re building your own design via the API, you don’t need a widget. Skip ahead to the API section below.

Create a widget in your dashboard at app.reviewforest.org/website-widgets/add, as described in Install a ReviewForest widget. Already have one? Copy its code under Your widgets.

Copy the code it gives you. It looks like this:

Your widget code
<script src="https://widgets.reviewforest.org/main.js" defer></script>
<div class="reviewforest-app-YOUR-WIDGET-ID"></div>

You can hand your agent the whole snippet, or just the ID from the div. It can rebuild the rest.

Now describe the result you’re after, and paste in the code from step 2:

Add my ReviewForest testimonials carousel to the homepage, below the hero section:
<script src="https://widgets.reviewforest.org/main.js" defer></script>
<div class="reviewforest-app-YOUR-WIDGET-ID"></div>

You don’t need to explain the technical details. The skill already tells your agent:

  • Which widget types there are, and which ones need a wide container (the testimonials carousel and the forest page widget look cramped in a narrow column)
  • That the <script> tag goes in once, no matter how many widgets you add, and each widget needs its own div
  • That badges set to floating belong right before the closing </body> tag, while badges set to a fixed position go exactly where you want them on the page

If our widgets can’t give you the design you want, your agent can pull the data and render it natively: React components, Vue templates, plain HTML, whatever your project uses. No ReviewForest widget JavaScript loads. Your page fetches the data from our API directly.

  1. Open app.reviewforest.org/integrations/public-api and click Create new key.

  2. Under Type of data access, choose Website-Widgets, then click Create key. The type is the important part, see the note below.

  3. Give the key to your agent and describe what you want to show.

If your account isn’t activated yet, the dashboard asks you to activate it before it creates the key.

Your agent can work with your overall score, your review count, your tree counts (total, from reviews, or by time period), your connected platforms with their individual scores, the reviews themselves, a feed of individual planted trees, and a link to your public forest page.

Once your agent is done, load the page and confirm:

  • The widget shows up, with your real data in it
  • With the widget embed, the <script src="https://widgets.reviewforest.org/main.js"> tag appears once in the page source
  • Wide widgets have room to breathe. If your carousel looks squeezed, it’s sitting in a container that’s too narrow
  • The page still looks right on a phone

If nothing appears at all, check your Content Security Policy, if your site has one. With the widget embed, it has to allow https://widgets.reviewforest.org for script-src and https://api.reviewforest.org and https://cdn.comvi.io for connect-src. Otherwise the script doesn’t load, or it loads and gets no data. The review forest widget also loads a map from Mapbox and adds its own styles, so it may need more. For your own design via the API, https://api.reviewforest.org in connect-src is enough.

The skill itself lives at github.com/reviewforest/skills if you want to read what your agent reads.