Agent SkillsAgent Skills
fyrsmithlabs

contextd-workflow

@fyrsmithlabs/contextd-workflow
fyrsmithlabs
5
0 forks
Updated 3/31/2026
View on GitHub

Use for session lifecycle management - covers session start/end protocols, checkpoint workflow, and error remediation flow

Installation

$npx agent-skills-cli install @fyrsmithlabs/contextd-workflow
Claude Code
Cursor
Copilot
Codex
Antigravity

Details

Path.claude-plugin/skills/contextd-workflow/SKILL.md
Branchmain
Scoped Name@fyrsmithlabs/contextd-workflow

Usage

After installing, this skill will be available to your AI coding assistant.

Verify installation:

npx agent-skills-cli list

Skill Instructions


name: contextd-workflow description: Use for session lifecycle management - covers session start/end protocols, checkpoint workflow, and error remediation flow

contextd Workflow

Session Start Protocol

Step 1: Search for relevant memories

{
  "project_id": "contextd",
  "query": "current task context",
  "limit": 5
}

Step 2: Check for checkpoints

{
  "tenant_id": "fyrsmithlabs",
  "project_path": "/path/to/project",
  "limit": 5
}

Step 3: If checkpoint found

  • Ask user: "Found previous work: '[summary]'. Resume?"
  • If yes: checkpoint_resume(checkpoint_id, tenant_id, level)
  • Levels: summary (minimal), context (balanced), full (complete)

Checkpoint Workflow

When to checkpoint:

  • Context >= 70% capacity
  • End of work session
  • Before risky operations
  • Switching tasks

checkpoint_save

{
  "session_id": "session_abc123",
  "tenant_id": "fyrsmithlabs",
  "project_path": "/path/to/project",
  "name": "Feature implementation checkpoint",
  "summary": "Completed: spec, 2 of 4 skills. Next: remaining skills.",
  "context": "Working on plugin consolidation...",
  "full_state": "Complete conversation state...",
  "token_count": 45000,
  "threshold": 0.7,
  "auto_created": false
}

Summary must include:

  • What was accomplished
  • What's in progress
  • What's next
  • Key decisions made

Resume Levels

LevelTokensContent
summary~100-200Name + summary only
context~500-1000Summary + context + decisions
fullCompleteEntire conversation history

Error Remediation Flow

When encountering ANY error:

1. DIAGNOSE the error
   troubleshoot_diagnose(error_message, error_context)

2. SEARCH for past fixes
   remediation_search(query, tenant_id)

3. APPLY fix (use diagnosis + history)

4. RECORD the solution
   remediation_record(title, problem, root_cause, solution, category)

troubleshoot_diagnose

{
  "error_message": "cannot use vectorStore as vectorstore.Store value",
  "error_context": "Running go test after adding new interface method"
}

Returns: root_cause, hypotheses, recommendations, confidence

remediation_record

{
  "title": "Mock missing interface method after interface change",
  "problem": "Test fails with 'missing method X'",
  "symptoms": ["go test fails", "cannot use X as Y value"],
  "root_cause": "Mock implementations don't get new interface methods",
  "solution": "Add new method to all mock implementations",
  "category": "syntax",
  "tenant_id": "fyrsmithlabs",
  "scope": "org"
}

Categories: syntax, runtime, logic, config, dependency, network, auth, data, performance

Scopes: project (this project), team (team members), org (entire organization)

Session End Protocol

Before /clear or ending work:

  1. Re-index repository

    { "path": "." }
    

    Captures code changes and updates branch metadata.

  2. Record learnings

    {
      "project_id": "contextd",
      "title": "Implemented session lifecycle hooks",
      "content": "Used TDD with Registry pattern...",
      "outcome": "success",
      "tags": ["hooks", "lifecycle", "tdd"]
    }
    
  3. Checkpoint if resuming later

    { "auto_created": true, "threshold": 0.7, ... }
    

Git Commit Re-index

After every git commit:

{ "path": "." }

Why: Captures changes for semantic search, updates branch metadata.

Quick Reference

WhenAction
Session startmemory_search + checkpoint_list
After git commitrepository_index
Context >= 70%checkpoint_save then /clear
Error encounteredtroubleshoot_diagnose -> remediation_search -> fix -> remediation_record
Before /clearmemory_record + checkpoint_save

Common Mistakes

MistakeFix
Skipping memory search at startAlways search first
Vague checkpoint summariesInclude completed/in-progress/next
Waiting until context overflowSave at 70%, not 95%
Not recording before /clearCall memory_record first
Skipping error diagnosistroubleshoot_diagnose first, always