oh-my-cli-autonomous-code-agent

Runs an autonomous code agent with file tools, shell execution, and session persistence.

4|Updated May 16, 2026
One-click install
npx skills add https://github.com/reason-machines/devtools-skills --skill oh-my-cli-autonomous-code-agent-reason-machines
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: oh-my-cli-autonomous-code-agent
Source: https://github.com/reason-machines/devtools-skills/tree/main/skills/oh-my-cli-autonomous-code-agent
Command: npx skills add https://github.com/reason-machines/devtools-skills --skill oh-my-cli-autonomous-code-agent-reason-machines

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running multi-turn coding tasks with an LLM agent often loses context, lacks safety controls, and makes it hard to recover from bad changes. This Skill operates oh-my-cli, a CLI code agent that reads and writes files, executes shell commands, and manages sessions with approval gates, undo/redo checkpoints, and context compaction. ## Core Features & Use Cases - Autonomous Coding with Safety Gates: The agent uses file and shell tools with approval gates for mutations, plus atomic per-turn checkpoints so changes can be previewed, undone, or redone. - Session Persistence and Compaction: Sessions are stored as JSONL transcripts that can be resumed, browsed, exported to Markdown, and compacted when they approach provider context limits. - Multi-Profile Model Configuration: Switch between hosted and local OpenAI-compatible models via profiles in a user settings file that references API keys through environment variables instead of storing raw credentials. - Use Case: Ask the agent to refactor a module, preview the undo plan with a dry run if the result is wrong, then export the session transcript for a teammate to review exactly what the agent changed. ## Quick Start Use oh-my-cli to start an autonomous code agent session that refactors the auth module in this project, and show me how to undo the turn if the changes are wrong.

Frequently Asked Questions about oh-my-cli-autonomous-code-agent

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run an autonomous code agent from the command line?▼

Install oh-my-cli with npm, configure an OpenAI-compatible model via environment variables or ~/.oh-my-cli/settings.json, then run oh-my-cli -p followed by your task in quotes. The agent reads and writes files and runs shell commands with approval gates.

How to undo changes made by an AI coding agent?▼

Use oh-my-cli --undo-turn with the session ID to restore files modified in the latest turn and trim the transcript. Run it with --dry-run first to preview the plan, and use --redo-turn to reapply an undone turn.

Can I use oh-my-cli with local models like Ollama?▼

Yes, oh-my-cli works with any OpenAI-compatible endpoint, including local servers such as Ollama at http://127.0.0.1:11434/v1. Define a profile in the settings file with the local baseUrl and model name, then select it with --profile.

What happens when an agent session exceeds the context limit?▼

Long sessions can be compacted with oh-my-cli --compact, which writes a sidecar file preserving task state without modifying the transcript. You can also set --compact-threshold or OMC_COMPACT_THRESHOLD so compaction happens automatically during a run.

Why does oh-my-cli undo fail with a file diverged error?▼

Undo fails closed when a turn-owned file was modified after the checkpoint was created, to prevent data loss. It exits with status 2 and changes nothing; you must manually review and resolve the conflict before retrying.