ag-code-interrogation
Socratic Code Interrogation skill for conducting deep 5-Layer Cognitive Stack Q&A on AI-generated code, verifying developer mental models, and enforcing…
Skill by ngxccc
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ngxccc-ag-code-interrogation
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Node.js package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/ag-code-interrogation
What's inside
- Skill name
ag-code-interrogation- Description
- Socratic Code Interrogation skill for conducting deep 5-Layer Cognitive Stack Q&A on AI-generated code, verifying developer mental models, and enforcing system invariants before proof review.
- License
- MIT
- Instructions
- 81 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (5)
- SKILL.md
- code-interrogation-guide.md · references/
- invalid-report.json · scripts/fixtures/
- valid-report.json · scripts/fixtures/
- validate-interrogation-report.mjs · scripts/
SKILL.md (first lines)
# Socratic Code Interrogation Protocol (`ag-code-interrogation`) ## When to Apply Use this skill when working with ag-code-interrogation workflows, tasks, or system specifications. ## How to Use Refer to the workflow instructions and command references detailed below. > **Operational Purpose:** Verifies that developers and AI agents truly understand recent codebase changes, AI-generated logic, and underlying system invariants before code finalization. Prevents "auto-pilot acceptance" of subtle bugs, hidden race conditions, or unhandled edge cases. --- ## References & Deep Documentation - `references/code-interrogation-guide.md` — Deep operational guide, full 5-Layer breakdown, communication mode protocols, and complete JSON schema specifications. - `scripts/validate-interrogation-report.mjs` — Automated artifact validation script enforcing schema correctness and business invariants. --- ## 1. Trigger Conditions & Applicability This skill MUST be invoked during: - **Phase 4 (Code Interrogation)** of the Architect & Verifier Master Workflow. - Any pull request or major feature review involving complex logic, concurrent state updates, financial/identity boundaries, or AI-generated code blocks. - When explicitly requested via keywords: `interrogation`, `Socratic review`, `code interview`, `verify understanding`, `code challenge`. --- ## 2. Core Operational Rules ### Rule 1: Role-Based Communication Modes - **Agent-to-Human Mode:** Ask 1–2 Socratic questions per turn via interactive CLI/ask dialog. Guide human to self-discover flaws without giving immediate fixes (**Zero-Code-Handout Policy**). - **Agent-to-Agent Mode:** Interrogator Agent sends structured Socratic evaluation prompts via `hub` messaging to Executor Agent. ### Rule 2: 5-Layer Cognitive Stack Traversal Interrogations MUST traverse all five cognitive layers in sequence: 1. **L1 (Intuition & Bias Filtering):** Challenge confirmation bias & unexamined AI code. 2. **L2 (Inquiry & Deconstruction):** Probe first principles & System Invariants (`INV-X`). 3. **L3 (Systems Thinking):** Analyze 500 concurrent reqs, DB locks (`FOR UPDATE`), IO, and memory. 4. **L4 (Divergent Thinking & Inversion):** Fail-safe inversion (Attacker mindset) & trade-off justification. 5. **L5 (Execution & Proof):** Inspect property-based tests (`fast-check`) and counter-example logs. ### Rule 3: Loop Termination & Circuit Breaker (3-Strikes Rule) - Maximum **3 probing turns** allowed per Layer/Topic. - If unresolved after 3 turns, trigger Circuit Breaker (`circuitBreakerTriggered: true`, `gateVerdict: "FAIL"`) and route back to Phase 3 (TDD GREEN Fix). ### Rule 4: Verdict & Severity Matrix (3-Lane Policy) - **CRITICAL (Red Lane):** Invariant breach (`INV-X`), concurrency race condition, or DB deadlock $\rightarrow$ **`FAIL`** (Block release; return to Phase 3). - **MAJOR (Yellow Lane):** Unclear AI code boundary or weak property test $\rightarrow$ **`RETRY`** (Max 3 turns) or **`PASS_WITH_CONCERNS`**. - **MINOR (Green Lane):** Minor telemetry gap or doc note $\rightarrow$ **`PASS`**. ### Rule 5: Incremental Flushing Rule (Mandatory Context-Overflow Protection) To prevent context overflow or agent memory loss during long Socratic sessions, **`interrogation-report.json` MUST BE CREATED AT THE START AND FLUSHED/UPDATED AFTER EVERY SINGLE Q&A TURN**. Append the turn record to `qaTrace` and update `identifiedRisks` immediately. --- ## 3. Artifact Validation Requirement Upon completing or updating an interrogation session, validate `interrogation-report.json` using the automated script: ```bash bun .claude/skills/ag-code-interrogation/scripts/validate-interrogation-report.mjs <path-to-report.json> ``` --- ## References - [references/code-interrogation-guide.md](references/code-interrogation-guide.md) - [process/context/all-context.md](process/context/all-context.md)
From ngxccc/agent-skills-kit, MIT.
More from ngxccc/agent-skills-kit
- 0.529score
ag-generate-spec
ngxccc
Create or update a product-discovery SPEC (requirements doc) for user review.
SkillBFreshness: BClaude Code +9 - 0.529score
ag-audit-plans
ngxccc
Audit active project plan files for staleness, completion, and routing truth.
SkillBFreshness: BClaude Code +9 - 0.529score
ag-brainstorming
ngxccc
Use when starting creative work, building components, or modifying behavior.
SkillBFreshness: BClaude Code +9 - 0.529score
ag-docs
ngxccc
Trigger keywords: docs, README, document codebase, ADR, architectural decision, decision record, design doc, architecture record, RFC, request for comments…
SkillBFreshness: BClaude Code +9 - 0.529score
ag-generate-context
ngxccc
Generate or update the project's authoritative repository context at process/context/all-context.md.
SkillBFreshness: BClaude Code +9 - 0.529score
ag-generate-plan
ngxccc
Create or update implementation plans in the repo's SIMPLE, COMPLEX, or PHASE PROGRAM format.
SkillBFreshness: BClaude Code +9 - 0.529score
ag-audit-context
ngxccc
Audit project context routing, shared-skill discoverability, and Claude/Codex wiring.
SkillBFreshness: BClaude Code +9 - 0.529score
ag-feasibility-test
ngxccc
Use when a SPEC, INNOVATE, or VALIDATE (Layer 2) approach hinges on an unverified runtime/library/external mechanism: run a probe from the 8-family taxonomy…
SkillBFreshness: BClaude Code +9 - 0.528score
ag-audit-ag
ngxccc
Use when auditing agent harness health, Claude/Codex agent parity, skill registry consistency, and protocol wiring.
SkillBFreshness: BClaude Code +9 - 0.526score
ag-debug
ngxccc
Debug systematically with root-cause analysis before fixes.
SkillBFreshness: BClaude Code +9 - 0.526score
ag-git-flow
ngxccc
Trigger keywords: git flow, branch management, rebase, merge request, commit convention, release flow, create pr, pull request, pr template, gh pr.
SkillBFreshness: BClaude Code +9 - 0.526score
ag-agent-browser
ngxccc
AI-optimized browser automation CLI with context-efficient snapshots.
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 2, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ngxccc/agent-skills-kit
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ngxccc
- 0.570score
git-flow
ngxccc
Shape branches, slice atomic commits, create pull requests via the 3-Tier PR Matrix, or create sub-issues.
SkillAFreshness: AClaude Code +9 - 0.544score
domain-modeling
ngxccc
Build and sharpen a project's domain model.
SkillAFreshness: AClaude Code +9 - 0.544score
diagnosing-bugs
ngxccc
Diagnosis loop for hard bugs and performance regressions.
SkillAFreshness: AClaude Code +9 - 0.544score
codebase-design
ngxccc
Shared vocabulary for designing deep modules.
SkillAFreshness: AClaude Code +9 - 0.544score
tdd
ngxccc
Test-driven development.
SkillAFreshness: AClaude Code +9 - 0.541score
improve-codebase-architecture
ngxccc
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
SkillAFreshness: AClaude Code +9
Cite this page
ag-code-interrogation skill. Agent Mart. https://agentmart.dev/skills/ngxccc-ag-code-interrogation (last updated 2026-10-24)