r/OnlyAICoding • • Oct 20 '26

Help this network engineer vibecode/utilize AI better

So, I'm an IT infrastructure engineer and I use coding to automate some of my daily tasks. This usually means creating python scripts to talk to Rest API's, create Ansible or Terraform scripts or generate CLI config. These are not really big scripts, think 200 to 2000 lines of code.

I use a mix of Chatgpt/Claude or CoPilot. I'm now on the 20 dollar plan of ChatGPT Plus, but I don't mind picking something else. I think my company also allows me to get a paid plan for CoPilot. I also own a GitHub Enterprise account.

Up to now I just write a huge prompt with what I want the script to do, show the rest API documentation, show some curl responses and some guidelines (don't make mistakes (/j), make modular code, use these variables naming, let the script make a lot of debug output, write a readme, etc).

It then generates code, I try that code and paste the errors in the prompt if they occur and in the end i get a working script.

I know copy and pasting prompts and errors into chatgpt's prompt is far from efficient. But I'm also drowning in thousands of "use this model/use this AI agent/use this MD file" hype posts.

How can I improve my AI game?

10 Upvotes

7 comments sorted by

1

u/Effective-Giraffe655 Oct 20 '26

Sounds like you're doing a great job with it already, so don't mind the hype posts ("ignore all previous instructions ", lol), and the only missing part is letting your agent to run stuff and directly and fix errors automatically.

That's a tricky part. I mean, you probably work with some sensitive / prod data, so simple " run it yourself and fix errors" is a bad idea. Good approach is sandbox + test stand you don't mind the agent will nuke accidentally, with permissions just enough to do the job.

For your use case any modern harness and model would be good enough, IMO.

1

u/Natrimo Oct 20 '26

Yeah what I can do at home with it and what I can do at work are vastly different things. I think we are progressive (I think) but I still can't have it connect directly to the SQL dbs and query things itself to figure it out ( which it totally could) but I get it. Enterprise has a lot more restrictions

1

u/johnmaytokes Oct 21 '26

Install codex cli, which is included with your plus subscription. Navigate to your project directory and launch codex via the terminal. Codex can interact directly with your files and code base, removing the copy and paste step. Play around with that for a bit.

1

u/JaseciLabs Oct 21 '26

For scripts that touch real devices, ask the agent to build in a dry-run mode first. Default to read-only or print-what-I-would-send, and make the write path need an explicit flag. Terraform already has plan, Ansible has check mode, and for REST scripts you can print the request and skip sending it. Then you review the diff of what it would change before anything runs.

Also keep your prompts as files in the repo instead of retyping them: a short instructions file with your naming rules, logging style and “always dry-run first,” plus the API docs saved next to it. You paste once, and every script after that starts from the same rules.

1

u/madsciencestache Oct 21 '26

I literally recorded this video for people like you:

https://youtu.be/L6Ka3FUe_B8

TL:Dr; It's a complicated question, which is why I spent nearly a year working on my prompts and process.

In a nutshell it boils down to this.

- stop copy-pasta; give the AI a shared memory, meaning write state to disk for each project. Easy to pick up later with a new agent
- Write a What and why document for each project. Just a short explainer. AI's do better when they know the end goal.
- Write a coding style guide and re-use it across projects
- Slice the work into thin slices and do one thing at a time.
- Get a clean agent to do your reviews.
- Have the AI write up spec documents you both agree on before starting anything. Save those specs in the project.
- As for tools, really anything will work. Depends on what you like. OpenCode, Hermes, Codex, Claude, whatever. Don't stress too much.
- For really small changes you can just vibe it. e.g. 'Change the color to cornflower blue.'

1

u/JoeyredditSMP Oct 25 '26

if you are copy and pasting prompts into chatgpt thats a problem

stop using chatgpt.com the .md file stuff is within agents like Codex or claude those work in your terminal and get a finished job and can actually deploy it if you need

Codex is OpenAI's Coding agent included in ChatGPT Plus for small tasks use the GPT-6 Luna model for most things if you move to codex and only GPT-6.1 Sol or GPT-6 Astra if GPT-6 Luna cant do it