Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/marcosd4h/DeepExtractRuntimenpx agentmods add commands/marcosd4h/deepextractruntime/ai-logical-bug-scanWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/marcosd4h/deepextractruntime/ai-logical-bug-scan)<a href="https://agentmods.dev/commands/marcosd4h/deepextractruntime/ai-logical-bug-scan"><img src="https://agentmods.dev/badge/commands/marcosd4h/deepextractruntime/ai-logical-bug-scan/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/marcosd4h/deepextractruntime/ai-logical-bug-scan"><img src="https://agentmods.dev/badge/commands/marcosd4h/deepextractruntime/ai-logical-bug-scan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.04491 |
| Opus 5.5 | $0.00000 | $0.01796 |
| Sonnet 5.5 | $0.00000 | $0.00898 |
| Haiku 4.5 | $0.00000 | $0.00449 |
Grade A, and why
ai-logical-bug-scan scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
1 near-identical copy found in the catalogue:
- memory-scan — 86% identical, 123 lines differ
How it starts
The opening of the file, as written. The whole thing — 436 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AI Logical Bug Scan
Overview
AI-driven scan for logic vulnerabilities: authentication/authorization bypass, state machine errors, confused deputy, privilege escalation, missing impersonation revert, and sensitive API parameter injection.
Uses LLM agents that navigate cross-module callgraphs, read decompiled code on demand, and verify findings against assembly ground truth. All vulnerability detection decisions are made by LLM agents, not pattern matching.
Usage:
/ai-logical-bug-scan <module>-- scan top entry points for the module/ai-logical-bug-scan <module> <function>-- scan from a specific function/ai-logical-bug-scan <module> <function> --depth 3-- limit callgraph depth
IMPORTANT: Execution Model
This command executes immediately. Run the full pipeline and deliver the completed report without pausing for confirmation. Use the workspace handoff pattern for all phases.
Status Messaging (MANDATORY)
Keep the user informed at every phase boundary. Output a plain-text status message before each phase starts and after it completes. Messages are 1-2 lines summarizing what is happening and what the phase produced. Do NOT suppress status messages to "save time."
Execution Context
IMPORTANT: Script invocations like
python .claude/skills/.../script.pyrun from the workspace root. The scripts manage their own path setup.
Step 0: Preflight Validation
from helpers.command_validation import validate_command_args
result = validate_command_args("ai-logical-bug-scan", {
"module": "<user_module>",
"function": "<user_function_or_None>",
})
if not result.ok:
# report errors and stop
db_path = result.resolved["db_path"]
Workspace Protocol
Create .claude/workspace/<module>_logicscan_<function_or_all>_<timestamp>/ and
pass --workspace-dir and --workspace-step to all skill scripts.
Subagent Compliance Checklist (MANDATORY)
Before proceeding past each phase, verify the following. Violations invalidate the scan.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 436 lines · 0 tokens per session scan A 08a8d3c10c5e
ai-logical-bug-scan is a command published in the GitHub repository marcosd4h/DeepExtractRuntime (21 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,491 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
ai-logical-bug-scan compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ai-logical-bug-scanmarcosd4h/DeepExtractRuntime | Command | 21 | 2mo ago | MIT | A | 0 | Claude Code |
| qa-changesOpenHands/extensions | Command | 190 | today | MIT | A | 63 | Claude Code |
| auditar-cascadingluanpdd/kit-mcp | Command | 5 | yesterday | MIT | A | 54 | Claude Code |
| react-nativegetsentry/toolkit | Command | 977 | yesterday | none | A | 0 | Claude Code |
| http-serviceMadAppGang/magus | Command | 16 | today | MIT | A | 27 | Claude Code |
| doctordoncheli/don-cheli-sdd | Command | 59 | 3mo ago | Apache-2.0 | A | 76 | Claude Code |
| doctorfatihkan/badi | Command | 8 | 1mo ago | MIT | A | 0 | Claude Code |