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.
- 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.
Related agent uses
Tighten homelab access without locking yourself out
One person used Claude Opus to harden a homelab, but it cut off its own access and stopped; OpenAI’s Sol then completed the changes.
Share files between sandboxed Claude Code agents through MCP
A developer connected sandboxed Claude Code instances to a virtual file system so they could pass files through MCP without direct access to AWS.
Use Claude Code to refactor a monorepo in phases
A developer used Claude Code to swap tooling, reorganize features, and refresh a site by checking each step in a tight validation loop.
Review a pull request with staged sub-agents
Use parallel checks and a validation pass to review a branch or PR before you decide what to fix.
Keep many coding agents moving with local context cache
A developer ran several Claude Code sessions at once on local RTX 3090 hardware and avoided reloading long contexts after idle periods.
Run work coding and support tasks through agents
A consultant uses Claude, Codex, and a custom containerized harness to handle client software work and a personal assistant project.