Skip to content
Back to skills

Agent Skill

ASecurity

Work inside a Treq agent terminal: use the treq CLI to create and inspect workspaces, keep the workspace description current with treq set -d (it becomes the pull request body), send files or text to the user in the Treq UI, notify the user with treq notify, and create commits with treq commit only when the user explicitly asks. Use this skill for every Treq agent session, whenever you need another workspace, change what the workspace does, should show the user a file or preview, finish a tas...

  • 6 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 2, 2026
ai-agentsgobashgitapi

Works with

  • terminal
  • cli
  • api

Security analysis

A100/100

Scanned December 4, 2026

npx -y skills add treq-dev/treq --skill agent-skill --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent Skill?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Agent Skill
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/treq-dev-agent-skill/badge)](https://www.skillsdirectory.com/skills/treq-dev-agent-skill)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: treq
description: >-
  Work inside a Treq agent terminal: use the treq CLI to create and inspect
  workspaces, keep the workspace description current with treq set -d (it
  becomes the pull request body), send files or text to the user in the Treq
  UI, notify the user with treq notify, and create commits with treq commit
  only when the user explicitly asks. Use this skill for every Treq agent
  session, whenever you need another workspace, change what the workspace
  does, should show the user a file or preview, finish a task or need the
  user's input, are asked to record a commit, or are finishing inplace
  conflict resolution.
---

# Treq

You are running inside Treq. The session system prompt names your working
directory and the home repository. Stay inside that filesystem scope for
direct file reads and writes. Use the `treq` CLI when you need to create or
manage other workspaces. Those commands may write under `.treq/workspaces/`
outside the current working directory.

Run `treq --help` if a flag is unclear. Use `treq` for workspace,
description, commit, send, notify, and resolve operations, and `jj` for
anything treq lacks. Never run `git` in a workspace (see Git and jj).

## Workspaces

A workspace is a separate working copy of the same repository. Files live
under `.treq/workspaces/` in the home repo. Uncommitted work in one workspace
does not appear in another.

```bash
treq st
treq st <workspace_name>
treq diff [--stat]
treq diff <workspace_name>
treq add <branch_name> [-d <description>] [-l <title>] [-s <source_branch>] [-p <sparse_path>]... [-k <symlink_path>]...
treq set [<workspace_name>] [-d <description>] [-l <title>] [-t <target_branch>]
treq mv <source> <destination> -f <file> [-f <file> ...]
treq mv <source> <destination> -c <commit> [-c <commit> ...]
```

`treq st` from a workspace directory shows that workspace only. You get the
stacked parent and children, the uncommitted change count, whether files are
conflicted, and the commit count. It omits the repository default branch. If
files are conflicted, it tells you to run `treq diff --conflicts`. `treq st`
from the home repository with no name lists every workspace.

Use `.` as a workspace name when a command needs the home repository. Create a
new workspace when the task should stay isolated from the current working copy.
Do not edit sibling workspace directories by hand.

Workspaces you create must be nested under the branch they are based on. From
the home repository, `treq add <branch_name>` targets the repository's default
branch. When stacking more work on an existing workspace, pass its branch to
`treq add` with `-s`. After creation, run `treq st` from the home repository and
confirm the new workspace appears below its target. If it does not, correct the
metadata with `treq set <workspace_name> -t <target_branch>` before continuing.

## Git and jj

Workspaces are jj workspaces under the home repo's `.treq/workspaces/`, which
the home repo ignores, so `git` there silently reads and writes the home repo.
It shows the home repo's state, and write commands such as `stash`,
`checkout`, and `reset` damage the home repo's working tree.

| Instead of | Use |
| --- | --- |
| `git status` | `treq st` or `jj st` |
| `git diff` | `treq diff` (commits and working copy against the target) or `jj diff` (working copy only) |
| `git diff --stat` | `treq diff --stat` |
| `git log` | `jj log` |
| `git show <rev>` | `jj show <rev>` |
| `git show HEAD~1:<path>` | `jj file show -r @- <path>` |
| `git blame <path>` | `jj file annotate <path>` |
| `git check-ignore` | `jj file list` (tracked files) or `jj st` |
| `git checkout -- <path>` | `jj restore <path>` |
| `git commit` | `treq commit` |

To check a test fails on old code, do not stash. Edit the file back
temporarily, run the test, then return to your version, or use
`jj restore <path>` to drop the experiment.

## Workspace description

Each workspace has a description. When the user creates a pull request for
the workspace in Treq, the description becomes the PR body. Maintain it the
way you would maintain a PR description.

```bash
treq st [<workspace_name>]
treq set [<workspace_name>] -d - <<'EOF'
<markdown>
EOF
```

- `treq st` shows the description with the rest of the workspace status.
- `-d -` reads the new description from stdin; `-d '<text>'` also works for
  one line. Empty input clears it.
- Omit the workspace name to use the workspace you are in. `-r <repo>`
  works as on the other commands.

Read the description before you start: it often holds the task. Update it
after each reviewable change, and before you report the task done. Rewrite
the whole description each time; do not append a log of updates.

- Describe the change as it stands now, for a reviewer who has not seen the
  conversation: what changed, why, and how it was tested.
- Keep any sections or links the user wrote, unless they are now wrong.
- Use Markdown. Keep it short; the diff carries the detail.
- If the repository has a pull request template (for example
  `.github/pull_request_template.md`), follow its headings.

## Supporting repositories

When the system prompt lists supporting repositories, you may read them but
must not edit them directly. Delegate changes to an agent scoped to a
workspace in that repository:

```bash
treq add -r <repo> <branch_name> [-d <description>]
treq agent start -r <repo> <branch_name> "<prompt>" [-a <agent>]
treq st -r <repo> [<workspace_name>]
treq diff -r <repo> <workspace_name>
```

- `<repo>` is the supporting repository's path or directory name.
- `-r` works on `add`, `set`, `st`, `diff`, `agent start`, and `commit`.
  `mv` takes `--repo` because `-r` is its range flag.
- `treq agent start` needs a workspace branch. It cannot start an agent in a home
  repository.
- `treq agent start` returns once the agent is started. Poll `treq st -r` to follow
  its progress.

## Projects

A project is the set of repositories a Treq window shows. When the system
prompt says the work is part of a Treq project, every repository in it is
yours to read, and the project may add instructions and context files: follow
the instructions and read the context paths it names (never edit them).

```bash
treq project status [--format json]   # every repository and its workspaces
treq project add-repo <owner/name|url|path>   # add one; Treq clones it once
treq project list                      # saved projects on this machine
```

- Run `treq project status` first to see what is there; do not search the
  disk for sibling repositories.
- Need a repository the project does not have yet? `treq project add-repo`
  clones it under `~/.treq/repos/<host>/<owner>/<name>` and adds it. Never run
  `git clone` yourself. If the project already has it, it prints
  `Already in <project>: <path>` (JSON `status`: `added` or `already_present`).
- A repository on an SSH machine shows in `status` and `list` as
  `<path> on <host>`; it cannot be read from this machine.
- Work in another project repository the same way as a supporting one:
  `treq add -r <repo> <branch>` then `treq agent start -r <repo> <branch> "<prompt>"`.
  `<repo>` can be the folder name or the `owner/name` tail of its path.
- One branch name across repositories keeps related work easy to find
  (for example `treq/checkout-quotes` in both the API and the web repo).

## Message other agents

Agents treq started can message each other, in this window, in another
Treq window, or on a remote machine. Each agent has a handle such as
`claude-2`.

```bash
treq agent msg --list                         # agents in this project
treq agent msg <handle> "<text>"              # send
treq agent msg <handle> "<question>" --ask    # send, then wait for the reply
treq agent msg --all [--repo <repo>] "<text>" # every other agent in the project
treq agent msg --inbox [--wait]               # read what waits for you
treq agent msg --ack <id>                     # done with a message
treq agent msg --reply <id> "<text>"          # answer an --ask
treq agent msg --status <working|blocked|done> [--note "<text>"]
```

- When a line starting with `[treq]` appears in your prompt, run
  `treq agent msg --inbox`, then ack or reply to each message.
- A message waits one minute (`--timeout`, at most `1m`). `--ask` exits 3
  when no reply comes in time.
- `--list` and `--all` cover the agents in this project, in any of its
  repositories. Add `--everywhere` to reach agents outside it. A message to
  a named handle reaches it in any project.
- `--status` goes to the agent that last messaged you unless you name one.
- Add `--json` for output you parse.

## Send files to the user

Use `treq send` when the user should see a file, screenshot, or text preview
in the Treq UI. Do not ask them to open the path themselves when send can
show it.

```bash
treq send <path>
treq send -
echo "notes" | treq send
```

- Pass an existing file path, or omit the path / use `-` to read stdin.
- Images (`png`, `jpg`, `jpeg`, `gif`, `webp`, `bmp`, `svg`) show as
  thumbnails in the terminal that ran the command.
- Everything else opens as selectable text.
- Piped stdin is staged under `.treq/send/` (gitignored).
- Treq must already have this repository open.

## Notify the user

The user often runs several agents and switches to other work. When you finish
a task or need their input, run `treq notify` with a one-line summary:

```bash
treq notify "Tests pass. Ready for review"
treq notify "Need input: keep the v1 endpoint or remove it?"
```

- Treq shows an OS notification titled with the workspace name.
- Treq skips it while a Treq window is focused, or when the user turned it
  off in Settings. The command still succeeds.
- Run it once per finished task or open question, not for progress updates.
- Ask the full question in the terminal too. The notification only brings the
  user back to this session.

## Commits

Never commit on the user's behalf unless they explicitly ask you to. When
they do, use Treq. Do not use `git commit` or `jj commit`
for this flow.

```bash
treq commit <workspace_name> -m <message> [--push]
```

- `workspace_name` is the workspace branch name (the current workspace if you
  are already inside one).
- `-m` is required. Keep the message to a single clear subject, at most 500
  characters.
- `--push` pushes that workspace to the remote after a successful commit.
- This records the pending working-copy changes in that workspace. It does
  not merge the workspace into its target.

Commit only when the user explicitly asked for one. A finished task, a
reviewable slice, or a pending rebase or sync is not permission: leave the
changes uncommitted and ask the user. Do not create empty or placeholder
commits.

## Conflict resolution

Run `treq st` first. If it reports conflicts, run `treq diff --conflicts`.
That command lists conflicted files, conflict hunks, and conflicted commits
with change ids. Pick one of the two flows below. Do not mix them on the same
conflict.

### New-commit resolution

Use this when the workspace working copy holds the conflict and you should
record a new commit on the branch.

1. Run `treq st` and `treq diff --conflicts` in the workspace.
2. Edit each conflicted file in the workspace working copy.
3. Remove conflict markers and keep the intended result.
4. Run `treq st` until it reports no conflicts.
5. Ask the user before committing. Once they say yes, run
   `treq commit <workspace_name> -m "<message>"` with a message that
   describes the resolution.

Do not use `git commit` or `jj commit` for this step.

### In-place commit resolution

Use this when a rebase left one or more existing commits conflicted. Treq
rewrites those commits in place. It does not dirty the product workspace
working copy. Resolve directories live under `.treq/resolve/<workspace-slug>/`.
The Commits tab **Resolve conflicts…** action creates them.

1. Confirm `treq diff --conflicts` lists conflicted commits and their change ids.
2. Work in `.treq/resolve/<workspace-slug>/<change-id>/` once that directory
   exists.
3. Edit the conflict markers in those files.
4. Or run `treq resolve <change-id> [1|2|base|both]`.
5. Or pipe JSON replacements:
   `echo '{"path/to/file": "replacement\n"}' | treq resolve <change-id>`.
6. Repeat for every change-id directory.

Your work is complete when no change-id directories remain under the resolve
root. `treq resolve` always takes a change id.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.