agentleFS
akasecurityakasecurity/preflight-skills/skills/secure-research/SKILL.md

secure-research

Skill1 starsChanged 4 months agoMITView on GitHub

Use when the user wants to research, investigate, compare, or "find everything about" a topic and wants a cited, grounded report, optionally spread across several search engines (claude, codex, grok, agy, a self-hosted SearXNG). Privacy-aware - sensitive topics are gated, redacted, and kept on self-hosted SearXNG.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. maoyadongsh/siq-agent-security★ 51same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository10 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the question is underspecified (e.g.

    line 14
  2. Distinctive:

    If you have the Workflow tool, run the plugin workflow and relay its report.

    line 36
  3. Very specific:

    Angles: Write distinct research angles, each with a label, a broad starting query, and a short rationale.

    line 52
  4. Distinctive:

    Redaction: If the topic is sensitive, generalize the identifying details out of every query.

    line 58
  5. Distinctive:

    Keep the full question only in your own context.

    line 59
  6. Very specific:

    Before any query runs on a sensitive topic, show the user the redacted queries and wait for approval.

    line 63
  7. Distinctive:

    Read the briefs. If a facet of the question is uncovered, or a central claim rests on one weak source, write up to 4 follow-up angles.

    line 93
  8. Very specific:

    Ground everything: Every finding in the report cites at least one sourceUrl from the briefs, and its supporting quote must back it.

    line 100

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

secure-research

Overview

Multi-source web research that ends in a cited report. You plan the research and write the report. Parallel researchers, one per angle, gather the evidence on the search engines the user picks. Every claim in the report must trace to a source a researcher actually quoted.

If the question is underspecified (e.g. "what car should I buy" with no budget, use or region), ask 2-3 clarifying questions first.

Usage

/secure-research <question> [--engines auto|claude,codex,agy,grok,searxng|all] [--mode rotate|all] [--breadth <n>]

  • Engines. claude · codex · agy · grok are model CLIs that each run their own web search. searxng queries a self-hosted SearXNG instance at $SEARXNG_URL (JSON format enabled), downloads the top result pages directly from this machine, and returns verbatim page excerpts (snippets where a page can't be fetched) that no third-party model reads. The default, auto, is bare codex when codex is installed, else claude:haiku. As the dispatching agent, pick a fast-tier model and effort from codex debug models and pass codex:<model>@<effort>; never copy a model id from an old session. all means claude, searxng, codex and agy. grok runs only when named, because its headless tool policy is unverified.
  • Models. A model CLI takes an optional tune, <engine>:<model>[@<effort>]: for example claude:sonnet or codex:<model>@<effort>. Tunes of the same engine can run side by side in one run, which is how to compare models.
  • Mode. rotate (the default) gives each angle one engine, round-robin, so cost stays flat. all runs every angle on every engine, for cross-engine corroboration at engine-count cost.

Claude Code: use the workflow

If you have the Workflow tool, run the plugin workflow and relay its report. Do nothing else from this file:

Workflow({ name: "preflight:secure-research-workflow", args: { question, engines, engineMode, breadth } })

--mode maps to engineMode. Pass searxngUrl too if SEARXNG_URL isn't set in the environment. The searxng, codex, agy and grok researchers run through the same research.mjs engine, and claude researchers run as native subagents, each shown as its own agent. On a sensitive topic it returns awaiting-confirmation with the redacted plan: show that to the user, and re-run with sensitiveConfirmed: true only after they approve.

Every other harness: run it yourself

1. Scope (no web access yet)

  • Complexity. Rate it simple, moderate or complex. That gives 1-2, 3-5 or 6-10 angles.
  • Angles. Write distinct research angles, each with a label, a broad starting query, and a short rationale.
  • Sensitivity. Classify the topic, conservatively: when in doubt, it is sensitive. A topic is sensitive if researching it would spread identifying or private terms across third-party search engines. That covers a named private person, health, legal or financial details tied to a person, a vulnerability in a specific target, credentials, account numbers, or internal codenames.
  • Redaction. If the topic is sensitive, generalize the identifying details out of every query. Keep the full question only in your own context. Use at most 4 angles.

2. Gate sensitive topics

Before any query runs on a sensitive topic, show the user the redacted queries and wait for approval. A sensitive run uses only searxng, whatever engines they asked for. The engine refuses anything else, and refuses to run at all when SEARXNG_URL is unset. That holds in the Claude Code workflow too, where searxng runs through the same engine.

3. Run the researchers

The script lives at <this skill's base directory>/../../scripts/research.mjs. Resolve it from the base directory the harness gives you, and never guess another location. Write the plan to a temp file, echo the command, then run it:

plan.json: {"question":"<question; the redacted form if sensitive>","angles":[{"label":"…","query":"…","rationale":"…"}],"sensitive":false,"alreadyCovered":[],"cursor":0}
node <resolved-path>/research.mjs run --plan <plan.json> --engines <list> [--mode rotate|all] [--breadth <n>] [--timeout 600] [--concurrency 6]

It prints JSON: briefs[] (each with angle, engine, ok, usage when the CLI reports it, and either findings or failure), plus perEngine counts, warnings and nextCursor. Researchers can take several minutes, so allow a long command timeout. node research.mjs engines lists which engines are usable on this machine.

  • Exit 0 means at least one brief landed.
  • Exit 1 means every engine failed. Relay each failure to the user; a credit or auth failure means they need to top up or log in.
  • Exit 2 is a usage, plan or privacy refusal. Relay stderr verbatim.

Do not search the web yourself. The engines are the only researchers, which keeps every claim traceable to a brief.

4. Gap check: one follow-up wave at most, never on sensitive topics

Read the briefs. If a facet of the question is uncovered, or a central claim rests on one weak source, write up to 4 follow-up angles. Run the script once more with the source hosts already found in alreadyCovered and cursor set to the first run's nextCursor, so the rotation continues. Don't loop further.

5. Synthesize

  • Ground everything. Every finding in the report cites at least one sourceUrl from the briefs, and its supporting quote must back it. Drop anything you can't ground; never add outside knowledge as if it were sourced.
  • Merge duplicates into one finding with combined sources.
  • Confidence. High when multiple independent or primary sources agree, medium for one good source, low for a single blog, forum post or thin snippet.
  • Cross-engine agreement. The same claim found by two different engines is independent corroboration. A claim only one CLI engine found, citing a source no other engine surfaced, deserves caution: CLI engines can misquote or invent URLs.
  • SearXNG results. Findings marked raw: true came from SearXNG: fetched: true ones are verbatim page excerpts picked by query terms, the rest are search snippets. Nothing has judged them yet, so read them as evidence to weigh, not as claims.
  • Quote fidelity differs by engine. claude researchers read pages through WebFetch, which summarizes a page before the model sees it, so their "quotes" are often paraphrases. codex quotes raw pages and was far more often verbatim in testing. Weigh a finding by whether its quote reads as source text.
  • Report shape. A 3-5 sentence summary, the findings with confidence and sources, caveats (weak sources, time-sensitivity, thin coverage), 2-4 open questions, and a line with the per-engine counts, including any engine that failed and why.

Privacy note

A CLI engine (claude, codex, agy, grok) sends the full research prompt to its provider, and that provider's search backend sees the queries. searxng sends the query text only to your own instance, then downloads result pages directly: those sites see your machine's address, not the query. Redaction and a small angle count protect privacy more than the choice of engine does.

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.