agentleFS
CortexPrismCortexPrism/cortex/.github/skills/contextstream-workflow/SKILL.md

contextstream-workflow

Skill187 starsChanged 5 months agoApache-2.0View on GitHub

Manage persistent AI memory across sessions with ContextStream MCP.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use ContextStream to keep plans, tasks, decisions, lessons, and implementation context available across Copilot sessions.

    line 10
  2. Very specific:

    Always call init at the beginning of a new session:

    line 17
  3. Distinctive:

    Before inventing a workflow from memory, check whether ContextStream already surfaced relevant skills, docs, lessons, or decisions for the …

    line 36
  4. Distinctive:

    When a mistake or correction happens, save a lesson immediately:

    line 107
  5. Very specific:

    Before local code discovery, use search(mode="auto", query="...")

    line 145
  6. Very specific:

    Use search(mode="keyword") for exact symbols or strings

    line 146
  7. Very specific:

    Use search(mode="pattern") for glob or regex-style lookup

    line 147
  8. Distinctive:

    Use local reads only after search narrows the file set

    line 148

≈ “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

ContextStream Workflow Skill

Purpose

Use ContextStream to keep plans, tasks, decisions, lessons, and implementation context available across Copilot sessions.

Session Lifecycle

1. Start the session

Always call init at the beginning of a new session:

init(
  folder_path="<project_path>",
  context_hint="<user's first message>"
)

Then call context with the current request:

context(
  user_message="<current user message>"
)

For later messages in the same session, call context first before doing more work.

Before inventing a workflow from memory, check whether ContextStream already surfaced relevant skills, docs, lessons, or decisions for the task. Use skill(action="list"), memory(action="list_docs"), session(action="get_lessons"), and memory(action="decisions", workspace_id="<current_workspace_id>", project_id="<current_project_id>") when ids are available and the task is unfamiliar or likely already documented. Reuse the current project_id returned by init or context for project-scoped docs, events, and skills instead of guessing.

2. Plan multi-step work

Capture a persistent plan:

session(
  action="capture_plan",
  title="Implement feature X",
  steps=[
    {"id": "1", "title": "Research the current code path", "order": 1},
    {"id": "2", "title": "Implement the change", "order": 2},
    {"id": "3", "title": "Add verification", "order": 3}
  ]
)

Then create linked tasks:

memory(
  action="create_task",
  title="Implement the change",
  plan_id="<plan_id>",
  plan_step_id="2",
  priority="high"
)

3. Track progress while working

Start a task:

memory(
  action="update_task",
  task_id="<task_id>",
  status="in_progress"
)

Capture a technical decision:

session(
  action="capture",
  event_type="decision",
  title="Use repository pattern for data access",
  content="Chose a repository layer to isolate persistence logic and simplify testing."
)

Finish a task:

memory(
  action="update_task",
  task_id="<task_id>",
  status="completed"
)

4. Capture lessons

When a mistake or correction happens, save a lesson immediately:

session(
  action="capture_lesson",
  title="Check pagination behavior before assuming full results",
  trigger="Assumed the API returned all records in one response",
  impact="Only the first page was processed",
  prevention="Verify pagination semantics before implementing the fetch path",
  severity="medium"
)

5. Finish the work

Update the plan:

session(
  action="update_plan",
  plan_id="<plan_id>",
  status="completed"
)

Capture a summary event:

memory(
  action="create_event",
  event_type="implementation",
  title="Feature X complete",
  content="Implemented the change, added tests, and verified the result."
)

Search-First Workflow

  • Before local code discovery, use search(mode="auto", query="...")
  • Use search(mode="keyword") for exact symbols or strings
  • Use search(mode="pattern") for glob or regex-style lookup
  • Use local reads only after search narrows the file set

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.