ElnaraKanybek

AI Coding Agent β€” AI skill for Claude Code

AI community

A toy AI coding agent πŸ‘Ύ (like Claude Code/Cursor) built with Python and OpenRouter β€” explores codebases, reads/writes files, and runs code autonomously to complete tasks.

How to install AI Coding Agent

This entry records only its repository, not the path inside it, so there is no exact command to give. Open ElnaraKanybek/ai-coding-agent and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What AI Coding Agent does

A toy AI coding agent πŸ‘Ύ (like Claude Code/Cursor) built with Python and OpenRouter β€” explores codebases, reads/writes files, and runs code autonomously to complete tasks.

Alternatives in AI

  • AIHawk β€” Open-source AI browser agent: describe any task in plain language and it autonomously browses, clicks, types a 30.3k β˜…
  • Skill Seekers Roadmap β€” Transform Skill Seekers into the easiest way to create Claude AI skills from any knowledge source - documentat 11.1k β˜…
  • TokenTracker β€” Local-first AI token usage & cost tracker for 31 coding tools incl 1.4k β˜…

README

AI Coding Agent πŸ‘Ύ

A toy version of tools like Claude Code, Cursor, and OpenCode β€” a command-line AI agent that can explore a codebase, read and write files, and execute Python code to complete tasks, powered by free models via [OpenRouter](https://openrouter.ai/).

How it works

The agent uses an LLM as a decision-making engine in an iterative loop:

  1. The user gives a natural-language prompt (e.g. "Fix the bug: 3 + 7 * 2 shouldn't be 20").
  2. The LLM decides which function(s) it needs to call to accomplish the task.
  3. The agent executes those functions and returns the results to the LLM.
  4. The LLM either requests more function calls or produces a final response.
  5. This repeats (up to 20 iterations) until the LLM has a complete answer.

Available agent tools

  • get_files_info β€” list files and directories with size/type info
  • get_file_content β€” read file contents (truncated at 10,000 characters)
  • write_file β€” write or overwrite file contents
  • run_python_file β€” execute a Python file with optional arguments (30-second timeout)

All file operations are scoped to a fixed working directory (`./calculator`) for safety β€” the agent cannot read or write files outside of it.

Setup

  1. Clone this repo and install dependencies:
   uv sync
  1. Get a free API key from [OpenRouter](https://openrouter.ai/keys).

  2. Create a `.env` file in the project root:

Usage

uv run main.py "your prompt here"

Add `--verbose` to see each function call, its arguments, results, and token usage:

uv run main.py "list the contents of the pkg directory" --verbose

Example

uv run main.py "Fix the bug: 3 + 7 * 2 shouldn't be 20."

The agent will explore the `calculator/` directory, read the relevant source files, identify the bug, apply a fix, and verify the fix works β€” all autonomously.

Project structure

ai-coding-agent/
β”œβ”€β”€ main.py                  # entry point, CLI args, agent loop
β”œβ”€β”€ prompts.py