> ## Documentation Index
> Fetch the complete documentation index at: https://docs.praxis-ai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Code & Development

> Write, explain, debug, optimize, and document code in virtually any programming language — and generate SVG icons from a description.

Pria is a capable coding partner. Ask it to write a function, explain an error, translate between languages, or document an existing snippet, and it returns syntax-highlighted code you can copy straight into your editor. Because the model takes plain-language prompts, the more context you give, the more precise the result.

## What You Can Ask For

* **Write code** — a function, component, script, or small program in almost any language.
* **Explain code** — how a concept, function, or snippet works, at the level of detail you want.
* **Debug & fix** — paste a broken snippet and the error, and ask Pria to find and fix the problem.
* **Optimize & refactor** — improve readability or performance of code you provide.
* **Translate** — convert a snippet from one language to another.
* **Document & test** — generate comments, usage docs, or test cases for your code.

## Ask in Chat

Be specific about the language, the goal, and any constraints.

```text Prompt wrap icon="comment" theme={null}
Write a Python function that reads a CSV and returns the column averages. Handle missing values.
```

```text Prompt wrap icon="comment" theme={null}
Why does this throw "Cannot read property 'map' of undefined"? Fix it:
<paste your snippet>
```

<Tip>
  Specificity is everything. "Optimize the following SQL query for a table with 10M rows" beats "make this faster." Mention the language, the runtime, the data shape, and what "good" looks like.
</Tip>

### Handy prompt patterns

```text Prompt wrap icon="comment" theme={null}
Explain how {concept} works in {language}.
```

```text Prompt wrap icon="comment" theme={null}
Convert the following {language A} code to {language B}: {snippet}
```

```text Prompt wrap icon="comment" theme={null}
Add a comment to each line of this code and list any vulnerabilities: {snippet}
```

```text Prompt wrap icon="comment" theme={null}
Write test cases for this feature: {describe the feature}
```

## Generate SVG Icons

Pria can produce SVG icon markup from a written description — useful for quick UI glyphs you can paste straight into a project.

```text Prompt wrap icon="comment" theme={null}
Generate an SVG icon with viewBox "0 0 24 24" meaning "expand horizontally":
a left chevron, an outlined rectangle in the center, and a right chevron, evenly
spaced with no overlap. Use a stroke width of 1.
```

## What You Get Back

Code comes back in syntax-highlighted blocks with a one-click copy button, usually followed by a short explanation and any caveats (rate limits, edge cases, dependencies). Ask follow-ups in the same conversation to iterate — Pria keeps the context of what it just wrote.

## Tips & Limits

* Pria **writes and explains** code; it does not run or execute it for you. Test generated code in your own environment.
* Always review generated code before using it in production — check for security issues, error handling, and correctness against your actual data.
* For multi-file or larger projects, work iteratively: scaffold first, then refine one piece at a time.

## Related

* [Best Practices](/mdx/user-guide/best-practices) — writing prompts that get precise results
* [Content Creation](/mdx/user-guide/capabilities/content-creation) — generate technical docs alongside your code
