- @ mentions(@path/to/file)
- Copy+paste
- Escto clear
- Ctrl-ato jump to the beginning
- Ctrl-eto jump to the end
- option/alt+enterfor new lines
Let slate manage it’s context
Often times, other coding agents require lots of agent rules and lots of instructions. Slate functions best when managing the exploration process on its own, and taking higher level direction from the user. This is because slate is designed to work for longer periods of time and so can manage its own context better. What should you provide slate with: The high level goal of the current session. Guidance on the order of things to do:- "Hey slate, research this section of my codebase @directory and then we are going to write a plan"
- "I want you to explore X, update Y to do Z, and then update A following the same pattern"
- If there are specific files it should stick to
- If there are specific patterns a good solution MUST have
- What the solution should look like ex: “should we refactor or should we just add to the codebase”
- Any specific gotchas that slate will run into during execution
"Make no mistakes"
"You're a really smart engineer"
"ALWAYS MAKE SURE TO DO X"
These prompts will generally lead to worse performance out of slate overall.
Clarity
The goal when prompting slate should be to be as clear and descriptive as possible. Slate is a fairly unopinionated agent and works best when describing the exact process you want it to follow and describing what you want clearly. Rather than saying: “Make a new api middleware to handle X” Say: “I need a new middleware for X and I need it on the following endpoints…”Use agent rules only when necessary
Your agent rules file should ideally be sparse and contain the following information:- High level overview of the codebase
- Constraints on developing in the codebase
- Useful commands or steps to perform operations in the codebase
Handling long tasks
One of the key reasons to use slate is for its ability to keep working through long sessions. The best way to do this is as follows:- Ask slate to research the problem first and make a plan
- Ask slate to iterate on the provided plan
- Executing the plan
todo tool for managing it’s tasks. Once the plan is confirmed, slate often creates a task list for it to follow.
If you are uncertain about the todos, make sure to ask slate your questions or tell slate what your concerns are.
This will help slate update the plan and the todos in real time to make sure it works through the task with you.
Slate will then work autonomously until a relevant stopping point is reached, likely the conclusion of the task.
For extra long tasks, somtimes slate may need a reminder about the goal after working on subsections for a long time.
Debugging systems with slate and background jobs
A second big benefit of using slate is the ability for slate to work well with background jobs. The best way to do this is through the following:- Understand which pieces of the system need debugging
- Set up the env so that slate can work well in it (see Workspace setup)
- Prompt slate to work through the process
- Which systems need debugging
- Relevant stack traces
- Context on where and how the bug occurs
- Any relevant library information
- Any opinions on the solution

