Skip to content
Back to skills

Templates

ASecurity

4-step AST-first code discovery runbook using MicroIndex MCP (search_code and get_code_chunk) to minimize token usage before analyzing, exploring, editing, or debugging code.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 4, 2026
ai-agentsvuenodedebuggingapifrontendbackend

Works with

  • api
  • mcp

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add ingvar-soloma/microindex-mcp --skill templates --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Templates?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Templates
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ingvar-soloma-templates/badge)](https://www.skillsdirectory.com/skills/ingvar-soloma-templates)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: microindex-code-discovery
description: 4-step AST-first code discovery runbook using MicroIndex MCP (search_code and get_code_chunk) to minimize token usage before analyzing, exploring, editing, or debugging code.
---

# MicroIndex Code Discovery Runbook

Execute these 4 steps before analyzing, auditing, writing code, fixing bugs, or proposing architectural changes:

## Step 1: Semantic & Symbol AST Lookup

Run `search_code(query="<describe behavior, error, or symbol>", top_k=5)` on the MicroIndex MCP server.

- Inspect the returned `file_path`, `start_line..end_line`, `node_type`, and `score`.
- For cross-stack tasks (e.g., frontend component -> backend API -> worker), run 1 focused `search_code` per layer.

## Step 2: Narrow File Inspection (`get_code_chunk`)

If a promising indexed file (> 120 lines) needs additional context (e.g., another method in the same class or Vue `<template>` + `<script>`):

- Call `get_code_chunk(file_path="<exact/relative/path>", node_type="")` first instead of reading the whole file.
- Filter with `node_type` (for example `method`, `function`, `class`, or `vue_script`) whenever you only need specific constructs.
- Small files (≤ 120 lines) and non-indexed files (`.md`, `.json`, `.toml`, `.sh`, `Makefile`) may be read directly.

## Step 3: Targeted Line-Range Verification

If you must inspect lines not covered by `get_code_chunk` (e.g., top-level imports/constants) or surrounding context before editing:

- For targeted tasks, read **only** the `start_line..end_line` slice (with at most ±10–20 lines of margin).
- If a task explicitly requires a line-by-line full-file audit and `get_code_chunk` is insufficient, read the file once rather than slicing it into multiple 100-line `read_file` calls.
- Use targeted `grep` inside that single file only if verifying exact call sites or literals.

## Step 4: Implement & Keep Index Fresh

Make minimal, well-scoped edits based on the verified AST slices. If you add or substantially refactor files, refresh the incremental index (`make index TARGET=<project>`) so subsequent queries stay accurate.

Files in this skill

  • ADD_LANGUAGE_PROMPT.md2.1 KB
  • AGENT_RULES.md1.6 KB
  • AI_SETUP_PROMPT.md5.2 KB
  • SKILL.md2.1 KB
  • mcp_config.example.json2.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.