agentleFS
plebpleb/graft/skills/research/SKILL.md

research

Skill9 starsChanged 16 days agoMITView on GitHub

Investigates a question with the user, fanning out researcher and experimenter agents, and writes a report under .claude/graft/research as the research goes. Challenges the discoveries before concluding, and never implements.

188 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use daily-arxiv, exp-eval and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • LambenthanSkill

    daily-arxiv

    每日从 arXiv 拉取新论文,过滤相关性,auto-ingest 高优先级论文,检测 SOTA 更新

    Also in 5 projects that use this

  • LambenthanSkill

    exp-eval

    实验判决门:Review LLM 独立评判实验结果 → 4 种判决路径 → 自动更新 claims confidence、ideas status、graph edges

    Also in 5 projects that use this

  • truongtv22Skill

    Problem-Solving Techniques

    Apply systematic problem-solving techniques for complexity spirals (simplification cascades), innovation blocks (collision-zone thinking), recurring patterns (meta-pattern recognition), assumption constraints (inversion exercise), scale uncertainty (scale game), and dispatch when stuck. Techniques derived from Microsoft Amplifier project patterns adapted for immediate application.

    Also in 6 projects that use this

  • parcadeiSkill

    ast-grep-find

    AST-based code search and refactoring via ast-grep MCP

    Also in 4 projects that use this

  • parcadeiSkill

    debug-hooks

    Systematic hook debugging workflow. Use when hooks aren't firing, producing wrong output, or behaving unexpectedly.

    Also in 4 projects that use this

  • skyllwtSkill

    exp-pilot-eval

    Pilot result evaluation — read pilot results, apply success criteria, update idea page (pilot_result, failure_reason if failed), generate PILOT_VERDICT_REPORT. Called by /ideate Phase 5 after /exp-pilot-run.

    Also in 4 projects that use this

  • +5 more from Lambenthan

The file

Show its rules and text

We split this skill into the rules it gives an agent

22 rules. 0 are common, 6 are distinctive, and 16 are very specific to this project.

  • 0

    Common

    Most of the 169 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 16

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read ${CLAUDE_SKILL_DIR}/../common.md and follow its sections ## Ask the user, ## Reviewer model, ## Find the work, ## Check the Graft …

    line 11
  2. Distinctive:

    If plan mode is active, ask the user to leave it before starting: plan mode blocks edits.

    line 17
  3. Very specific:

    When a repo the question needs is not under the root, add it as common.md's ## Workspace says, then read it there.

    line 31
  4. Very specific:

    When the arguments name no research path, follow plan.outsideRepoPlans: with always, go on.

    line 36
  5. Very specific:

    Run common.md's ## Check the Graft folder here.

    line 50
  6. Very specific:

    Every question carries a recommendation.

    line 58
  7. Distinctive:

    Before the first experimenter in a run:

    line 76
  8. Distinctive:

    Ask once (routine) to confirm setting up worktrees like the main tree (for example, dependency installs), recommending setup.

    line 81
  9. Very specific:

    Before an experiment that could touch anything outside its worktree (network, databases, cloud credentials, files under home such as …

    line 83
  10. Very specific:

    After every experimenter in a wave has returned, run git worktree remove --force <path> on each git worktree list --porcelain entry that is …

    line 87
  11. Distinctive:

    After each wave, add the discoveries to the report and tell the user in a line what changed.

    line 91
  12. Very specific:

    When research.steer is auto, do not ask: follow the threads you recommend, including those ## Challenge raises, and state in one line which …

    line 93
  13. Very specific:

    Run a graft:adversarial-reviewer on the reviewer model with the report and the repo, to attack the discoveries and the draft summary.

    line 97
  14. Very specific:

    Write to <root>/.claude/graft/research/<name>/report.md, where the name says what the research investigates in kebab case, with no date …

    line 101
  15. Very specific:

    Add these parts when they help: ## Options with trade-offs, ## Ruled out, ## Open threads, and ## References, one line per reference: - …

    line 128
  16. Distinctive:

    Write it as a professional report: plain headings, short paragraphs, and tables for comparisons.

    line 130
  17. Distinctive:

    Continue researching: ask the user what to dig into next.

    line 139
  18. Very specific:

    When plan.finishQuestion is skip, do not ask: take Conclude once the findings answer the question, wholly or in part, state that in one …

    line 141
  19. Very specific:

    When research.artifact is true, publish the report on conclusion, and republish it whenever it changes later in the session.

    line 147
  20. Very specific:

    Run a graft:publish-reader agent with the absolute paths of report.md and its SVGs.

    line 149
  21. Very specific:

    Write a styled HTML page from report.md to <page directory>/index.html, and copy each SVG beside it, referencing it by its file name.

    line 152
  22. Very specific:

    Call Artifact with that file_path, files mapping each SVG's name to its copy in the page directory, and icon: "report" on the first publish.

    line 153

“Common” is measured: kept by at least 6 in 10 of the 169 edited versions of this file we could read. “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

You are the research lead. You investigate a question with the user and write down what you find. The user's answers steer where you dig; they settle no implementation decisions. You never implement.

Read ${CLAUDE_SKILL_DIR}/../common.md and follow its sections ## Ask the user, ## Reviewer model, ## Find the work, ## Check the Graft folder, ## GitHub issue reference handling, ## My Graft ignore probe, ## Workspace and ## Settings.

Arguments: $ARGUMENTS

Start

If plan mode is active, ask the user to leave it before starting: plan mode blocks edits.

Find the root with git rev-parse --show-toplevel, then get settings once, passing the cwd as <root> outside a repo.

node ${CLAUDE_SKILL_DIR}/../settings.ts <root>

Outside a repo (non-zero exit), skip the ignore check. In common.md's workspace mode, ## Workspace applies. Otherwise follow ## Outside a repo when git -C ~/.my-graft rev-parse --show-toplevel prints ~/.my-graft (expanded); otherwise the root is the cwd.

In a repo, or in each repo under the root as ## Workspace says, list the git worktree list --porcelain entries under a graft-research- run directory, left by earlier runs. When there are any, ask (routine) which to remove, recommending none, and run git worktree remove --force <path> on each the user picks.

Workspace

  • When a repo the question needs is not under the root, add it as common.md's ## Workspace says, then read it there.
  • Each experimenter works in one repo under the root. ## Experimenters records a base OID per repo, and in a brief that repo is the root. The snapshot question is asked once per run and applies to each repo with uncommitted changes. After a wave, remove the run directory's worktrees with git -C <repo> in each repo that had an experimenter.

Outside a repo

  • When the arguments name no research path, follow plan.outsideRepoPlans: with always, go on; with never, stop and say research needs a repo or a report path; otherwise ask whether to save research in ~/.my-graft/.claude/graft/research/: Yes or No (stop).
  • The root is ~/.my-graft. Before writing a new report there, run ## My Graft ignore probe's check. When it fails, stop and name /graft:update as the next step.
  • Agent briefs name the cwd as the code to read. The report records the cwd under ## Question.

Find the work

Resolve common.md's rule 4 (a research name) before rule 3 (a plan name). Rule 5 lists the reports in <root>/.claude/graft/research/ instead of plans.

Research found is the report to continue. A plan or another file found is context for a new report. Other work is a new question. Ask when there is none.

Issues are context for the report, listed in its ## References. Skip ## GitHub issue reference handling's Save.

Check the Graft folder

Run common.md's ## Check the Graft folder here.

Rounds

Each round is one AskUserQuestion call with up to plan.questionsPerRound questions, most consequential first.

  • Facts come from the code or an agent, never from the user.
  • Each question names its subject and says in a clause what it steers.
  • Every question carries a recommendation. Each option states its trade-off, and the recommended option comes first, its label ending with (Recommended).
  • A question whose choices are not exclusive uses multiSelect.

Frame

Restate the question and the decision it feeds, split it into sub-questions, and shape them with the user in round 1. Write the report once the question is clear.

Fan out

Each wave sends, in parallel:

  • One graft:researcher per sub-question, with the question rather than the answer you expect.
  • One graft:experimenter per sub-question that needs running code (reproduce a failure, time a query, try a library), as ## Experimenters describes.

Experimenters

Send experimenters only in a repo, or in a repo under the root in ## Workspace.

Before the first experimenter in a run:

  1. Record the base OID with git rev-parse HEAD.
  2. Settle the snapshot. With a clean git status --porcelain, it is never. Otherwise use research.uncommittedChanges; for ask, ask once per run whether experiments run on the uncommitted changes (always) or on HEAD (never).
  3. Make the run directory: a fresh graft-research-<n> folder in the scratchpad when the session lists one, else mktemp -d "${TMPDIR:-/tmp}/graft-research-XXXXXX". Resolve it with cd <dir> && pwd -P and use that path from then on.
  4. Ask once (routine) to confirm setting up worktrees like the main tree (for example, dependency installs), recommending setup. The answer covers the run.

Before an experiment that could touch anything outside its worktree (network, databases, cloud credentials, files under home such as ~/.claude.json), ask the user.

Each brief names the question, the root, the base OID, its own folder <run directory>/<n>, the snapshot mode, whether setup like the main tree is allowed, and the external effects the user confirmed.

After every experimenter in a wave has returned, run git worktree remove --force <path> on each git worktree list --porcelain entry that is the run directory or starts with <run directory>/.

Steer

After each wave, add the discoveries to the report and tell the user in a line what changed. Then ask which threads to follow, drop or add, and fan out again.

When research.steer is auto, do not ask: follow the threads you recommend, including those ## Challenge raises, and state in one line which you took.

Challenge

Run a graft:adversarial-reviewer on the reviewer model with the report and the repo, to attack the discoveries and the draft summary. Fix factual errors directly. A finding that needs more digging becomes a thread to ask about in ## Steer. Dismiss the rest with a reason.

Report

Write to <root>/.claude/graft/research/<name>/report.md, where the name says what the research investigates in kebab case, with no date prefix. If that folder exists, ask whether to continue it or pick a new name. A report given by path keeps that path.

---
status: open
---

# <Title>

## Question

## Summary

## Discoveries

### <discovery>

## Next step

---

Research by Graft.
  • ## Question states the question and the decision it feeds.
  • ## Summary is filled on conclusion.
  • Each discovery states what was found, its sources (path:line, URL, or an experiment with its base commit and whether it ran on the uncommitted changes) and its confidence.
  • Add these parts when they help: ## Options with trade-offs, ## Ruled out, ## Open threads, and ## References, one line per reference: - Related owner/repo#N: <title> for a GitHub issue or PR, - Related <URL> for any other link, and - Related <path> for a plan or file given as context.
  • Draw an SVG diagram wherever a picture explains a flow, architecture or sequence better than prose. Save it beside report.md and embed it with ![<alt text>](<file>.svg). Make it read on light and dark backgrounds.
  • Write it as a professional report: plain headings, short paragraphs, and tables for comparisons.

A report missing the status or the footer gains what it lacks with its first edit. Continuing a concluded report sets it back to open with the first edit.

Finish

Once a wave leaves no thread to follow, ask:

  • Conclude: ## Challenge, then conclude.
  • Continue researching: ask the user what to dig into next.

When plan.finishQuestion is skip, do not ask: take Conclude once the findings answer the question, wholly or in part, state that in one line, and list what is still open under ## Open threads.

To conclude, set status: concluded, fill ## Summary and ## Next step, and report the report path, a few lines of summary, and the next step: /clear, then /graft:plan <name> or /graft:execute <name>. Name the report by its path instead when <root>/.claude/graft/plans/<name>.md or <root>/.claude/plans/<name>.md exists, or, outside ## Workspace, when the report is outside the repo; then say to run the next step from inside the repo that holds the code. Do not implement.

Artifact

When research.artifact is true, publish the report on conclusion, and republish it whenever it changes later in the session.

  1. Run a graft:publish-reader agent with the absolute paths of report.md and its SVGs. On a finding, or a path it did not read in full, ask the user whether to fix the file, leave out that diagram, or skip publishing.
  2. Load the Artifact tool with ToolSearch (select:Artifact) when it is deferred. On the first publish in the session, call it with action: "quickstart" and intent: "other".
  3. The page directory is <scratchpad>/research/<name>/ when the session lists a scratchpad directory. Otherwise it is <cwd>/.graft-research/<name>/; in a repo, before the first write, add .graft-research/ to the file git -C <root> rev-parse --path-format=absolute --git-path info/exclude names when it is not already there.
  4. Write a styled HTML page from report.md to <page directory>/index.html, and copy each SVG beside it, referencing it by its file name.
  5. Call Artifact with that file_path, files mapping each SVG's name to its copy in the page directory, and icon: "report" on the first publish. Republish to the same file_path.

report.md stays the source that plan and execute read. Give the user the link.

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.