# Julia Toml

> Parse and write TOML in Julia using the TOML standard library (TOML.jl), including parse/tryparse APIs, ParserError handling, Parser reuse, and TOML.print serialization options. Use this skill when reading or generating TOML config files such as Project.toml, Manifest snippets, or other TOML-based settings.

- **Type:** Skill
- **Install:** `agentstack add skill-krastanov-juliallmagentskills-julia-toml`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Krastanov](https://agentstack.voostack.com/s/krastanov)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Unlicense
- **Upstream author:** [Krastanov](https://github.com/Krastanov)
- **Source:** https://github.com/Krastanov/JuliaLLMAgentSkills/tree/master/julia-toml

## Install

```sh
agentstack add skill-krastanov-juliallmagentskills-julia-toml
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Julia TOML

Use `TOML` stdlib APIs to parse TOML safely and serialize Julia data back to TOML.

## Parse TOML

Use throwing APIs when malformed TOML should fail fast:

```julia
using TOML
cfg = TOML.parse(text)
cfg2 = TOML.parsefile("config.toml")
```

Use non-throwing APIs when parse errors should be handled explicitly:

```julia
res = TOML.tryparse(text)
if res isa TOML.ParserError
    # handle parser error
end
```

For high-volume parsing of many small TOML files, reuse `TOML.Parser()` to reduce allocations.

## Handle Parse Errors

`TOML.ParserError` includes useful fields for diagnostics:
- `pos` for failing byte position.
- `table` for partially parsed data.
- `type` for parser error category.

When errors need user-facing feedback, report file path + position + nearby source.

## Write TOML

Use `TOML.print` for serialization:

```julia
TOML.print(io, data)
```

Control key ordering when needed:

```julia
TOML.print(io, data; sorted=true, by=length)
```

For custom structs, pass `to_toml` converter that maps unsupported values to supported TOML types.

## Type Constraints to Remember

`TOML.print` supports values that map to TOML primitives/tables, including dict-like tables, integers/floats, booleans, and `Dates.Date`, `Dates.Time`, `Dates.DateTime` (subject to TOML stdlib conversion constraints).

## Reference

- `references/toml-api-patterns.md` - parse/tryparse/print API behavior and examples

## Related Skills

- `julia-package-dev` - package workflows using TOML files
- `julia-yaml` - analogous workflow for YAML serialization

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Krastanov](https://github.com/Krastanov)
- **Source:** [Krastanov/JuliaLLMAgentSkills](https://github.com/Krastanov/JuliaLLMAgentSkills)
- **License:** Unlicense

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-krastanov-juliallmagentskills-julia-toml
- Seller: https://agentstack.voostack.com/s/krastanov
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
