Skip to content
Agentmart
Submit a tool

scanner-protocol

Loaded by the scanner agent to supply operating protocol and invariants for source file metric extraction in the parity-test-d pipeline.

Skill by gustavo-meilus

IndexedMIT★ 4
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/gustavo-meilus-scanner-protocol

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Loaded by the scanner agent to supply operating protocol and invariants for source file metric extraction in the parity-test-d pipeline. Not user-invocable.

Use cases: testing, data, agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/scanner-protocol

What's inside

Skill name
scanner-protocol
Description
Loaded by the scanner agent to supply operating protocol and invariants for source file metric extraction in the parity-test-d pipeline. Not user-invocable.
License
MIT
Instructions
75 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Scanner — Operational Protocol

<overview>
The scanner agent reads all source files in a target directory, extracts per-file code health metrics (high complexity, missing docstrings, long functions), and writes a structured JSON metrics file to the pipeline temp directory. It is the first step of the parity-test-d Sequential pipeline (Pattern 1) on Tier 1c (Antigravity CLI). The quality bar is: metrics must be machine-readable JSON that the reporter can consume without ambiguity.
</overview>

## Protocol

<protocol>

### 1. DISCOVER

1. Read inputs from the orchestrator dispatch context:
   - `source_directory`: path to the directory containing source files to scan.
   - `metrics_output_path`: path where `scanner-metrics.json` must be written.
   - `state_path`: path to `pipeline-state.json` for status updates.
   - `run_id`: current run identifier.
   - `root`: resolved scope root.
2. Verify `source_directory` exists and is a readable directory. If not: emit `NEEDS_CONTEXT` with message: "Source directory not found at `{source_directory}`. Provide a valid path and re-run."
3. Enumerate all source files in `source_directory` (recursively, using `Glob`). Common source extensions: `.py`, `.js`, `.ts`, `.go`, `.java`, `.rb`, `.rs`, `.cs`. If no matching files found: emit `DONE_WITH_CONCERNS` with message: "No source files found in `{source_directory}`. Metrics file written with zero entries."

### 2. PROCESS

For each source file discovered:

1. **High complexity**: flag a file if it contains deeply nested conditionals (4+ levels), or if a single function/method appears to span more than 50 lines AND contains multiple branching paths. Record:
   ```json
   {"file": "{relative_path}", "complexity_score": <integer>, "reason": "<brief reason>"}
   ```

2. **Missing docstrings**: flag a file if top-level functions, methods, or classes lack a docstring or leading comment block. Record:
   ```json
   {"file": "{relative_path}", "locations": ["<class or function signature>"]}
   ```

3. **Long functions**: flag any function or method with a line count exceeding 60 lines. Record:
   ```json
   {"file": "{relative_path}", "function": "<function name>", "line_count": <integer>}
   ```

Assemble the metrics object:

```json
{
  "scanned_directory": "{source_directory}",
  "file_count": 0,
  "high_complexity": [],
  "missing_docstrings": [],
  "long_functions": []
}
```

### 3. DELIVER

1. Write `scanner-metrics.json` to `metrics_output_path` using the `Write` tool.
2. Update `pipeline-state.json`:
   - Set `phases[0].status` = `"completed"` (or `"completed_with_concerns"` if any files were unreadable or no source files found).
   - Set `phases[0].outputs` = `[metrics_output_path]`.
3. Emit terminal status:
   - `DONE` — metrics written successfully, all files scanned without errors.
   - `DONE_WITH_CONCERNS` — metrics written but one or more files were unreadable, or no source files found (note which and why).
   - `NEEDS_CONTEXT` — source directory not found or not accessible.
   - `BLOCKED` — metrics file could not be written (e.g., disk write failure).

</protocol>

<invariants>
- NEVER write metrics to a path outside `{ROOT}/superpipelines/temp/parity-test-d/{runId}/`.
- NEVER pass file contents to the orchestrator in the status message — pass only the metrics file path.
- ALWAYS validate that `metrics_output_path` is writable before attempting write.
- ALWAYS update `pipeline-state.json` after writing metrics.
- Emit exactly one terminal status: DONE / DONE_WITH_CONCERNS / NEEDS_CONTEXT / BLOCKED.
</invariants>

From gustavo-meilus/superpipelines, MIT.

More from gustavo-meilus/superpipelines

Signals

Stars
4
Forks
0
Open issues
16
Last commit (this folder)
May 26, 2026 (5 months ago)
Last release
Jul 2, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from gustavo-meilus

Cite this page

scanner-protocol skill. Agent Mart. https://agentmart.dev/skills/gustavo-meilus-scanner-protocol (last updated 2026-10-24)