A brown horse wearing a black hoodie and «YOLO MODE» sunglasses gallops against a sunset backdrop. The hoodie features the words «VIBES CODE» along with symbols, and the background is covered in bright blue computer code.

How to code with a «pro vibe» using Claude Code, GitHub Copilot, and coding agents?

Home " How to code with a «pro vibe» using Claude Code, GitHub Copilot, and coding agents?

Your code agent is great, but it’s easy to lose control of your codebase—just like falling off a horse. And once you’ve fallen, it’ll be very hard to get back on top. I’m sure you know what I’m talking about: Code bloat, over-engineering, complexity, file explosion …

Article content

What's more, it's easy to lose all your tokens—and your wallet along with them.

But how can you use it efficiently and speed up your development without burning through it all?

Here are some interesting steps I try to follow to be as efficient as possible and write code like a pro.

1) Use /init to create a claude.md file, but clear it

/init lets you create a claude.md or agent.md a file that provides your coding agent with the context needed to code in your project.

But be careful, /init It will contain a lot of information, including things that may not be very useful and will cost you a lot of credits or tokens.

The claude.md / agent.md will be added to your request each time you ask the agent a question. So removing items that aren't useful will save you money and improve accuracy.

Furthermore, it’s very important to specify how you want your agent to write code. That’s because it tends to write cutting-edge code with lots of tests, fallbacks, and small files scattered throughout. While this is useful for certain specific parts, if it does this everywhere, you’ll quickly lose control of your code.

2) Apply your agent to a specific part and file

Instead of saying « Please implement this function for me—make some magic happen«, create the file structure, the class, and the overall architecture yourself, and name the function. Then, using your agent, ask «” Implement the function x_name for me in the file @src/file.py«. That will ensure that you maintain control of your codebase, understand how it works, and don’t overcomplicate it.”.

To specify the file to work in, use the @ symbol.

Article content

3) Two-pass coding

Once your agent has implemented your code, always go through it a second time to clean it up and check it. I like to use this prompt:

« Apply the YAGNI, SOLID, DRY, and KISS principles to that code, remove any overengineering and anything that could be simplified, and show me what remains.« 

It removes the bloated code, verifies that everything is working, and—more importantly—keeps it simple.

  • YAGNI — don’t build for a future you’re just guessing at. The cost isn’t the extra code; it’s that a speculative abstraction locks in the shape of the solution before you know the shape of the problem.
  • SOLID — SRP (one reason to change, i.e., one stakeholder who requests the change), OCP (extend without modifying), LSP (subtypes must adhere to the supertype’s contract), ISP (a function must accept the narrowest interface it actually needs), DIP (depend on abstractions).
  • DRY — it’s about knowledge, not text. Two identical blocks that change for different reasons aren’t duplication. Sandi Metz: duplication is cheaper than the wrong abstraction.
  • KISS — simple ≠ short. Simple means a few interlocking concepts that are easy to remove.

4) Use plan mode / build mode

When you want to implement a larger portion of your project, it’s very important to use plan mode first. It allows your agent to analyze your code and propose a plan. And you’ll see—you’ll have a lot of changes to make to that plan.

Usually, what I do is ask to create a plan in a plan-xxx.md. Then I update the plan, refine it, and simplify it. Then I switch to build mode and ask to implement it step by step.

And at the end, I make sure to use the two-pass coding method and check what has been done.

You can easily switch between plan and build modes using Alt+Tab

5) Use Git branches and worktrees like crazy

It's very easy to ask our agent to undo it or redo a change, since it retains a history of what it did. But that’s clearly not enough, especially when we have multiple agents running at the same time. For that reason, it’s important to have a specific branch and, at each milestone (for example, after implementing a function), to commit the code. Because a lot of the time—especially when we aren’t very specific in a prompt and don’t use the @ symbol to target a specific file—our agent will modify files other than the ones we intended. So after the run, it’s always a good idea to look at the files in the source control of our Git branch. That way, it’s easy to check what was changed and how.

Git also solves the problem of running multiple agents at the same time using worktrees. A worktree is a second checkout of the same repository, located in its own folder and on its own branch. You assign one worktree to each agent, so two agents can never compete for the same file, and you merge the branches once you are satisfied with their results.

Article content

6) Run several agents at the same time

With worktrees, you can now run multiple agents in parallel: one agent per terminal and per worktree, or the subagents that your main agent launches itself.

It goes much faster, but you lose what made a single agent manageable: you can no longer read everything. Two rules to keep it under control:

  • One agent = one task = one perimeter. It’s point 2 again, but stricter. Assign each agent their own files using the @ symbol and a task that doesn’t interfere with the other agents’ files. If two agents work on the same file, they will inevitably end up overwriting each other’s changes, and no worktree will save you during the merge.
  • Activate the status display, to track in real time what each agent is doing, which file it is working on, and where it is waiting for you. Without it, you have several agents working blindly in your repository, and you don't discover the problem until the very end.

And the review process remains the same: one branch per agent; you review the diffs one by one before merging; and you always use the two-pass method.

7) The /clear and /new commands

Our agent retains the context of what it has done. This is helpful when we’re working on the same functionality or concept. However, it consumes a lot of tokens as the context grows, and it can lead to poor implementations if we’ve changed the subject. So when we change the subject, use /clear or /new to clear the context and start with a clean slate.

It will save you a lot of tokens and prevent poor implementations.

8) The skills

Skills are small text files (located in ~/.agents/skill) that explain a task to the agent. You can easily add skills to your agent by going to https://www.skills.sh/ without having to write them yourself.

For example, for our two-pass process, you can easily add a «simplify-code» skill:

---
name: simplify-code
description: Verifies code quality by applying the YAGNI, SOLID, DRY, and KISS principles to remove overengineering.
---
You are an expert software architect specializing in code simplification, readability, and maintainability.

When a user provides code, your primary directive is to:
Run that code through the YAGNI, SOLID, DRY, and KISS principles, remove overengineering and elements that could be simplified, and show me what remains.

To do this effectively, always follow this structured process:

1. **The Critique**: Briefly identify specific violations of the core principles in the provided code:
   - **YAGNI (You Aren't Gonna Need It):** Flag unnecessary abstractions, premature optimizations, or features built "just in case."
   - **SOLID:** Point out tight coupling, bloated interfaces, or classes/functions taking on too many responsibilities.
   - **DRY (Don’t Repeat Yourself):** Identify duplicated logic or boilerplate.
   - **KISS (Keep It Simple, Stupid):** Highlight complex logic, deep nesting, or convoluted patterns that can be written much more directly.

2. **The Purged Code**: Output the new, refactored version of the code. It must be clean, direct, functional, and completely stripped of all overengineering.

3. **What Did Not Survive**: Provide a concise, bulleted list of the specific complexities, design patterns, or unnecessary code blocks that you deleted or simplified, explaining exactly why they were removed.

Then you can easily call it in your agent by calling @simplify-code. You can add as many skills as you like to improve or speed up your coding. Your agent will also automatically trigger skills based on relevance.

9) The hooks

A skill is a suggestion, and your agent can choose to ignore it. A hook is a command that runs every time, regardless of what the agent thinks. You configure them in your settings.json, and they are the way to create a rule that is truly always applied:

– Format and lint after every write, so you never read a poorly formatted diff

– Run your tests once the agent has finished, to see right away what it broke

– Block edits to sensitive files (.env, migrations, secrets)

– Send a notification or play a sound when the agent needs you

The rule is simple: if you want it sometimes, write a skill. If you want it all the time, write a hook. For example, you can add a rule that ensures your code remains simple by using a hook on `UserPromptSubmit`.

To do that, edit the file ~/.claude/settings.json and add the following:

{
  "hooks": {
    "UserPromptSubmit": [
 {
 "hooks": [
 {
 "type": "command",
            "command": "echo 'Please keep solutions simple and focused. Do not overengineer. Do not add features or error handling beyond what was asked. Respect YAGNI+SOLID+DRY+KISS.'"
 }
 ]
 }
    ]
  }
}

10) The MCP tools

MCP tools allow your agent to call external tools and receive results from them. An excellent example is Playwright, which lets you launch your entire web codebase in an automated Chrome browser and allows your agent to analyze it directly.

This can be done by adding MCPs. What is the difference between MCPs and skills? MCPs are tools that are called externally by our agent and return a result. Skills are written text notes that explain how to do something (like a recipe).

You can easily add an MCP like this:

claude mcp add --scope user playwright npx @playwright/mcp@latest

11) Advisor Mode

In many coding agents, it is possible to use a generic LLM for routine tasks and a larger LLM for planning. Larger LLMs are more expensive, so it makes sense to call them only when needed.

On Claude Code, we can use Sonnet for the code and configure Opus with the /advisor option. When Sonnet needs advice, it calls Opus. This creates a hybrid system with two models, saving us tokens.

Article content

12) Skip permissions (Yolo mode)

Does your agent always ask for your permission? That's nice, but it can get pretty tiresome, especially if you use Git like a pro. So you can run your agent in "dangerous" mode, where all permissions are accepted by default.

With Claude, it’s

claude --dangerously-skip-permissions

You'll save a lot of time, but be careful—with great power comes great responsibility.

My expertise Artificial intelligence & cybersecurity

Artificial intelligence development for your company

AI Development

Use AI solutions that go beyond mere technical performance to generate a measurable impact on growth and competitiveness

AI Agent & Agentic AI - Artificial Intelligence Consulting

AI Agent & Agentic AI

Harness the power of AI Agents and Agentic AI to transform your operations: automated tasks, coordinated processes for tenfold strategic value

Machine Learning & Deep Learning - From analysis to innovation

machine learning & deep learning

Leverage machine learning and deep learning to turn your data into reliable predictions and make automated decisions

Training & Fine-Tuning of AI Models - Artificial Intelligence

Training & Fine-tuning

Use AI model training and fine-tuning to transform generic models into tailor-made solutions capable of generating relevant predictions

Embedding & Knowledge graph: Semantic search at your service

Semantic search

Improve access to your data with semantic search using embeddings and knowledge graphs

RAG - Generation augmented by documentary research

Document base & RAG

Thanks to RAG (Retrieval-Augmented Generation) technology, you can query your documents and obtain precise, sourced answers.

Tailor-made Edge AI - real-time AI optimized for you

Local & Edge AI

Run your AI models directly on your local equipment: optimize your costs, keep control of your data and your business processes

Deploying AI models - Putting your models into production

Production & deployment

Move from experimentation to production, automate the deployment of your artificial intelligence models & improve reliability

AI Cybersecurity: Guardrails, Sanitization, Proxies and Protection

Cybersecurity AI

Ensure the cybersecurity of your artificial intelligence models and data with guardrails, prompt sanitization and proxies in compliance with the latest standards.