InfraStudio Agents Start free

Guides

Write your own instructions

Change what the agents do in your repository, with files in the folders .agents and .claude.

Last updated

After this guide, the agents follow your own instructions for your repository, instead of the platform's.

Who can do it: a person who can change the default branch of the repository on GitHub. No role in the app is needed.

Before you start

You do not need any of these files. Without them, the agents use the platform's own instructions.

The agents read the files from the default branch of the repository. A file on another branch does nothing until it is merged.

Warning

Review a change to these files like a change to your code. It changes what every later job of the agents does. The agents themselves never change these files.

The platform's own limits stay in force, whatever a file says. The agents never see your keys, never change the paths that are always blocked, and use only the tools the platform allows.

Instructions for one kind of job

  1. Make a file .agents/prompts/<name>.md in your repository, with the name of the kind of job.
  2. Write the whole instructions for that kind of job in it. The file replaces the platform's instructions for that kind of job. It does not add to them.
  3. Merge it into the default branch.

The names:

NameThe job
reviewThe Product analytics review
error-triageError triage
planThe plan for a suggestion
implementMaking a change
reviseCorrecting a change, after you ask for a change
pr-reviewThe second reading of a change by a second AI
code-reviewThe PR reviewer
ci-fixThe CI fixer
issue-triageIssue triage
docs-updateThe Docs updater
askA question in Chat or Telegram

Clarity queries

The Collector (Clarity) reads which numbers to collect from .agents/clarity-queries.txt. The collector does not work without this file. See Connect analytics and Sentry.

Write one query per line: a name, a space, then the Clarity dimensions, separated by commas. A line that starts with # is a comment. A name has letters, digits, dots, dashes and underscores. For example:

# name, then dimensions
by-device Device
by-page-and-browser URL,Browser

Clarity allows 10 requests a day, and each line is one request. Keep the list short.

The steps of the analytics review and the error triage

The Product analytics review and Error triage each follow a list of steps. To change it, add one of these files:

  • .claude/skills/analytics-review/SKILL.md for the Product analytics review;
  • .claude/skills/error-triage/SKILL.md for Error triage.

Without the file, the agent follows the platform's own steps.

A review across every repository

In a product with several repositories, a review that reads every repository uses the file of the main repository only. The files in the other repositories are not read for it. See A product with several repositories.

For the instructions of one kind of job, a repository that has no file of its own uses the file of the main repository.

What you see when it worked

The next job of that kind follows your file. Read its result on the Activity page, or the report under Documents.

More