Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Investigation Loop

ASecurity

Long-running Jira investigation that self-continues past natural stops until a written hypothesis with evidence citations is produced. Pairs with the cooking Stop hook and hard-stops at 10 iterations.

8 stars
0 votes
0 copies
1 views
Added 9/6/2026
researchgobash

Security Analysis

A100/100

Scanned 9/6/2026

Install to Claude Code

$npx -y skills add v1truv1us/ai-eng-system --skill investigation-loop --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Investigation Loop?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Investigation Loop
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/v1truv1us-investigation-loop-ai-eng-system/badge)](https://www.skillsdirectory.com/skills/v1truv1us-investigation-loop-ai-eng-system)

More formats (shields.io, HTML) on the badges page.

Download with Pro
Files
SKILL.md
---
name: investigation-loop
description: Long-running Jira investigation that self-continues past natural stops until a written hypothesis with evidence citations is produced. Pairs with the cooking Stop hook and hard-stops at 10 iterations.
metadata:
  category: user-invoked
disable-model-invocation: true
---

Default output: return only the result, blockers, and required evidence. Omit preambles, process narration, repeated context, confidence scores, and follow-up offers. Use at most five bullets unless a required artifact or schema needs more.

# Investigation Loop

Long-form investigation skill for tickets where the answer requires walking multiple linked tickets, code paths, and Confluence pages. Hand the agent a ticket and a marker file; the cooking Stop hook keeps it iterating until either (a) a written hypothesis with at least three evidence citations exists, or (b) the iteration counter hits 10.

## When to Use

- A Jira (or similar) ticket whose root cause is non-obvious and requires reading code, related tickets, and historical decisions
- The investigation will take 30+ minutes and you don't want to babysit it
- You need a written hypothesis at the end, not just a fix — investigation is the deliverable

## When NOT to Use

- The fix is obvious — just do it; don't loop
- The work is mechanical (test fixing, refactor) — use `test-fix-loop` or `cross-repo-refactor`
- You don't have access to the systems involved (Jira, repo, etc.) — the loop will spin without progress

## How to Run

1. Decide on the target. Have the ticket key (e.g. `RF-9421`) and any obvious entry point (a stack trace, a failing PR, a recent regression).
2. Create the marker file with the agent's PID:
   ```bash
   mkdir -p ~/.claude/cooking
   PID=$$
   START_EPOCH=$(ps -p $PID -o lstart= | sed 's/^ *//;s/ *$//')
   printf '{"start_epoch": "%s"}' "$START_EPOCH" > ~/.claude/cooking/active-$PID
   ```
3. Tell Claude: "Investigate JIRA `<TICKET-KEY>` in cook mode. Goal: written hypothesis with at least 3 evidence citations."
4. The agent reads the ticket, walks linked tickets and the relevant code, and either:
   - **Finds enough** — writes the hypothesis, removes the marker, exits
   - **Needs another cycle** — leaves the marker; the Stop hook returns exit 2 and the agent continues from where it left off
5. The skill **must** remove the marker file in a `finally`-equivalent path.

## TERMINATION

Stop when ALL of these are true:

- A written hypothesis exists in the conversation answering the ticket's central question
- At least 3 evidence citations support the hypothesis (each citation must be a concrete reference: code at `path:line`, ticket key, doc URL, commit SHA, or test result)
- The agent has explicitly stated **"I have enough to write up findings"** (verbatim trigger string), OR the iteration counter has reached 10
- The marker file is removed

When termination triggers:

```bash
rm -f ~/.claude/cooking/active-$PID ~/.claude/cooking/iter-$PID
```

If iteration 10 hits without a hypothesis, write a brief note describing what's missing (which file/ticket couldn't be accessed, what evidence is incomplete) and exit anyway — never run past 10. The hook hard-caps regardless.

## Anti-patterns

- **Don't** reach a hypothesis and immediately try to fix the bug — this skill's deliverable is the hypothesis. Hand off to a normal coding session for the fix.
- **Don't** count "I think it's probably X" as an evidence citation — citations must reference something concrete the user can verify.
- **Don't** silently skip a citation requirement to terminate early — if you can't find 3 sources, hit iteration 10 honestly and exit with a "what's missing" note.
- **Don't** write the hypothesis to a file in the repo — the deliverable lives in the conversation transcript. The user reads it directly.

## Verification

`/cook-status` should show this loop's marker as `active` mid-run. After termination, the marker is gone and the conversation transcript contains the hypothesis with its citations. The iteration counter file should be ≤ 10 at any observation point.

## Related

- Stop hook: `hooks/cooking/stop-hook.sh`
- Status command: `/cook-status`
- Sibling skills: `test-fix-loop`, `cross-repo-refactor`, `dreaming-consolidator`

Attribution

v1truv1usv1truv1us
View sourceMore from v1truv1us →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

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

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Competitor Analysis

This skill provides comprehensive analysis of competitor SEO and GEO strategies, revealing what's working in your market and identifying opportunities to outperform the competition.

1823 votes

Deep Research

Universal deep research agent team. 13-agent pipeline for rigorous academic research on any topic. 8 modes: full research, quick brief, paper review, lit-review, fact-check, three-way literature scan, Socratic guided research dialogue, and systematic review with optional meta-analysis. Covers research question formulation, Socratic mentoring, methodology design, systematic literature search, source verification, cross-source synthesis, risk of bias assessment, meta-analysis, APA 7.0 report co...

493622 votes

Paperclip Distill

Use when an operation issue is a Paperclip cursor-window, distill, or backfill — `operationType: "distill"` or `"backfill"` and the body references a Paperclip source bundle for a project or root issue. Turn raw Paperclip activity into a wiki-insightful project page, decisions log, and history note. This skill exists specifically to replace the stiff, datestamp-heavy templated output that the deterministic distiller produces.

813271 votes

Academic Pipeline

Orchestrator for the full academic research pipeline: research -> write -> integrity check -> review -> revise -> re-review -> re-revise -> final integrity check -> finalize. Coordinates deep-research, academic-paper, and academic-paper-reviewer into a seamless 10-stage workflow with mandatory, coverage-bounded integrity checks, two-stage peer review, and auditable quality-assurance artifacts. Triggers on: academic pipeline, research to paper, full paper workflow, paper pipeline, end-to-end p...

493621 votes

Exa Search

Semantic search, similar content discovery, and structured research using Exa API

304951 votes
View all in research →