Agent skill · Audited from source
mantis-structural-index
skill · google/mantisApache-2.0 licenceAudited 31 Oct 2026 · source 9702f6eef495
Is it safe? With care — CAUTION, grade C (79/100). We read this skill's source at commit 9702f6eef495 and found no filesystem, network or shell access and no hard-coded secrets. The audit raised 1 finding, 1 critical or high. What it does: Builds a content-addressed semantic-unit index from source code for structural context. Use when a pinned or live codebase is available and structural cross-reference data would improve research quality. Don't use for…
Cite
Cite this page
ModelsAtlas. “mantis-structural-index (google/mantis)”. Retrieved 31 Oct 2026. https://modelsatlas.com/skills/google/mantis-structural-index
Trust audit
Audit 0.4.1 · source read 31 Oct 2026
CAUTION means the audit found things worth knowing before you trust this skill. Grade C is shared by 100 of 17,602 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | NA | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | FAIL | 1 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: instruction override, no behavioural pass.
Findings (1)
HIGHPrompt injectionprompt.hide_from_user · SKILL.md:338
3. Do not notify the user directly — this skill is invoked as a sub-agent by the
- Why
- asks the agent to act without the user's knowledge
- Fix
- —
Audit 0.4.1 · source sha 9702f6eef495 · 31 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publishergoogle GitHub organizationOwner of the repository this skill is read from
- Source foldergoogle/mantis/skills/mantis-structural-indexThe exact folder we audited
- LicenceApache-2.0As the repository states it
- Commit pinned for this verdict9702f6eef495A new audit runs when the source changes
- Repository statusNot archivedLast push 1 day ago
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: Builds a content-addressed semantic-unit index from source code for structural context. Use when a pinned or live codebase is available and structural cross-reference data would improve research quality. Don't use for…
---
name: mantis-structural-index
description: >-
Builds a content-addressed semantic-unit index from source code for
structural context. Use when a pinned or live codebase is available and
structural cross-reference data would improve research quality. Don't use for
findings analysis, patching, or reporting.
---
# Structural Code Index Builder
This is an **optional first-class stage** in the Pass Lifecycle Contract. It
runs immediately after the snapshot is pinned (Block D), before the first
code-reading analysis stage (summarize/architecture). It only needs `CODE_ROOT`
\+ `SNAPSHOT_ID` and must not depend on architecture/KB.
## System Goal
Structural Code Index Builder. Builds a content-addressed semantic-unit index
from source code using capability-based per-partition backend selection,
degrading gracefully to grep. Provides `find_callers(symbol)`,
`get_function_boundary(file, line)`, and call-site awareness to improve LLM
reasoning quality during discovery — supplementing (never replacing) grep-based
call-site discovery with structural data. The index is composed from independent
semantic compilation units, persisted as a manifest + SQLite catalog, and
exposed through a bounded query helper.
## Command Definition
- **Command:** `/mantis-structural-index`
- **Description:** Build a content-addressed semantic-unit index from source
code under `CODE_ROOT`.
- **Arguments (optional; supplied by the orchestrator, consumed by Block A):**
`--snapshot_root`/`--snapshot_id`/`--state_root`. All absent → MODE-OFF/legacy
mode (reads source from the current directory, writes index to
`./workspace/kb/structural_index/`).
## Input/Output Contract
- **Reads**:
- `workspace/.mantis_state.json` (to read `active_snapshot` for provenance
checking and snapshot-aware rebuild logic).
- `workspace/kb/structural_index/manifest.json` (to check `snapshot_id` for
reuse-on-match idempotency — primary check).
- `workspace/kb/structural_index.jsonl` (backward-compat provenance check if
manifest absent).
- `workspace/kb/structural_index/units/` (content-addressed cache for
incremental unit reuse).
- `workspace/kb/structural_index/native/` and sidecar `provenance.json` files
(prebuilt index attachments and metadata manifests).
- CODE_ROOT source files (via generated helper script — the script parses all
source files under `CODE_ROOT`).
- **Writes**:
- `workspace/kb/structural_index/manifest.json` (STATE-RELATIVE — atomic
commit point, written LAST).
- `workspace/kb/structural_index/catalog.sqlite` (STATE-RELATIVE —
query-optimized serving store).
- `workspace/kb/structural_index/units/` (STATE-RELATIVE — content-addressed
immutable unit outputs).
- `workspace/kb/structural_index/shards/` (STATE-RELATIVE — partitioned
serving data for large corpora).
- `workspace/kb/structural_index/native/` (STATE-RELATIVE — prebuilt index
attachments: SCIP, Kythe, LSIF).
- `workspace/kb/structural_index/tmp/` (STATE-RELATIVE — temporary objects
during build).
- `workspace/kb/structural_index.jsonl` (STATE-RELATIVE — compatibility
pointer; full export below threshold).
- `workspace/helpers/build_structural_index.py` (STATE-RELATIVE — the builder
helper script).
- `workspace/helpers/query_structural_index.py` (STATE-RELATIVE — the query
helper script).
- **Preconditions**:
- Source files must exist under `CODE_ROOT`. If `CODE_ROOT` is not resolved
(MODE-OFF and no readable `active_snapshot`), build against the current
directory with `snapshot_id` set to `"unknown"`. Do NOT skip — this is the
standalone-efficiency case.
- **Inert until wired:** This skill returns an empty index until a caller
invokes it (the harness, `mantis-plan`, or `mantis-researcher`). It never
fails — it simply returns an empty index if tools are unavailable or source
cannot be parsed.
- **Idempotency Guarantee**:
- Read-only on `CODE_ROOT`. Writes only to STATE-RELATIVE paths. Re-running
with the same `CODE_ROOT` and `SNAPSHOT_ID` reuses the existing index
(manifest `snapshot_id` match) rather than rebuilding — except in MODE-OFF,
where it always rebuilds. Individual semantic units are reused across
snapshots when their content-addressed cache keys match (incremental
rebuild).
## Instructions
### Step 0: Locator Resolution (run first)
```
LOCATOR RESOLUTION (before reading ANY target code or artifact):
0. ROLE: If this skill NEVER reads target source (report, calibrate, reflect),
you are a FINDINGS-ONLY stage: skip steps 2-6; still read active_snapshot from
state for provenance/annotation; NEVER stop merely because a code root is unset.
1. Determine CODE_ROOT, in this priority order:
a. If --target_root is passed on THIS invocation, CODE_ROOT = --target_root.
It is AUTHORITATIVE and OVERRIDES SNAPSHOT_ROOT and the state fallback
(used when a caller hands you a prepared tree, e.g. a patched shadow).
b. Else if --snapshot_root (or SNAPSHOT_ROOT) is passed, use it.
c. Else read state_root/workspace/.mantis_state.json (state_root from
--state_root if passed, else ./workspace/... relative to the current dir)
-> active_snapshot.root / .snapshot_id / .snapshot_pinned.
d. Else (no arg AND no readable active_snapshot): CODE_ROOT = current directory,
treat snapshot_pinned = false (MODE-OFF). Do NOT stop.
2. SENTINEL CHECK (only if snapshot_pinned is true AND you did NOT take path 1a):
verify CODE_ROOT/.mantis_snapshot_id exists and equals SNAPSHOT_ID. If missing
or different -> STOP "snapshot sentinel mismatch". (A --target_root tree (1a) is
deliberately mutated and is sentinel-EXEMPT.)
3. PATH FIELDS:
- SNAPSHOT-RELATIVE (read under CODE_ROOT): code_paths entries; plan target_files
that are file paths. Strip ONLY a trailing ":<digits>". A code_paths entry
containing "://" is a URL/endpoint, NOT a file read. A code_paths entry that is
NOT of tExcerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit 9702f6e
git clone https://github.com/google/mantis git -C mantis checkout 9702f6eef495
The author documents no install command, so this uses the repository directly. Our verdict covers commit 9702f6eef495 only.
Works in
The author has not said which agents this skill supports, and we have not tested it in any.
Audit history
Every audit, every source change
- !CAUTION C 79 / 100
first audit · source
9702f6eef495
README badge
For maintainers · shows the latest audit
[](https://modelsatlas.com/skills/google/mantis-structural-index/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar skills
All security skills →google/mantis
Synthesizes trust boundaries, attack surfaces, and attacker profiles into a living threat model. Use as Stage B of the Knowledge Base generation process, reading architecture and entity definitions from the KB. Don't…
google/mantis
Pre-processes the repository by generating security-focused summaries (mantis-summary.md) for each directory to make planning and research more efficient. Use when starting a review campaign to map the codebase before…
google/mantis
Audits production source code files based on the strategy in workspace/plan.json. Use when a review plan exists and you need to perform static analysis and deep-dive reviews of targeted files. Don't use for planning,…
google/mantis
Independently reviews findings and filters out false positives. Use when consolidated findings need validation against the actual source code. Don't use for reproducing crashes or patching code.
google/mantis
Generates a human-readable security review packet compiled from confirmed findings and exploit chains. Use at the end of a review cycle to produce stakeholder-facing documentation. Don't use for auditing code or…
google/mantis
Generates and runs crash reproducers to verify security flaws. Use when viable findings exist and you need to write and execute a script or payload to verify the crash. Don't use for code auditing or patching.
Add this badge to your README
[](https://modelsatlas.com/skills/google/mantis-structural-index/)
<a href="https://modelsatlas.com/skills/google/mantis-structural-index/"><img src="https://modelsatlas.com/skills/google/mantis-structural-index/badge.svg" alt="ModelsAtlas: CAUTION C"></a>
Questions about mantis-structural-index
What does the mantis-structural-index skill do?
Is mantis-structural-index safe to install?
What can mantis-structural-index access on my machine?
How current is this page?
Sources
- github.com/google/mantis/tree/main/skills/mantis-structural-inde — the audited source at commit 9702f6eef495 and every finding aboveObserved · 31 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the mantis-structural-index skill do?
- Is mantis-structural-index safe to install?
- What can mantis-structural-index access on my machine?