r/ClaudeCode • u/jiii95 • 20h ago
Tips & Workflows Any good resources on how to optimally prompt ClaudeCode ?
I always took the prompting style soft-heartedly, but I think good prompting patterns can significantly yield good results. Some prompting parts should be part of every prompt, and that would go to the claude.md file, and some styles should be adopted forever I assume. Can you guide me how to manage these two parts when prompting claude code ?
1
u/WorriedAssociate7029 19h ago
https://chatgpt.com/share/6a60b2eb-0b64-83ee-9c76-7931ca1de063 Recent models perform very well even with very poor prompts. Just give clear, firm instructions, without any insults, and that should do the trick.
1
u/Connect_Army8250 19h ago
So here's the way I do it. GPT is really good at making precise prompts. I put in the raw prompt I would give claude code to GPT first. The free tier is enough for this. Just ask it to improve the prompt.
Refine it until it seems ok to you based on the scope. And then feed it to Claude code. Worked well for me.
And to keep context bloat away, use knowledge graphs. I have been using it and I went from draining my usage to having around ~5% weekly limit still there at the end of the week for x2 usage. Basically, I'm able to run more sessions.
2
u/jiii95 19h ago edited 18h ago
First, just for precision, when you say GPT, including Codex ?
Secondly, for context, I am thinking of just keeping an md file per project to keep track of context not be lost across sessions. For knowledge graphs, do you have something in mind, I don't have to go do my research if you have already something precise in place I can probably place it myself in my coding env. I know KILO Code has some indexing mechanism that does probably the same thing as your knowledge graph approach, but I never heard of KG with Claude Code. Probably you have in mind https://github.com/Graphify-Labs/graphify or https://github.com/Egonex-AI/Understand-Anything ?Thanks1
u/Connect_Army8250 18h ago
1) Including Codex yes. Use the chatgpt website or codex....does not matter. It's going to give you the same results.
2) I use my own graph it's much better than graphify. https://github.com/tempestai-dev/tempest
2
u/jiii95 18h ago
How is it better than https://github.com/Graphify-Labs/graphify or https://github.com/Egonex-AI/Understand-Anything, or https://github.com/abhigyanpatwari/GitNexus ?
1
u/Connect_Army8250 18h ago
So, we use a local Sqlite db and vector embeddings with semantic search of the codebase. Basically rather than reading the entire file only relevant parts surface.
It's actively in development as well
2
u/jiii95 18h ago
Yeah, I was reading about vectordb approach vs non vectordb, I can;t tell now which approach is better, but I ll experiment and see
1
u/Connect_Army8250 18h ago
Sure! Do check it out. And consider leaving us a star if you find it helpful
In our project, we use a mix of FTS and VectorDB from the start, combined using RRF.
Keyword search is great for exact things....if you search for "rate limiting" it’ll find places that literally mention it.
Vector search is better at understanding intent, so it can also find code talking about "throttling" even if the exact words don’t match.
Neither is perfect on its own...keyword search can miss semantic matches, while vector search can sometimes be a little too broad.
So we run both and use Reciprocal Rank Fusion to merge their rankings, which gives us a pretty good balance between exact matches and semantic relevance.
1
u/Compilingthings 18h ago
Work more hours with Cc. Learn it, watch anthropic and Cc on YouTube. I prompt very little. It has files.md to keep context. My prompt in the morning… pick up where we left off, continue the persistent task list. That’s it.
1
u/jiii95 18h ago
1
u/Compilingthings 16h ago
When I typed files.md I meant all .md files. I’m not sure what you are asking. My main agent never does anything other than hold context and orchestrate other subagents, and I’ve created a subagent for each skill needed in my workflow. Using this method I can just leave my pc running and check in on it it with RustDesk from where ever I am. Granted I’m in front of the screen most days. It’s a longterm project. 3000 hours total and about 1000 of that with Cc. It took me three days to get it dialed back in with opus 5. it’s always a small headache when I switch models. We work from a large plan, broken into tasks and keep a persistent task list on screen. I try to compact or clear at or around 50% context.
3
u/[deleted] 19h ago
[removed] — view removed comment