agentleFS
TsukiNi22TsukiNi22/ai-utils/skills/ai/setup-context/SKILL.md

setup-context

Skill1 starsChanged 3 days agoMITView on GitHub

Set up everything this conversation needs before the work starts - read the current repository (tree, docs, rules files, build, code, git state), search the earlier and archived sessions on this computer (Claude Code transcripts and memory, claude-cluster sessions and their trash, Codex / Qwen / opencode, handover files) for what was asked, done, left and decided, then load the skills that fit the project (style, language, build, tests, docs, git) and check the MCP servers / tools it would use (configured, connected, missing), and hold it all as the working context; the questions only at the end. Use whenever the user says "setup le contexte", "prépare-toi", "charge tout ce qu'il faut", "lis le repo et les anciennes sessions", "setup les skills / mcp utiles", or summons /setup-context before a task.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • getnao/naotheir own version, first seen Oct 8, 2026

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read what the project is and what was already done, then equip the session: the skills loaded, the MCP servers / tools checked.

    line 10
  2. Distinctive:

    Search by the absolute path of the project (its parents, subfolders, worktrees too), newest first:

    line 26
  3. Distinctive:

    Every claim checked against the code and git: "done" in a transcript but absent from the code is not done.

    line 39

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

Setup context: the project, its history, the right skills and tools

Read what the project is and what was already done, then equip the session: the skills loaded, the MCP servers / tools checked. Read-only on the project: nothing built, changed, committed, stopped or resumed.

Scope given with the skill: the folder / task after /setup-context if any, else the cwd and the latest request.

1. The project and its history

  • The onboard skill installed: follow its steps 0-4 (the project, its git history, the earlier sessions, merged and checked). Else do the same by hand:
    • Tree (git ls-files, sizes, languages), docs read entirely (README*, CLAUDE.md / AGENTS.md and the other rules files: rules to follow from now on, CHANGELOG, docs/, TODO / NOTES / .info / PASSATION.md), build and CI (CMakeLists, package files, workflows, hooks), code (entry points, module layout, tests, TODO / FIXME).
    • Git: log (recent --stat), branches and worktrees, tags, git status / diff of the pending work, unpushed commits, stashes (listed, never popped).
  • Secrets: their existence and place only, never their content.

2. Earlier and archived sessions

Search by the absolute path of the project (its parents, subfolders, worktrees too), newest first:

  • Claude Code: ~/.claude/projects/<path with every / and . turned into ->/*.jsonl (worktrees: <repo>--claude-worktrees-<name>), its memory/ (MEMORY.md and its files), ~/.claude/jobs/*/state.json (background jobs: their state, what they wait for).
  • claude-cluster: claude-cluster list --rtk and claude-cluster external --rtk; every instance (~/.local/share/claude-cluster/instances/*); the archived sessions too (the trash of each instance, kept 7 days by default) and their transcripts (logs/), the tasks, schedules and todo lists of the project. A running session is only read, never sent anything.
  • Other agents: Codex ~/.codex/sessions, Qwen Code ~/.qwen/projects, opencode opencode session list, Gemini ~/.gemini (grep the project path); handover files (PASSATION.md, HANDOFF.md, NOTES.md) in the project or its parent.
  • From each one: the user's requests (their words for the important ones), what was done, left or failed, the decisions, refusals and rules. A long transcript is never dumped: extract the user messages, the last assistant messages and the errors (jq / a short python script), read what matters.
  • Every claim checked against the code and git: "done" in a transcript but absent from the code is not done.

3. The skills that fit

  • List the installed skills (the listing of this session) and pick the ones the project and the task call for: its languages' style skills (cpp-style, python-style, coding-style, cmake-style, the comments skills), its build / tests / docs / git skills, libutils when it uses libutils, the routers when the work spans several (dev, audit).
  • Load them now (Skill tool), the most central first; never more than the task needs (each costs context). Say in one line which ones are loaded and why.
  • The rules files of the project win over a skill when they disagree: say so.

4. MCP servers and tools

  • The MCP servers configured (claude mcp list, the project's .mcp.json, ~/.claude.json), connected or failing, and the deferred tools of this session (ToolSearch): which ones the task would use (GitHub, a browser, docs, a database, the claude-cluster MCP...).
  • The CLI tools the project needs (compilers, cmake, gh, xstyle, package managers, linters): present (command -v) and their version, missing ones noted - never installed or configured without asking.
  • A useful server or tool missing: noted with its exact setup command, proposed at the end (never added silently).

5. Report, then the questions

  • Terse (rtk): the project in two lines, its state (branch, last commit, pending work), what earlier sessions did and left (dated), the rules to follow, the skills loaded, the tools ready / missing, the possible next steps.
  • Every question only at the end, through interactive-questions (a popup, never a list in the text): which next step, a contradiction found, a missing tool / MCP to install, an old session to resume. Nothing unclear left: no popup.
  • A fact that must last (a rule, a convention) goes to memory / CLAUDE.md only when the user wants it.

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.