Skip to content
Back to skills

Pre Edit Investigation Gate

ASecurity

Require inspect-before-edit evidence for risky changes. Use before modifying architecture, data, auth, dependencies, migrations, generated workflows, validation wrappers, or broad UI/API behavior when the agent must prove it inspected relevant files and affected surfaces first.

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 12, 2026
code-qualityapisecurity

Works with

  • api

Security analysis

A100/100

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

Scanned September 12, 2026

npx -y skills add pax-k/pax-fullstack-harness --skill pre-edit-investigation-gate --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pre Edit Investigation Gate?

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

Security grade badge for Pre Edit Investigation Gate
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/pax-k-pre-edit-investigation-gate/badge)](https://www.skillsdirectory.com/skills/pax-k-pre-edit-investigation-gate)

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: pre-edit-investigation-gate
description: Require inspect-before-edit evidence for risky changes. Use before modifying architecture, data, auth, dependencies, migrations, generated workflows, validation wrappers, or broad UI/API behavior when the agent must prove it inspected relevant files and affected surfaces first.
---

# Pre-Edit Investigation Gate

## Purpose

Prevent blind edits by requiring explicit investigation evidence before high-risk changes.

## Inspect First

- files and manifests likely affected by the task
- docs, specs, feature state, validation wrappers, architecture boundaries, migrations, dependency policy, and recent diffs
- existing `docs/development/pre-edit-investigation.md` if present

## Procedure

1. Decide whether the gate applies.
   - Apply it for broad edits, security/auth/data changes, dependency additions, migrations, CI/validation rewrites, and user-facing UI/API behavior.
   - For trivial one-file edits, record a short skip rationale.

2. Gather evidence before editing.
   - List files read, commands inspected, affected surfaces, known invariants, assumptions, and expected validation.
   - Use `assets/templates/pre-edit-investigation.md.tmpl` when creating a durable artifact.
   - When `docs/observability/task-trace.jsonl` exists, add an inspect or pre-edit event so `$trajectory-risk-supervisor` can see that inspection happened.

3. Validate the evidence.
   - Run `scripts/check_pre_edit_evidence.py <repo>` when an artifact exists.
   - The evidence must be specific enough for another agent to understand why the edit path is justified.

4. Route related work.
   - Use `$task-planning-and-pr-protocol` for implementation planning.
   - Use `$agent-reviewer` and `$termination-gatekeeper` after edits.

## Validation

- Confirm the investigation names real files, commands, affected surfaces, assumptions, and validation commands.
- Confirm any skip rationale is proportional to the risk.

## Completion Criteria

- Risky edits have pre-edit evidence before implementation starts.
- Reviewers can distinguish inspected facts from assumptions.

Files in this skill

  • SKILL.md2.1 KB
  • agents/openai.yaml242 B

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.

Comments

Loading comments…

Newsletter

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