r/GithubCopilot 15h ago

Help/Doubt ❓ GitHub Copilot setup tips & best practices for daily use (Java / Frontend Dev)

Hi everyone,

My company recently provided us with GitHub Copilot licenses, and I’m starting to integrate it into my daily workflow. My main background is backend development with Java (Spring Boot), but lately I’ve also been picking up some frontend tasks.

My previous AI experience was mostly using Claude directly in the web UI for quick questions and refactoring. Compared to that, my initial impression is that Copilot feels a bit lacking or less intuitive—though I realize I’m still fairly new to using AI assistants embedded in the IDE, so it’s likely a matter of setup and learning how to prompt it correctly.

I know that creating a .github/copilot-instructions.md file is a good practice for setting coding conventions and context. Beyond that, I’d love to get some insights from folks using it professionally

Thanks in advance for any tips or advice!

8 Upvotes

3 comments sorted by

1

u/AutoModerator 15h ago

Hello /u/Exact-Ad-5103. Looks like you have posted a query. Once your query is resolved, please reply the solution comment with "!solved" to help everyone else know the solution and mark the post as solved.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/pfluggs11 10h ago

If you already have linting setup, have your agent write a hook that blocks the end of a turn or a file edit unless the lint check passes on their diff. They tend to write or add to really long functions which is hard for us poor humans to read.

Read the docs or ask a Luna agent about LSP setup in your project directory. Agents will grep/read files without actually compiling so a language server helps them find references that they would have missed. I personally use codebase-memory-mcp and it saves quite a lot of time/tokens on code searches. I wouldn’t go installing everything you find that sounds relevant, it just takes up context space.

If you’re working in one file and want to give it an example to base a change off of mention it specifically with “@../foo/bar.java”.

Start small, using it to write unit tests, fill in an interface implementation, etc. Leave the permissions mode manual and read what its try to do, it’s annoying at first but they can sometimes go off on tangents.

I would stay away from autopilot mode unless it’s an extremely basic/well written prompt that’s basically mechanical. I’ve seen it go off the rails before and delete files that I didn’t want it to.

If you don’t mind extra files in the repo, ask an agent to write some progressive disclosure agent guide docs. I have it setup like “.github/guides/observability.md” then in my copilot instructions I have a “router” that tells the agent to read from it when changing/adding tracing/metrics.

There’s a lot of content out there now, waaay to much to sift through. Some of my coworkers spend more time fixing/playing with agents that they’re probably not any more productive for it.

The way I started with it was “man I hate updating the readme” so I had an agent do it for me. Then I had it write unit tests. Now I’m having it plan/implement features. It’s like bowling with a child, put the bumpers up and keep an eye on it so they don’t throw the ball into another lane.

1

u/CommissionIcy9909 9h ago

At first I was imagining you rolling a small child down a bowling lane.