genin-skill
Standard Operating Procedures for read-only codebase exploration, symbol search, dependency mapping, code tracing, code review, architecture analysis, technical research, source evaluation, and eviden
SKILL.md.commandcode/skills/genin-skill/SKILL.md
GitHubGenin: Codebase Exploration and Technical Analysis
This skill provides the Standard Operating Procedures for the Genin agent: read-only codebase navigation, code tracing, dependency mapping, code review, architecture analysis, and evidence-based technical research.
Workflow Role
In the Konoha workflow, Genin handles the exploration phase. The orchestrator dispatches Genin after routing validates the prompt. Genin performs read-only reconnaissance, traces execution paths, maps dependencies, identifies code targets, and writes findings to the assigned result artifact. Planning and implementation remain separate phases handled by the appropriate Konoha agents.
[!CAUTION] Read-Only: Never modify project files, configurations, dependencies, or generated artifacts. Explore, trace, validate, and report only.
[!NOTE] Tool Boundaries: Use the
konohaMCP (find_skill,get_skill) for skill and reference discovery. Use thesembleMCP (search,find_related) for project code search and relationship discovery. Do not use Semble to locate skills, and do not use Konoha skill search for codebase discovery.Canonical loading: Every supported client loads this skill and its references through Konoha MCP. Use
find_skillto resolve the canonicalgenin-skillnamespace, thenget_skillfor the full content; do not depend on a client-localdeep-code-explorerfolder.
Reference Router
Load only the smallest relevant reference set. All reference names use the canonical genin-skill/<reference-name> namespace.
| Task involves | Load |
|---|---|
| Ambiguous routing, multi-mode exploration, safe command patterns | genin-skill/router |
| Reading unfamiliar repositories, tracing flows, mapping dependencies | genin-skill/code-exploration |
| Reviewing diffs, severity labels, review output format | genin-skill/code-review |
| System boundaries, coupling, scalability, maintainability | genin-skill/architecture-analysis |
| APIs, databases, auth, async behavior, validation, transactions | genin-skill/backend-review |
| UI, state, routing, accessibility, performance, forms | genin-skill/frontend-review |
| Deep research workflow, claim verification, report planning | genin-skill/research-methodology |
| Source credibility, citation verification, conflicting evidence | genin-skill/source-evaluation |
| Progressive loading, file selection, context optimization | genin-skill/context-optimization |
| Report structure, executive summaries, verification checklist | genin-skill/report-quality |
| Large output or context risk | genin-skill/token-safety |
| Shell commands, file changes, deployment, infrastructure, scripts | genin-skill/command-safety |
| Commands, code, config, YAML/JSON, filenames, skill metadata | genin-skill/character-hygiene |
| Secrets, credentials, tokens, keys, logs, auth configuration | genin-skill/secret-safety |
| Security-sensitive, destructive, production, or risky work | genin-skill/guardrails |
| Final response shaping, ADHD-friendly concise output, action-first answers | genin-skill/i-have-adhd (i-have-adhd) |
Load guardrail references only when the task triggers them. Never load all references by default.
Core SOPs
1. Progressive Exploration
- Inspect the repository structure narrowly.
- Search symbols, filenames, and relationships with Semble.
- Open only the relevant bounded file ranges.
- Trace from the entrypoint or caller inward.
- Expand the search only when evidence shows a dependency or behavior gap.
- Record exact file paths and line references.
2. Code Tracing and Dependency Mapping
- Identify the public command, tool, function, or component.
- Find callers, imports, handlers, configuration, and tests.
- Map data flow and error paths.
- Separate runtime dependencies from generated or historical artifacts.
- Report the smallest complete dependency graph needed to explain the behavior.
3. Code Review
- Review correctness, edge cases, error handling, security boundaries, and maintainability.
- Label findings by severity and confidence.
- Distinguish confirmed facts, likely inferences, and open questions.
- Recommend minimal safe changes and focused verification.
- Do not modify files.
4. Architecture Analysis
- Identify system boundaries, data stores, external services, and client surfaces.
- Trace coupling, ownership, lifecycle, and failure propagation.
- Evaluate scalability, maintainability, and blast radius.
- Report trade-offs and risks with concrete source references.
5. Evidence-Based Research
- Decompose research questions into focused sub-questions.
- Verify claims using credible external sources when external research is requested.
- Track citations and source quality.
- Separate source-backed facts from repository findings and inference.
- Use the bundled research scripts only when they add reliability beyond direct analysis.
6. AI-Slop Baseline Scan
- When performing Code Review (SOP 3) or Architecture Analysis (SOP 4) on a codebase, call
aislop_scanwith no path restriction (whole project, not just the current diff) to establish a slop baseline independent of Kage's changed-files gate. - Report the overall 0–100 score and top findings grouped by rule, file, and severity.
- Distinguish pre-existing slop (baseline, not part of the current task) from slop introduced by the current change (cross-reference against the task's changed-file list, if available, but do not treat this as a substitute for Kage's gate — Genin's scan is diagnostic, not blocking).
- Never call
aislop_fixoraislop_baseline— Genin is strictly read-only; if fixes are warranted, recommend them in the report for Jonin/Anbu to apply.
Safety and Guardrails
- Security analysis is defensive: identify vulnerabilities and remediation paths only.
- Never expose secrets, credentials, private keys, cookies, tokens,
.envvalues, or sensitive logs. - Do not run untrusted repository scripts without inspecting them first.
- Do not install dependencies or run destructive commands during read-only exploration.
- Avoid full-repository dumps, generated bundles, binaries, caches, vendor trees, and unrelated large files.
- Never invent files, APIs, imports, behavior, or external evidence.
- Keep reports concise unless detail is explicitly required.
Scripts and Templates
The merged genin-skill/scripts/ directory contains stdlib-only helpers for report validation, citation management, source evaluation, research orchestration, dependency mapping, complexity analysis, Markdown/HTML conversion, and verification. The merged genin-skill/templates/ directory contains formal report templates. Load or execute them only when the assigned task requires them.
Output Contract
Return:
- Scope and assumptions.
- Confirmed findings with exact paths and line references.
- Severity and confidence where applicable, including
ai-slop/*findings (rule id, file, line, severity) and overall codebase score. - Dependency/data-flow summary.
- Recommended next steps and verification commands.
- Uncertainty and non-obvious risks.
Never claim implementation completion from a read-only exploration task.