---
name: code
description: 'Source-code structure and analysis -- symbol outlines across 140+ languages. Tools: symbol-outline. Use when a request needs any of these; each tool''s own trigger is in SKILL.md.'
compatibility: 'Requires fragletc and Docker. Hermetic: no network access.'
metadata:
  tags: engineering
  tools: symbol-outline.py
---

# Code

Source-code structure and analysis -- symbol outlines across 140+ languages.

Every tool below is one executable file beside this `SKILL.md`, in the directory the commands below call `<skill-dir>`. Run it directly. Two host requirements: [`fragletc`](https://github.com/ofthemachine/fraglet) (`curl -fsSL https://raw.githubusercontent.com/ofthemachine/fraglet/main/install.sh | sh && fragletc version`) and Docker; the image, parameters, outputs and network reach are declared in the file itself. Before running a tool, print its contract:

```sh
<skill-dir>/symbol-outline.py --fraglet-help
```

Parameters are passed as `-p name=value` (a `file` parameter takes a host path); declared outputs are copied out with `--output <name>[=<host path>]`. A missing required parameter fails host-side with exit 2 before any container starts; otherwise the tool's own exit code is the run's. A declared output not named with `--output` is produced and discarded (a stderr note says what you could have copied). Add `--receipt run.json` (or set `FRAGLETC_RECEIPT_DIR`) to record the run: the receipt carries the tool's `procedure_hash`, image digest, parameters, and every input and output by content hash, and `receipt/attest.py` can verify it later without re-running anything.

## Tools

### `symbol-outline.py`

Extract compact hierarchical polyglot symbol outlines (classes, interfaces, functions, methods, structs) from source code across 140+ languages using Universal Ctags, omitting implementation bodies for up to 95% token savings.

Use when the user wants the structure of a source file or codebase (classes, functions, signatures) without reading whole files, or before planning edits across large files.

```sh
<skill-dir>/symbol-outline.py -p code_source="<code_source>" [-p file_path="<file_path>"] [-p file_ext="<file_ext>"] [-p language="<language>"]
```

Parameters:
- `code_source` (file, required) — Source file mounted at /input/code_source
- `file_path` (string, optional) — Original host path, used only for its extension (e.g. pkg/x.go)
- `file_ext` (string, optional) — Explicit extension override (py, .go, rs)
- `language` (string, optional) — ctags language name for --language-force, or a short extension

Outputs:
- stdout

Runs in `ofthemachine/python3@sha256:a015b4f9f0e7c1648f8fcd4164f6a296dd3c9189404f88f333a9764d08d13522`; hermetic — `network=none`; a run is a pure function of its inputs and safe to memoize.
