agentleFS
samugit83samugit83/redamon/skills/recon-ai-enrichment/SKILL.md

recon-ai-enrichment

Skill2.9k starsChanged 9 months agoMITView on GitHub

Wiring an LLM into a recon tool's decisions ("let AI pick {feature} for {tool}"): the never-raise contract, the per-target cache, the full+partial coverage, and the two UI toggles bound to one field. A raising AI helper or an empty fallback silently breaks or disables a live scan. Trigger: adding or editing a recon AI hook; a new recon/helpers/ai_planner/{tool}_{feature}.py; a /llm/{tool}-{feature} endpoint in agentic/api.py; a data.{tool}Ai{feature} toggle; editing apply_ai_pipeline_overrides in recon/project_settings.py; an LLM | Jev engine switch (a {tool}AiUseJev field, a /jev/* endpoint, agent_jev_gate); a Jev-only hook ({tool}Jev{Feature}, jev_shadow.py, shadow mode).

Trending

Quiet since October.thin dataabout the whole repository

Jan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 1 mentionJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 6 mentionsNov 2026: 0 mentionsDec 2026: 0 mentions
Jan 2026Jul 2026Dec 2026
Mentions a month of the samugit83/redamon repository that our weekly crawl found: only 7 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about samugit83/redamon

The biggest 5 of 7 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 7

Talked about on GitHub and Bluesky (7 times).

On GitHub · 6

1 more on GitHub

On Bluesky · 1

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    NEVER let the AI helper raise: Every failure path returns the user's current value.

    line 37
  2. Very specific:

    EVERY call site, full and partial, tests AI_IN_PIPELINE and <FLAG> itself.

    line 77
  3. Distinctive:

    Read AND write the same field.

    line 120

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

When to Use

  • Adding AI decision-making to an existing recon tool (tag selection, extension guessing, WAF classification, etc.).

For adding a whole new recon tool, use recon-tool-integration. For the setting that toggles it, use project-settings-cascade.


Critical Rules

  • NEVER let the AI helper raise. Every failure path returns the user's current value. Recon stdout tails into the webapp's SSE recon drawer, so an exception both breaks the scan and blanks the stream. Pattern: recon/helpers/ai_planner/nuclei_tags.py:94 ("Never raises -- returns current_tags on any failure").
  • NEVER fall back to an empty list/string. For tools where empty means "skip the work" (nuclei tags, ffuf extensions) that silently turns detection off. Fall back to the user's current value, not []/"".
  • NEVER call the LLM with no signal. Empty fingerprint -> return the current value; do not send an empty prompt.
  • ALWAYS take the agent_llm breaker AFTER the cache check, and honour it by returning the existing fallback. The agent's /llm/* endpoints share one breaker: gate = agent_llm_gate() (from recon/helpers/ai_planner/init.py); when not gate.allowed, print "... Agent LLM paused (breaker open) - using the fallback." and return the user's current value WITHOUT a POST. After the POST call gate.record(resp=resp); in the except branch call gate.record(exc=e). The cache is checked first so a cached answer is still served while the breaker is open. This is the same never-raise/never-empty fallback as above — the breaker just skips the call that would fail anyway when the agent is down.
  • A hook with an LLM | Jev engine switch takes engine: str = "llm" and uses its OWN breaker. engine == "jev" posts to /jev/<hook> (same request body, same response shape as /llm/<hook>, so the existing validator is reused), takes agent_jev_gate() and logs [*][<Tool>-Jev]. Never record a Jev outcome on agent_llm: that breaker marks 401/402/403 FATAL for the whole run, so a Jev auth or credit failure would silence every LLM hook. The Jev gate reads the agent's 503 error_type (no token, auth, no credit, forbidden are FATAL; rate limited carries retry_after; the rest are transient). A Jev failure uses the hook's static fallback: never re-route to the LLM, never return empty.
  • The engine field is the THIRD level, and the master switch must not touch it. aiInPipeline forces each per-hook AI flag; the {tool}AiUseJev engine fields stay OUT of apply_ai_pipeline_overrides, are in KEPT_WHEN_ABSENT (webapp/src/lib/project-preset-utils.ts) so a preset apply does not reset them, and a switch-ON is refused server-side unless the project OWNER has a Jev token (validateJevEngineChange, every write path, fail closed). Give a hook a Jev engine only when a wrong answer cannot drop a finding: the Nuclei false-positive filter deletes findings from target-controlled bytes and has no Jev engine.
  • A Jev-only hook ({tool}Jev{Feature}, no LLM twin) has TWO levels and starts in shadow. Nothing upstream folds its flag into aiInPipeline, so EVERY call site, full and partial, tests AI_IN_PIPELINE and <FLAG> itself; never add it to the master fan-out in TargetSection.tsx. Build it on recon/helpers/ai_planner/jev_shadow.py (jev_post takes the agent_jev breaker; ShadowRecorder caps the per-decision lines at 50, prints one summary, and keeps the records in the recon JSON under jev_shadow.<hook>). ROLLOUT = SHADOW acts on the deterministic path; ROLLOUT = ACT acts on Jev's answer with the deterministic result as the fallback, and flipping a hook is a separate change. In AI_HOOKS it is kind: 'enable', so a false flag reports off, not llm.
  • A per-item hook puts its items in the state and names them by index. A hostname, URL, path, title or stderr line is target data even when recon extracted it: never quote it in a question, never print it in a log line (a hostname with "port...scan" in it moves the recon drawer's phase). Agent side, use _ask_items, which sends each request only its own items; _ask re-sends one state per chunk and a scan's items would exceed the request limit.
  • NEVER hook the AI separately in partial recon. Most tools share one entry function (e.g. run_vuln_scan is called by both main_recon_modules/ and partial_recon_modules/); hook it once and both paths inherit. grep the function name to confirm before you edit. The feature must work in the full pipeline AND partial recon.
  • NEVER touch webapp/src/lib/recon-presets/presets/: the aiInPipeline cascade (apply_ai_pipeline_overrides, recon/project_settings.py:1968) is the single source of truth for per-tool AI flags. Presets must not hard-code them; update the Zod schema instead.
  • ALWAYS add a registry entry for the new Project column {tool}Ai{Feature} in recon_settings/registry.yaml, beside ffufAiExtensions, nucleiAiTags, nucleiAiResponseFilter and wafAiClassifier. A test walking Prisma.ProjectScalarFieldEnum fails until every column has one. An AI hook is an ordinary boolean toggle: mcp: settable, traffic: none (the hook itself sends no traffic; the tool it advises does), and a meaning that says which decision it moves from the operator to the model.
  • ALWAYS cache a per-target hook keyed by tech fingerprint (Server, X-Powered-By, ...) so N targets behind one stack collapse to one LLM call (ffuf_extensions.py). A per-scan hook (nuclei_tags.py) runs once and needs no cache.
  • ALWAYS put the toggle in two places bound to the same field data.{tool}Ai{Feature}: the master AI-in-Pipeline panel (TargetSection.tsx:695) and the tool's own section (e.g. NucleiSection.tsx). Read AND write the same field; no copy-on-flip (they stay in sync because they share the field).

The pieces

PieceFileNote
Helperrecon/helpers/ai_planner/{tool}_{feature}.pyPOSTs to the agent; never raises; logs [*][{Tool}-AI] / [!][{Tool}-AI] to stdout
Agent endpointagentic/api.py (e.g. /llm/nuclei-tags at :641, /llm/ffuf-extensions at :543)Pydantic model; returns 422 (bad body) / 503 (no key), never 500
Settingrecon/project_settings.py DEFAULT_SETTINGS + fetch_project_settings + both branches of apply_ai_pipeline_overridessee project-settings-cascade
Zodwebapp/src/lib/recon-preset-schema.tsso AI-generated presets see the field
UITargetSection.tsx + the tool's sectiontwo toggles, one field

Commands

docker compose build agent && docker compose up -d agent   # the /llm endpoint lives in agentic/ (baked)
# recon/*.py is volume-mounted at spawn - no rebuild
# verify: a minimal POST returns 422/503, never 500; and a live scan logs
# [*][{Tool}-AI] in BOTH a full run and a partial recon run; stop the agent -> scan still completes.

Resources

  • docs/readmes/coding_agent_prompts/PROMPT.ADD_AI_IN_RECON.md - full walkthrough, per-target vs per-scan, verify steps
  • Related skills: recon-tool-integration, project-settings-cascade

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.