code-agent

An autonomous coding agent that explores a project, plans a change, edits files, runs checks, and iterates toward a working result. It is designed for tasks involving code rather than only short scripts or data analysis.

In plain words
What is it for?
Use it for bug fixes, feature work, refactoring, test suites, and other projects where the agent needs to understand existing code and verify its changes.
Why use it?
It reduces the need to manually coordinate repository exploration, implementation, testing, and follow-up fixes for multi-file coding tasks.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/aws-samples/sample-strands-agent-with-agentcore/code-agent
Any agent
npx skills add aws-samples/sample-strands-agent-with-agentcore --skill code-agent
Clone the repo
git clone --depth 1 https://github.com/aws-samples/sample-strands-agent-with-agentcore

Made for: Claude Code, Codex.

Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,639 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00047 $0.02639
Opus 5 $0.00023 $0.01319
Sonnet 5 $0.00009 $0.00528
Haiku 4.5 $0.00005 $0.00264

Measured 2d ago against content hash aac490e1d2bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-agent scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

chatbot-app/agentcore/skills/code-agent/SKILL.md · 244 lines

How it starts

The opening of the file, as written. The whole thing — 244 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Code Agent

An autonomous coding agent. It doesn't just write code on demand — it thinks through problems, forms its own plan, reads the existing codebase to understand context, implements solutions iteratively, and verifies they work before finishing.

Given a goal, it will:

  • Explore the workspace to understand what's already there
  • Break the task into steps and track them with a todo list
  • Implement, run, and iterate until the outcome is correct
  • Ask only when it hits a real decision point, not for every micro-step

Brief it like you'd brief a capable engineer: describe what you want to achieve, not how to do it.

Code Agent vs Code Interpreter

Code Agent Code Interpreter
Nature Autonomous agent (Claude Code) Sandboxed execution environment
Best for Multi-file projects, refactoring, test suites Quick scripts, data analysis, prototyping
File persistence All files auto-synced to S3, accessible via workspace tools Files in /mnt/workspace persist across interpreter restarts
Session state Files + conversation persist across sessions Variables persist within one interpreter session; workspace files persist for the chat session
Autonomy Plans, writes, runs, and iterates independently You write the code it executes
Use when You need an engineer to solve a problem end-to-end You need to run a specific piece of code

Execution Environment

The code agent runs in an isolated container dedicated solely to this session. Its filesystem, running processes, and local ports are completely separate from your own environment — do not attempt to access its paths or local servers via browser or other tools.

User-uploaded session files are synchronized from the canonical Workspace inputs/ prefix before every Code Agent task and are available under inputs/<filename>. Treat inputs/ as read-only; generated files belong elsewhere in the Code Agent workspace.

Every code_agent call must include workspace_paths. Pass the exact inputs/<filename> paths required by the task, or [] when the task does not use session attachments. The task fails before execution if a required file is not synchronized; do not ask the Code Agent to reconstruct a missing source.

Read the full file on GitHub · 244 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 244 lines · 47 tokens per session scan A aac490e1d2bf

Subscribe to this mod's changes

code-agent is a skill published in the GitHub repository aws-samples/sample-strands-agent-with-agentcore (191 stars, last pushed 6d ago), licensed MIT. It adds 47 tokens to every session and 2,639 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.