Skip to content
Back to skills

Source Investigation

ASecurity

Trace an investigated problem to source code across the authorized provider's repositories. Follow execution paths and consumers, establish an evidence-supported root cause and concrete fix, pin citations to the inspected commit, and verify the deployed revision. Use when a task supplies a source repository and the observed behavior, error, or alert must be explained by code.

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 30, 2026
ai-agentsgit

Works with

  • mcp

Security analysis

A100/100

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

Scanned November 30, 2026

npx -y skills add orenlion1/investigation-skills --skill source-investigation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Source Investigation?

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

Security grade badge for Source Investigation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/orenlion1-source-investigation/badge)](https://www.skillsdirectory.com/skills/orenlion1-source-investigation)

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: source-investigation
description: "Trace an investigated problem to source code across the authorized provider's repositories. Follow execution paths and consumers, establish an evidence-supported root cause and concrete fix, pin citations to the inspected commit, and verify the deployed revision. Use when a task supplies a source repository and the observed behavior, error, or alert must be explained by code."
---

# Source Investigation

## Overview

Any repository in a task, including a resource profile, establishes a VCS discovery starting
point even when unrelated to the symptom. Inherit its verified provider and account/workspace
under the root policy grant; search for and inspect relevant repositories without waiting for
the user to name the service repository. That grant already authorizes read-only discovery in
the supplied repository's provider account/workspace: never ask for that approval or for a second
repository URL; when tooling is missing, report it and state the discovery you would run. Read [provider discovery](references/provider-discovery.md)
before that search; it covers selection, evidence and a sanitized investigation example.

When this skill runs as part of an investigation, use the root
[soft delivery budget](../investigation-delivery/references/delivery-contract.md)
from request receipt; carry its original start into this work and check it at control boundaries.
Reuse verified setup and shared evidence; preserve this skill's required coverage and gates.

## When to Use

- A task names a repository and asks why an observed error, alert, or behavior happens.
- An execution path crosses repository or service boundaries and consumers must be traced.
- A root cause, concrete fix proposal, or deployed-revision verification is required.

## Resolve every configured repository

Collect every Repo bullet in the effective Resources, including repeated entries rendered from
REPO arrays and composed profiles. Resolve current explicit user configuration before inherited
profile values; no consumer may select only the first repository or reinject a profile over a
user-selected Slack channel or other setting.

Record a repository ledger with each configured entry, provider, canonical identity, authorized
provider-account/workspace scope, inspected revision, access outcome and evidence/gap. Resolve
short names from verified context rather than guessing GitHub versus Bitbucket. Use existing
approved GitHub tooling for GitHub and Rovo MCP for Bitbucket. Distinct provider scopes remain
separate; access to one never implies access to another. Record aliases against one canonical
inspection owner and preserve every input's coverage.

With multiple configured repositories, route scheduling to
[Per-Store Fan-Out](../per-store-fan-out/SKILL.md#repository-resolution-and-scheduling) in the
orchestrating session, including same-provider-only tasks. That skill owns repository inspection
units, briefs, the shared delegation machinery and the parent resource-to-owner map. When already
running inside an assigned repository or store brief, inspect the assigned scope and return leads;
do not recursively invoke scheduling or repeat another owner's repository work. A single
repository retains inline source inspection. Honor disabled fan-out and carry any declared
capability or access gap into the ledger and final report.

## Tracing Workflow

- Resolve each supplied repository's authorized scope independently; honor narrower user limits.
  Record discovery queries, candidate selection, inspected repositories and unavailable coverage.
  Hand discovered repositories to their existing parent inspection owner; discovery never edits
  task Resources or creates a duplicate inspection unit. State all three in a discovery plan.
- Trace observed errors, alerts, and affected resources through the relevant execution paths
  and dependencies. Inspect the actual implementation and consumers before drawing a
  behavioral conclusion, including across repositories when the path crosses a boundary.
- Use the provider's approved tooling and existing access for discovery, search, and
  inspection; reads only. Authentication requirements and separate gates for mutations,
  messages, publication, and deployment still apply.

## Root Cause and Fix

- Identify an evidence-supported root cause and propose a concrete fix. Connect the symptom,
  triggering conditions, causal code path, and proposed change; include how to validate the
  fix.
- Cite the repository, exact inspected commit, file path, line range, and commit-pinned
  source URL beside each material causal claim and proposed change location, using the
  [report-authoring](../report-authoring/SKILL.md) index discipline.
- Verify the deployed source revision when available. If deployment provenance is
  unavailable, distinguish findings in the inspected revision from claims about production.
- If evidence cannot establish a root cause or fix, report the unresolved gap, clearly label
  hypotheses and conditional proposals, and state the evidence needed to confirm them; never
  invent a causal explanation to satisfy this requirement.

## Common Rationalizations

- "The stack trace names the file, so that's the root cause." The frame shows where the
  symptom surfaced; trace the triggering conditions and callers before concluding.
- "It's in the supplied repo, so the search is done." The supplied repository is a starting
  point; consumers and shared libraries elsewhere in the authorized scope may own the cause.
- "The code on main shows the bug, so production has it." Verify the deployed revision, or
  label the finding as inspected-revision-only.
- "Something must be reported as the cause." An unresolved gap with labeled hypotheses is a
  valid, honest finding; an invented cause is not.

## Red Flags

- A behavioral conclusion drawn without inspecting the implementation and its consumers.
- A causal claim without a commit-pinned citation beside it.
- Production claims made from code alone, without deployment provenance or a disclaimer.
- A search scope wider than the provider grant, or an unrecorded search scope.
- A proposed fix with no validation path.

## Verification

- [ ] Inspected repositories and search scope are recorded.
- [ ] An unrelated supplied repository did not end discovery; relevant candidates were searched
      and inspected, or the bounded no-match/access gap is recorded.
- [ ] Each material causal claim and proposed change location carries a commit-pinned
      citation.
- [ ] The symptom, triggering conditions, causal path, fix, and validation connect.
- [ ] Deployed-revision identity is verified or its absence disclosed.
- [ ] Unresolved gaps are labeled with the evidence needed to close them.

- [ ] All configured repository entries are covered by the ledger and parent ownership map,
      including provider-specific access failures and aliases; explicit user overrides survive.

Files in this skill

  • SKILL.md6.8 KB
  • references/provider-discovery.md3.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.