agentleFS
pablof7zpablof7z/skills/prime-context/SKILL.md

prime-context

Skill1 starsChanged 5 months agoMITView on GitHub

Load durable, sourced research about a topic into the current context. Use when the user says "prime context," asks an agent to investigate and remember a topic, wants prior topic research reused, or wants relevant discoveries preserved during the rest of the same session.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. About 0 are common, 14 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈14

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

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

    Use <caller-home>/research as the research root.

    line 25
  2. Very specific:

    Search the entire research root for prior entries that match the topic by directory name, topic, aliases, and note content.

    line 36
  3. Distinctive:

    If relevant prior research exists, read it and return all relevant absolute note paths with a compact synthesis.

    line 40
  4. Distinctive:

    If no relevant entry exists, investigate the topic.

    line 43
  5. Distinctive:

    Write the new research to:

    line 47
  6. Distinctive:

    Do not perform the delegated lookup in parallel with a second lookup.

    line 54
  7. Distinctive:

    Every note must contain YAML frontmatter followed by concise Markdown:

    line 60
  8. Very specific:

    Use kind: "follow-up" for later discoveries.

    line 96
  9. Distinctive:

    After the subagent returns:

    line 103
  10. Distinctive:

    Read every relevant note path yourself.

    line 105
  11. Distinctive:

    Treat the topic as primed for the remainder of the current session.

    line 106
  12. Distinctive:

    Every bullet must contain between five and ten words.

    line 108
  13. Distinctive:

    Put the note path or paths on one short, unbulleted line after the bullets.

    line 110
  14. Distinctive:

    Add one terse, unbulleted caveat only when research is stale or uncertain.

    line 111
  15. Distinctive:

    Do not dump the full research unless the user asks.

    line 112
  16. Very specific:

    Create a sibling entry at <research-root>/<topic-slug>/<new-note-slug>/index.md.

    line 120
  17. Very specific:

    Use kind: "follow-up", the same topic_slug, the current session ID, and sources for the new evidence.

    line 122
  18. Distinctive:

    Keep the entry atomic: record only the new insight and its relationship to the primed topic.

    line 124
  19. Distinctive:

    Do not save incidental mentions, unsupported speculation, secrets, or private credentials.

    line 128

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

Prime Context

Prime the calling agent with durable research owned by that agent. Delegate the lookup and any missing research, then read the resulting notes yourself before confirming what was loaded.

Resolve ownership

  1. Identify the calling agent before spawning a subagent. Prefer the stable Agent identity from runtime context; never use a session handle or the delegated subagent's identity.
  2. Normalize the identity to lowercase [a-z0-9._-], replacing other runs with -. Use agent only when no stable identity exists.
  3. Resolve or create the caller's home with:

    ~/.agents/skills/agent-home/scripts/resolve-agent-home.sh <agent-id>
  4. Use <caller-home>/research as the research root. Pass that exact absolute path to the subagent so it cannot accidentally write into its own home.

Prime a topic

Derive a stable, lowercase hyphenated topic-slug from the subject. Keep it broad enough that later research on the same subject lands together.

Spawn one subagent with the raw topic, caller identity, absolute research root, topic slug, and current session identifier when available. Instruct it to:

  1. Search the entire research root for prior entries that match the topic by directory name, topic, aliases, and note content. Do not assume an exact directory match is the only match. Treat a missing research root as no prior research, then create it before writing.
  2. If relevant prior research exists, read it and return all relevant absolute note paths with a compact synthesis. Do not repeat the research merely to produce a fresh file.
  3. If no relevant entry exists, investigate the topic. Prefer live primary sources and the real local surface the user named. Record uncertainty and distinguish sourced facts from inference. Verify that every cited source directly supports the finding attached to it.
  4. Write the new research to:

    <research-root>/<topic-slug>/<note-slug>/index.md

    Choose a concise, specific note-slug; never overwrite an existing entry.

  5. Return the exact written or reused paths and a compact synthesis.

Do not perform the delegated lookup in parallel with a second lookup. One subagent owns the prior-entry decision and research write so two actors cannot create duplicate notes.

Note contract

Every note must contain YAML frontmatter followed by concise Markdown:

---
topic: "Human-readable topic"
topic_slug: "stable-topic-slug"
slug: "specific-note-slug"
kind: "initial"
agent_id: "calling-agent-id"
session_id: "session-id-or-unknown"
created_at: "RFC-3339 timestamp"
updated_at: "RFC-3339 timestamp"
aliases:
  - "searchable alternate phrase"
sources:
  - title: "Source title"
    locator: "URL, absolute file path with lines, or exact command"
    type: "web"
    accessed_at: "RFC-3339 timestamp"
---

# Specific note title

## Findings

- Sourced finding.

## Relevance

- Why this matters to the investigated topic.

## Open questions

- Remaining uncertainty, or `None identified.`

Use kind: "follow-up" for later discoveries. Valid source types include web, file, command, document, and conversation. Include at least one source. Quote YAML strings when punctuation could make them ambiguous. Keep raw excerpts short; synthesize instead of copying sources.

Load and confirm

After the subagent returns:

  1. Read every relevant note path yourself. Do not rely only on its synthesis.
  2. Treat the topic as primed for the remainder of the current session.
  3. Respond with two to five bullets confirming only the core understanding. Every bullet must contain between five and ten words. Keep each bullet terse; do not add explanations, citations, paths, or nested bullets.
  4. Put the note path or paths on one short, unbulleted line after the bullets. Add one terse, unbulleted caveat only when research is stale or uncertain.
  5. Do not dump the full research unless the user asks.

Capture later discoveries

While the topic remains primed in the same session, notice materially relevant new evidence encountered during other work. When it changes, extends, or corrects the loaded understanding:

  1. Create a sibling entry at <research-root>/<topic-slug>/<new-note-slug>/index.md.
  2. Use kind: "follow-up", the same topic_slug, the current session ID, and sources for the new evidence.
  3. Keep the entry atomic: record only the new insight and its relationship to the primed topic. Do not duplicate an existing note.
  4. Mention the captured follow-up in the next natural user-facing update.

Do not save incidental mentions, unsupported speculation, secrets, or private credentials. Do not create project planning files; these are private agent research notes only.

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.