swe-research
Skill2 starsChanged 6 months agoMITView on GitHub
Answer a concrete repository, dependency, external-system, feasibility, behaviour, or impact question and preserve the evidence for reuse. Use when the answer is worth keeping — codebase inspection, authoritative sources, live probes, or disposable experiments.
In this repository10 other files it gives its agents.
- gitSkill
- handoff-sessionSkill
- html-artifactsSkill
- prompt-writerSkill
- swe-executeSkill
- swe-planSkill
- swe-reviewSkill
- swe-shapeSkill
- swe-specSkill
- swe-worktreeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 13 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 44
Search the corpus first: Read INDEX.md and open any report whose subject plausibly covers the question.
- Distinctive: line 49
Prefer extending. Two reports on the same subject is the failure mode that makes a corpus useless.
- Very specific: line 50
Locate context: Read repository rules, plus any change artifact the caller supplies — typically brief.md (approved problem and acceptance …
- Distinctive: line 51
Choose the method: Use the smallest credible combination of repository analysis, authoritative documentation, live observation, or …
- Distinctive: line 52
Investigate broadly enough: Follow references and behaviour across the repository or external system to the depth the question requires.
- Distinctive: line 53
Create reproducible artifacts: When actual behaviour matters, write and run a minimal probe or experiment, save the script and relevant raw …
- Distinctive: line 62
Findings are appended, never overwritten: When new evidence contradicts an earlier finding, keep the old entry and mark it superseded with …
- Very specific: line 64
Keep raw detail in artifacts/ rather than pasting it into Markdown.
- Distinctive: line 66
Do not force fixed sections — hypotheses, outcome branches, result classification — when they do not help the research.
- Distinctive: line 67
Do not create a report per search query or minor subquestion.
- Distinctive: line 72
Never store tokens, cookies, credentials, personal data, or sensitive headers.
- Very specific: line 74
Use stable, descriptive filenames such as probe-companyfacts.py, aapl-companyfacts.json, or dto-field-references.md.
- Distinctive: line 76
Do not retain generated noise, dependency directories, binaries, or output that does not support an answer.
- Very specific: line 106
Read the repository, run read-only inspection, and run local or public read-only probes, benchmarks, and disposable experiments without …
- Distinctive: line 108
Ask first when an investigation is authenticated, paid, mutating, bulk, rate-sensitive, or otherwise consequential.
- Distinctive: line 110
Never modify production code, and never update another SWE artifact unless the user explicitly asks — recording a finding is not adopting …
- Very specific: line 114
Do not hand-edit INDEX.md.
- Distinctive: line 115
Do not require every investigation to be a decision blocker.
- Distinctive: line 127
Before returning, confirm the answer addresses the request at the depth it requires.
≈ “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.
Files
Pipeline
swe-shape → swe-spec → [swe-plan] → [swe-worktree] → swe-execute → swe-review. This skill is not one of those stages: it runs at any point, standalone or delegated by any of them, often several times between two stages.
- This stage: answer one concrete factual question and preserve the evidence.
- Reads: the repository, external sources, the existing corpus, and any artifact the caller supplies.
- Writes: a subject report in the shared corpus, plus artifacts.
- Next: return the answer to whoever asked. The caller decides what to do with it.
Purpose
Answer a concrete engineering question with evidence, and add that evidence to a shared, long-lived research corpus so later changes reuse it instead of rediscovering it.
Research returns evidence to the caller; it does not change product intent, design, or contracts.
Invoke when the answer is worth preserving. Ordinary reading — "what does this function do", "where is this defined" — is not research and needs no artifact. Research is for questions whose answer another change, or another agent, would otherwise have to rediscover: how an external API actually behaves, what the blast radius of a change is, whether a dependency supports something, why a subsystem works the way it does.
Corpus
One shared corpus per repository, organized by subject, not by question:
.swe/research/
INDEX.md # generated — never edit by hand
<subject-slug>/
report.md
artifacts/There is no per-change research directory. Findings about an API, a subsystem, or a dependency outlive the change that prompted them, and changes in the same repository overwhelmingly ask about the same domain and the same external services. A change references the reports it relied on from its own brief.md and spec.html.
A subject is a thing you can keep learning about: sec-edgar-api, tenant-resolution-middleware, legacy-dto-usage, postgres-jsonb-indexing. It is not a single question. report.md holds a standing summary plus dated findings; artifacts/ holds only what is needed to inspect or reproduce the evidence — probe scripts, captured responses, fixtures, benchmark output, query results. Omit artifacts/ when repository paths and cited sources fully support the answer.
Use report.template.md.
Workflow
- Frame the question. Restate the direct request or the unknown delegated by another stage, and identify what evidence would make the answer credible. Ask only when scope ambiguity would materially change the investigation.
Search the corpus first. Read
INDEX.mdand open any report whose subject plausibly covers the question. Then decide:- Reuse — an existing finding already answers it and is still valid. Return that answer and its report; do not re-investigate or create anything.
- Extend — the subject exists but this question is new, or the standing answer needs re-verification. Add a dated finding to that report.
- Create — no existing subject covers it. Start a new subject directory.
Prefer extending. Two reports on the same subject is the failure mode that makes a corpus useless.
- Locate context. Read repository rules, plus any change artifact the caller supplies — typically
brief.md(approved problem and acceptance criteria) orspec.html(the design and contracts) — when it changes what the question means. A standalone investigation has neither. - Choose the method. Use the smallest credible combination of repository analysis, authoritative documentation, live observation, or experiment.
- Investigate broadly enough. Follow references and behaviour across the repository or external system to the depth the question requires. Do not restrict an impact question to the first textual match.
- Create reproducible artifacts. When actual behaviour matters, write and run a minimal probe or experiment, save the script and relevant raw output, and record how it was executed.
- Evaluate the evidence. Distinguish observed facts from interpretation. Note where observed behaviour contradicts an existing finding, a brief, or a spec.
- Write the report. Apply
Report Rules. Update front matter, rewriteCurrent understanding, append the dated finding. - Regenerate the index. Rewrite
INDEX.mdfrom the front matter of every report directory. - Return the finding. Answer the requester, link the report, and name the artifacts or assumptions the evidence affects.
Report Rules
Current understandingis rewritten in place. It is the standing answer a reader gets if they read nothing else, and it must always be true today.- Findings are appended, never overwritten. When new evidence contradicts an earlier finding, keep the old entry and mark it superseded with a link to the replacement. The history of what was believed and why is part of the evidence.
- Front matter carries what the index needs and what tells a reader whether the answer is stale:
subject,updated,summary, andverified-against(repository revision, API or dependency version, access date, environment). - Keep raw detail in
artifacts/rather than pasting it into Markdown. - Split a subject when it grows a coherent sub-subject worth finding on its own, and leave a link in both directions.
- Do not force fixed sections — hypotheses, outcome branches, result classification — when they do not help the research.
- Do not create a report per search query or minor subquestion.
Artifact Rules
- Scripts must be runnable and record their command, dependencies, inputs, and required environment variables.
- Never store tokens, cookies, credentials, personal data, or sensitive headers. Read secrets from the environment and redact captured output. These rules apply to every retained artifact, in every investigation mode.
- Preserve raw responses when safe and reasonably sized. For large or sensitive output, save a minimal representative fixture and state exactly what was omitted.
- Use stable, descriptive filenames such as
probe-companyfacts.py,aapl-companyfacts.json, ordto-field-references.md. - Link every retained artifact from
report.mdand explain what it proves. - Do not retain generated noise, dependency directories, binaries, or output that does not support an answer.
Investigation Modes
Load only the guidance that matches the question:
- Repository-wide dependency, removal, compatibility, or blast-radius questions — references/repository-impact.md.
- What an external API, protocol, dependency, or data source actually returns or does — references/external-probe.md.
- Other empirical questions — use a minimal disposable script, benchmark, fixture, or prototype when source and documentation cannot answer. Keep it outside production source directories and never merge it into production unchanged.
Combine modes when necessary, such as probing an external payload and then tracing whether the repository can represent it.
Index
INDEX.md is generated from report front matter, so parallel changes never conflict on it and it cannot drift from the reports. Regenerate it in full on every write:
<!-- Generated by swe-research. Do not edit; regenerated from report front matter. -->
# Research Index
| Subject | Covers | Updated | Verified against |
|---|---|---|---|
| [sec-edgar-api](sec-edgar-api/report.md) | Payload shape, units, fiscal frames, rate limits | 2026-02-16 | API v3, accessed 2026-02-16 |
| [legacy-dto-usage](legacy-dto-usage/report.md) | Call sites binding `LegacyDto` and which are public | 2026-02-14 | repo `1a2b3c4` |The index is the discovery surface for this skill. Other stages do not scan it — they follow the direct report links recorded in brief.md and spec.html.
Autonomy
Read the repository, run read-only inspection, and run local or public read-only probes, benchmarks, and disposable experiments without asking. Write only inside .swe/research/.
Ask first when an investigation is authenticated, paid, mutating, bulk, rate-sensitive, or otherwise consequential.
Never modify production code, and never update another SWE artifact unless the user explicitly asks — recording a finding is not adopting it.
Constraints
- Do not hand-edit
INDEX.md. - Do not require every investigation to be a decision blocker.
Output
Final response:
- direct answer in one or two sentences;
- report path, and whether it was reused, extended, or created;
- artifacts created and how to reproduce them;
- material limitations;
- SWE artifacts or code decisions the finding affects, and whether any of them now contradicts it.
Before returning, confirm the answer addresses the request at the depth it requires.
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
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.

