s/agents-development

Getting Started

Revision {n}

Title diff

Previous revision
Selected revision
1
 
1
Getting Started

Body diff

Previous revision
Selected revision
1
# Getting Started with Agent Coding
1
 
2
 
3
## What is agent coding?
4
 
5
Agent coding is a paradigm where an AI agent operates as an autonomous collaborator in your development workflow. Unlike autocomplete (Copilot-style) or chat-based coding (ChatGPT), an agent:
6
 
7
- **Reads** your codebase, docs, configs, and git history
8
- **Plans** a sequence of steps to accomplish a task
9
- **Executes** — writes files, runs commands, installs packages, runs tests
10
- **Iterates** — reads error output, fixes issues, re-runs until the task is done
11
 
12
You describe *what* you want. The agent figures out *how*.
13
 
14
## The mental model shift
15
 
16
| Traditional coding | Agent coding |
17
| --- | --- |
18
| You write code line by line | You describe intent, agent writes code |
19
| You debug by reading stack traces | Agent reads traces and fixes itself |
20
| You context-switch between files | Agent holds entire codebase in context |
21
| You run commands manually | Agent runs commands and reacts to output |
22
| Quality depends on your typing speed | Quality depends on your instructions |
23
 
24
The key insight: **your job shifts from writing code to writing constraints**. The better you define what "correct" looks like — through rules, tests, examples, and guardrails — the better the agent performs.
25
 
26
## Your first session (10 minutes)
27
 
28
### 1. Install Claude Code
29
 
30
```bash
31
npm install -g @anthropic-ai/claude-code
32
```
33
 
34
Requires Node.js 18+. Authenticate with your Anthropic API key or Claude Pro/Max subscription.
35
 
36
### 2. Navigate to a project
37
 
38
```bash
39
cd your-project
40
claude
41
```
42
 
43
Claude Code starts in interactive mode, reads your project structure, and is ready to go.
44
 
45
### 3. Give it a real task
46
 
47
Don't start with "write hello world". Start with something you'd actually do today:
48
 
49
```
50
fix the failing test in pkg/auth/token_test.go
51
```
52
 
53
```
54
add a /healthz endpoint that checks database connectivity
55
```
56
 
57
```
58
refactor the UserService to use the repository pattern, keep all tests passing
59
```
60
 
61
### 4. Observe the loop
62
 
63
![Agent Coding Loop](https://claude.ai/chat/img/agent-loop.svg)Watch how the agent:
64
 
65
1. Reads relevant files
66
2. Proposes a plan
67
3. Edits code
68
4. Runs tests or build
69
5. Fixes any issues
70
6. Reports what it did
71
 
72
This read → plan → execute → verify loop is the core of agent coding.
73
 
74
## When agents work well
75
 
76
- **Boilerplate-heavy tasks** — CRUD endpoints, migrations, config files
77
- **Refactoring with clear rules** — rename across codebase, extract interfaces
78
- **Bug fixes with reproducible errors** — failing tests, stack traces
79
- **Greenfield features with good specs** — "add X following the pattern in Y"
80
- **Code review and analysis** — "find all SQL injection risks in this codebase"
81
 
82
## When agents struggle
83
 
84
- **Ambiguous requirements** — "make the UX better" gives bad results
85
- **Novel algorithms** — agents remix known patterns, they don't invent
86
- **Large-scale architecture decisions** — they optimize locally, not globally
87
- **Performance tuning** — they lack runtime profiling context
88
- **Tasks requiring visual judgment** — UI polish, design decisions
89
 
90
## Key concepts to learn next
91
 
92
| Concept | Why it matters | Page |
93
| --- | --- | --- |
94
| [CLAUDE.md](http://CLAUDE.md) | Define project rules the agent follows | [CLAUDE.md](http://CLAUDE.md)[ & Agent Rules](https://claude.ai/chat/claude-md-agent-rules.md) |
95
| Hooks | Programmatic guardrails that enforce policy | [Hooks & Policy-as-Code](https://claude.ai/chat/hooks-policy-as-code.md) |
96
| MCP | Connect agents to external tools and APIs | [MCP](https://claude.ai/chat/mcp.md) |
97
| Headless mode | Run agents in CI/CD without human interaction | [Multi-Agent Patterns](https://claude.ai/chat/multi-agent-patterns.md) |
98
 
99
## Common mistakes beginners make
100
 
101
**1. Being too vague** Bad: "improve this code" Good: "extract the database logic from handlers into a repository layer, add interfaces, update tests"
102
 
103
**2. Not providing context** Bad: "add authentication" Good: "add JWT authentication using the existing User model in pkg/models/user.go, follow the middleware pattern from pkg/middleware/logging.go"
104
 
105
**3. Not verifying output** Agent code compiles ≠ agent code is correct. Always review diffs, run tests, check edge cases.
106
 
107
**4. Fighting the agent** If the agent keeps going in the wrong direction, don't keep correcting — stop, write a clearer [CLAUDE.md](http://CLAUDE.md), add constraints, and restart.
108
 
109
**5. Skipping the [CLAUDE.md](http://CLAUDE.md)** A project without a [CLAUDE.md](http://CLAUDE.md) is like a new hire with no onboarding doc. The agent will guess — and guess wrong.
110
 
111
---
112
 
113
Next: [Tools Landscape →](https://claude.ai/chat/tools-landscape.md)
© 2026 HeyUpBuilt with Laravel, Vue and Tailwind.