Back
You can do what with Pieces? Jim’s top 5 copilot prompts
Learn 5 prompts for Pieces to boost your productivity as a software engineer.
As a regular Pieces user, I love it when I show off a feature I use every day and folks are just amazed that Pieces can do that.
So I thought it would be fun to create a series of blog posts to share the things that make folks go “You can do WHAT with Pieces??? Wow!”.
In this post, I share my top 5 prompts to show things that the Pieces Copilot does that you may not be aware of that really help me in my day-to-day work.
What is the issue I need to look at?
If you are like me, you are easily distracted. I’m not saying I see myself in Dug from Up, but when we have a constant stream of chat notifications, emails, and other distractions, it’s easy to lose your focus.
My worst habit like this is picking up my phone to check my blood sugar because I think it’s low (I’m a type 1.5 diabetic), getting distracted by notifications, chatting with folks on various platforms, then wondering why I’m feeling bad, and realize it is because I actually forgot to check my blood sugar.
As devs, we do the same.
Head to Slack to check a message, get distracted by all the other messages and emails, and before you know it your coffee is empty and you still haven’t read the message you were looking for.
With Pieces Long-Term Memory, I can avoid this entirely.
From inside my IDE, I can bring up the Pieces Copilot and ask a question like “What is the issue I need to look at?”
.
It will then detect the relevant context from my interactions in chat tools and ticket systems like GitHub issues or Jira, and bring back the right answer.
In this case, telling me to look at an issue to create a sign up page in our SciFi store project.
Need more information about the issue in question? Again, no need to leave your IDE, you can ask Pieces to help.
How can I implement this issue in this project?
This is probably one of my favorite features, bringing together Pieces ability to use context from a folder of code and Long-Term Memory in one chat.
You’ve just taken advantage of the Long-Term memory to refresh your memory as to what you need to work on.
Now it’s time to dive in.
Where do you start?
If this is a new project to you then you may not know your way around the codebase. You could head to your chat tool to start asking for help (hello distractions!) but instead, Pieces can help.
By adding the project to the context of your chat about the GitHub issue, Pieces will then be able to answer questions using both its Long-Term Memory, as well as the code provided.
This way you can ask questions like “how can I implement this issue in this project?”
.
Where Pieces has the relevant context of your project, it can give detailed answers.
For example, in this video using our SciFi store Pieces gives you the route, detecting that the project is using SQLite so giving a guide to create the relevant database and insert data, providing an HTML file that uses the same base template and styles as the rest of the app, and even showing how to add to the navigation.
Pretty much everything you need to build out this issue.
Now as always, this is a copilot, so this is guidance that needs you as the human-in-the-loop to verify as you are implementing this feature, but it gives you invaluable guidance.
What was the documentation I was reading?
When using Long-Term memory, Pieces will often return you a link that it has captured.
This is especially useful when you have a million tabs open, and remember reading something in one of them, maybe in your history, and you want to quickly get back to that page.
For example, you are reading up on SQLite as a part of implementing the issue you were asked to look at.
You read about the connection API in Python, then end up deeper into the rabbit hole of the docs, and you can’t remember where you were.
You can ask Pieces “What was the documentation I was reading to connect in SQLite with Python?”
, and in the summary, you’ll get a link.
Translate this code into Python
Often when researching code, you’ll get suggestions in a different programming language to the one you are using.
This happens a lot in companies with teams that use multiple programming languages – you ask for help doing something, and they give you a code sample from their codebase, and this might be in the wrong language.
In our SciFi store, we need to add a page to capture a user's information including their email address. I’d like to validate this, so I asked a colleague how to do it – and they shared some C# code for a regex.
I need this in Python, so I can ask Pieces to translate it for me!
I can now drop this code into my project, and validate my emails.
How can I fix this code?
Despite having over 25 years of professional engineering experience, I often make mistakes in my code leading to annoying bugs.
Everyone does, from juniors to very experienced developers.
A lot of the time these are just simple mistakes that are easy to spot unless you have been staring at the code for hours trying to work it out.
Often the suggestion is to go for a walk to let your mind process the bug and suggest a fix.
Another, faster solution when you don’t have the time (or good enough weather) for a walk, is to rubber-duck with an AI.
In our SciFi store, for example, I wrote some terrible SQLite code as I was new to using SQLite with Python.
When running it, it failed to load the stock.
I could fire up my debugger, dig into what is happening, and hope to find the issue, but this could take a long time as I dive deep into my code and potentially external libraries. Or, I could ask Pieces.
Pieces caught my silly error – accessing the row by name instead of index. I was able to then replace my code with the suggestion from Pieces and get it working!
Conclusion
Pieces becomes a more powerful tool as you learn the different capabilities, and enable these with some very powerful prompts.
It’s worth taking some time to try out a range of different prompts and ideas to see what you can get out of Pieces.
If you have a favorite prompt or feature of the Pieces Copilot, let me know on X, Bluesky, LinkedIn, or our Discord.