Build Ansible with Cursor and keep lessons in CLAUDE.md

They used Cursor and Claude to write most Ansible code, while saving lessons and plans to files so the work could continue after compaction.

Done with CursorClaudeClaude Code· Intermediate· Nov 2026

What they did
At a previous job, they paired Cursor with Claude for almost all of the Ansible work, drawing on prior Puppet and Chef experience. Each new lesson was appended to CLAUDE.md automatically, and before every move Claude also saved its findings and next steps to local files so it could pick back up after compaction. For a nonprofit website, they used a similar file-based flow with TODO.md, CHANGELOG.md, branches, pull requests, and a context-free subagent that reviewed each pass.
How it went
They describe the finished work as a clear upgrade from the old setup. Security Actions and axe checks stopped bad builds from going out, but they still reviewed every change themselves and did not trust the tools enough to relax that control yet.
Tips
Keep the number of review cycles limited and aim for fewer fixes on each pass, or PRs can drift instead of finishing. Save out-of-scope discoveries as new todos so the agent stays focused.

Try it yourself with Cursor

Help me automate [Ansible task] in [repo or environment]. First, create or update a CLAUDE.md file with the key conventions and any lessons you learn as you work. Keep a running plan in [plans/file.md] and refresh it whenever the context changes, so the work can resume cleanly after compaction. If you find unrelated issues, record them in [todo file] and keep going on the main task. Run in check mode when possible, and pause to ask for my approval before any step that would change live systems, send anything, delete files, or apply changes for real.

Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.

Get 3 agent uses like this every morning

With the day's top AI news. Free, and one click to unsubscribe.