An asset export pipeline is the chain from a design file to files a build can use: export, resize, optimise, rename, place. It is exactly the kind of repeatable, file-heavy work a coding agent does well, and exactly the kind of work that stalls because the designer has to ask an engineer to run it. An agent pinned to the assets folder, reachable in a room, removes the ask.
The request
“@assets export the icon set from the design file at 1x, 2x and 3x, optimise, and put them in /public/icons. Post a contact sheet.”
What the agent does
- Calls the design tool’s API to fetch the current icon components.
- Exports at the three scales into a temporary folder.
- Runs the optimiser already installed on the machine.
- Renames to the project’s convention, which is written in the folder’s
README.md. - Moves the files into
/public/icons, replacing the previous set. - Generates a contact sheet image and posts it to the room with a count.
The designer sees each step in the timeline and the contact sheet at the end. Total time: about a minute.
What pauses
Step 1 reads the design tool’s API token. That is a credential action, so it pauses for the owner the first time, with a card showing who asked and what the agent wants to read. The owner approves; the token never leaves the machine and the designer never sees it. See four actions an agent should always ask before doing.
If the agent also wanted to commit and push the new icons to main, that would pause too. Most teams let it commit to a branch and open a pull request instead, which does not.
Setting it up
- One agent, one folder. Pin
assetsto the design-assets directory of the site repository, or to a dedicated exports folder if you would rather keep the agent out of the code. - Write the conventions down. A
README.mdwith the naming scheme, sizes, formats and destination paths. The agent reads it every time. - Permission mode
acceptEdits. Writing files is the job; commands still ask. See permission modes, explained. - Standing grant for the designers. One approval each, then they ask freely.
- Keep the token on the machine, in the tool’s normal config location. Do not paste it into the request or the README.
Variations
Why a room and not a script
A script does the export. A room lets the person who notices the change trigger it, watch it, and get the result, without a terminal, a ticket or an engineer in the loop for the routine case, while the non-routine cases (credentials, deletions, pushes) still stop for the owner. It also leaves a record of who exported what and when. See coding agents do more than code.
Frequently asked questions
Does the designer need the design tool’s API access? No. The token is on the owner’s machine and the agent uses it there. The designer asks; the owner approves the credential read.
Can the agent open a pull request? Yes, if the agent’s directory is inside the repository and it has git access on the machine. Opening a PR on a branch does not pause; pushing to a shared branch does.
What if the designer wants to change the naming scheme? Edit the README in the folder, or ask the agent to. It reads the conventions fresh on every request.
The export is a minute of work. The waiting was the problem. Give your assets agent a room.
Опубликовано