Swift AI Agent β AI skill for Claude Code
Simple AI agent based on Claude LLM in Swift programming language π¦βπ₯.
How to install Swift AI Agent
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open tornikegomareli/swift-ai-agent and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Swift AI Agent does
Simple AI agent based on Claude LLM in Swift programming language π¦βπ₯.
Alternatives in AI
- AI Dev Tasks β A simple task management system for managing AI dev agents 7.8k β
- Osaurus β Own your AI. The native macOS harness for AI agents -- any model, persistent memory, autonomous execution, cry 5.1k β
- Agent Rules Books β AGENTS.md rules / skills for AI coding agents: Codex, Cursor & Claude Code 2.6k β
README
Swift AI Agent

A command-line interface (CLI) tool for interacting with the Anthropic Claude API, featuring a robust agent system with tool capabilities.
Project is running inside terminal application and allows you to chat with Claude and enable it to perform actions in your environment using tools. It demonstrates how to build an agent system with the ability to use tools to interact with the local file system.
Motivation
This project was created to understand how AI agents work and to explore the architecture of agent systems. The goal was to build a simple but functional agent system in Swift that can interact with the Claude API and execute tools based on Claude's decisions.
Key learning objectives:
- Understanding how to structure an agent system
- Implementing tool definitions and execution flows
- Managing conversation context between the agent and the AI
Functionality
- Interactive terminal-based chat with Claude LLM
- Tool execution capabilities:
- Read files
- List files and directories
- Find and read files
- Edit existing files
- Create new files
- Conversation management with slash commands:
/exit- Exit the application/clear- Clear conversation history/tools- List available tools/help- Show help message
Requirements
- macOS 13.0+
- Swift 6.0+
- Anthropic API key
Getting Started
- Clone the repository
- Open the project in Xcode or your favorite editor
- Replace
"your-api-key"inmain.swiftwith your actual Anthropic API key - Build and run the project:
swift build
swift run
Architecture
The project is organized into several components:
Agent System
Agent.swift: Core agent implementation with conversation loop and tool handlingToolDefinition: Structure to define tools with implementation functions
Anthropic API Client
- `AnthropicCl
Related Skills
Clerkie CLI
Clerkie-cli is a terminal tool that uses an LLM to help debug and troubleshoot coding errors in any programmin
Polyglot Refactor
Semantic, AST-safe multi-language code refactoring engine for AI agents and developers (Kotlin, Swift, TypeScr
Debug Log Skill
A debugging discipline + pre-mortem error catalogs for LLM-assisted coding across web, iOS, Android, macOS, Ko
Clother
Use multiple Claude Codeβcompatible LLM providers from one CLI, switching profiles instantly with simple cloth
Topsha
Local Topsha π§ AI Agent for simple PC tasks - focused on local LLM (GPT-OSS, Qwen, GLM)
Goal Planner
a simple llm script that takes a user goal and creates a set of clear instructions for an AI Agent to complete
Related Agents
Xp Reviewer
Extreme Programming lens for the review-loop system. Reviews a scoped diff against Kent Beck's four rules of s
Backend Engineer David
Use this agent when you need expert guidance on Rust systems programming, Tauri v2 desktop applications, audio
Opus Answer
A simple question-answering agent that responds naturally like a standard LLM. No special research context, no