> ## Documentation Index
> Fetch the complete documentation index at: https://arka-agent-mintlify-f21cea86.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Surgical editing

> Search before editing and refuse ambiguous changes.

Search before editing and refuse ambiguous changes:

```bash theme={null}
arka surgical-edit find src/app.py "target function"
arka surgical-edit edit src/app.py "old text" "new text" --yes
arka surgical-edit edit src/app.py "old text" "new text" --all --yes
```

Arka prints matching lines first, requires a unique match by default, creates a
`.bak` backup, and makes no change when the keyword is missing or ambiguous.
Natural language requests are supported when the file and old/new text are
quoted clearly.


## Related topics

- [Skills catalog: 70+ built-in Arka commands](/guides/skills.md)
- [How to code with Arka](/guides/code-with-arka.md)
- [How Arka compares to other agents](/concepts/comparison.md)
- [Inspect and remove text](/guides/text-edit.md)
- [OpenTelemetry tracing and SigNoz observability](/guides/observability.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.