auto-context

Automatically read relevant context before major actions. Loads TODO.md, roadmap.md, handoffs, task plans, and other project context files so the AI operates with full situational awareness. Use when starting a task, implementing a feature, refactoring, debugging, planning, or resuming a session.

7 stars

Best use case

auto-context is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Automatically read relevant context before major actions. Loads TODO.md, roadmap.md, handoffs, task plans, and other project context files so the AI operates with full situational awareness. Use when starting a task, implementing a feature, refactoring, debugging, planning, or resuming a session.

Teams using auto-context should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/auto-context/SKILL.md --create-dirs "https://raw.githubusercontent.com/wpank/ai/main/skills/meta/auto-context/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/auto-context/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How auto-context Compares

Feature / Agentauto-contextStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Automatically read relevant context before major actions. Loads TODO.md, roadmap.md, handoffs, task plans, and other project context files so the AI operates with full situational awareness. Use when starting a task, implementing a feature, refactoring, debugging, planning, or resuming a session.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Auto-Context — Situational Awareness Protocol (Meta-Skill)

Before you act, understand where you are. This skill ensures the AI loads critical project context automatically before any major action, preventing wasted effort, duplicate work, and misaligned implementations.


## Installation

### OpenClaw / Moltbot / Clawbot

```bash
npx clawhub@latest install auto-context
```


---

## When to Activate

This skill triggers automatically based on the current action. Do not wait for the user to ask — proactively load context when any of these conditions are met.

| Trigger | Why | Minimum Context |
|---------|-----|-----------------|
| Starting a new task | Understand priorities, avoid conflicts | Critical + High |
| Implementing a feature | Know the plan, constraints, recent changes | Critical + High |
| Refactoring code | Understand what changed recently, what's planned | Critical + High + Medium |
| Debugging an issue | Check recent changes, known issues, discoveries | Critical + High + Medium |
| Planning or scoping work | Full picture of roadmap, backlog, progress | All levels |
| Session start or resume | Rebuild mental model from last session state | Critical + High |
| Before a handoff | Ensure nothing is missed in transition | All levels |

---

## Context Files to Read

Read these files in priority order. Stop early if the task is narrow and lower-priority files are clearly irrelevant.

| Priority | File | Purpose | Read When |
|----------|------|---------|-----------|
| Critical | `TODO.md` | Current tasks, backlog, and priorities | Always |
| Critical | `roadmap.md` | Phase status, milestones, project direction | Always |
| High | `task_plan.md` | Active task breakdown and implementation plan | File exists |
| High | `.cursor/handoffs/*.md` | Recent handoff notes (read last 3 by date) | File exists |
| Medium | `findings.md` | Research results, discoveries, decisions made | Relevant to task |
| Medium | `CHANGELOG.md` | Recent changes and their rationale | Relevant to task |
| Low | `.cursor/sessions/*.md` | Session summaries (read last 2 by date) | Planning or debugging |

### Alternate Locations

Some projects use different paths. Check these fallbacks if primary paths are empty:

| Primary | Fallback |
|---------|----------|
| `TODO.md` | `docs/TODO.md`, `ai/TODO.md` |
| `roadmap.md` | `docs/roadmap.md`, `ROADMAP.md` |
| `task_plan.md` | `docs/task_plan.md`, `.cursor/task_plan.md` |
| `findings.md` | `docs/findings.md`, `.cursor/findings.md` |

---

## Context Loading Strategy

### Step 1: Load Critical Files (Always)

```
Read TODO.md → Extract: current task, next priorities, blockers
Read roadmap.md → Extract: current phase, active milestone, upcoming deadlines
```

If either critical file is missing, warn the user:
> "No TODO.md found. Consider creating one to track tasks."

### Step 2: Load High-Priority Files (If They Exist)

```
Read task_plan.md → Extract: implementation steps, acceptance criteria
Glob .cursor/handoffs/*.md → Read last 3 by modification date
```

### Step 3: Load Medium/Low Files (If Relevant)

Only read these when the current task benefits from historical context:

- **Debugging?** — Read `findings.md` and `CHANGELOG.md`
- **Planning?** — Read everything including session files
- **Quick fix?** — Skip medium and low entirely

### Step 4: Synthesize and Present

After loading, produce a context summary (see format below) before proceeding with the task.

---

## Staleness Detection

Check modification dates on all loaded files. Flag files that may contain outdated information.

| Age | Status | Action |
|-----|--------|--------|
| < 24 hours | Fresh | Use as-is |
| 1-7 days | Current | Use as-is, note the age |
| 7-30 days | Stale | Warn: "{file} last updated {N} days ago — verify before relying on it" |
| > 30 days | Outdated | Warn: "{file} is {N} days old and may no longer reflect project state" |

To check file ages on macOS:

```bash
stat -f "%m %N" TODO.md roadmap.md task_plan.md findings.md CHANGELOG.md 2>/dev/null
```

On Linux:

```bash
stat -c "%Y %n" TODO.md roadmap.md task_plan.md findings.md CHANGELOG.md 2>/dev/null
```

---

## Context Summary Format

After loading context, present a concise summary using this template. Keep it tight — the goal is awareness, not repetition.

```markdown
## Context Loaded

**Current Phase:** {phase from roadmap}
**Active Milestone:** {milestone and progress}

**Current Task:** {from TODO.md or task_plan.md}
- Status: {in-progress / blocked / not started}
- Blockers: {any blockers, or "none"}

**Recent Changes:**
- {last 2-3 items from CHANGELOG or handoffs}

**Relevant Findings:**
- {key discoveries that affect the current task, or "none"}

**Stale Warnings:**
- {any staleness warnings, or "all context is fresh"}
```

If no context files exist at all, output:

```markdown
## Context Loaded

No project context files found. Operating without historical context.
Consider creating TODO.md and roadmap.md to enable context-aware assistance.
```

---

## Integration Points

This skill connects to other workflow commands and should run as a precursor.

| Command | How Auto-Context Integrates |
|---------|-----------------------------|
| `/start-task` | Loads full context before beginning work; populates task plan |
| `/intent` | Reads roadmap and TODO to validate intent against project direction |
| `/workflow` | Provides the "understand" phase of any workflow automatically |
| `/progress` | Uses TODO.md and task_plan.md to assess completion status |
| `/handoff-and-resume` | Reads last handoff to rebuild state on resume |
| `/session-summary` | Cross-references loaded context with session actions for accuracy |

### Execution Order

```
User triggers action
  → Auto-Context activates (this skill)
    → Context summary presented
      → Primary skill/command executes with full awareness
```

---

## Quick Reference

```
Context Loading Checklist:
  1. Read TODO.md (critical)
  2. Read roadmap.md (critical)
  3. Read task_plan.md (if exists)
  4. Read last 3 handoffs (if exist)
  5. Check file staleness
  6. Read findings/changelog (if relevant)
  7. Present context summary
  8. Proceed with task
```

---

## NEVER Do

1. **NEVER skip critical files to save time** — leads to duplicate work and conflicting implementations
2. **NEVER load every file regardless of task** — wastes tokens and dilutes focus with irrelevant info
3. **NEVER ignore staleness warnings** — stale context causes decisions based on outdated assumptions
4. **NEVER read files without summarizing** — raw file dumps overwhelm; always synthesize first
5. **NEVER assume context from memory alone** — sessions are stateless; always re-read files
6. **NEVER silently proceed when no context exists** — user should know they're operating blind
7. **NEVER read handoffs/sessions beyond the limit** — last 3 handoffs and last 2 sessions are sufficient

Related Skills

context-driven-development

7
from wpank/ai

Treat project context as a managed artifact alongside code. Use structured context documents (product.md, tech-stack.md, workflow.md) to enable consistent AI interactions and team alignment. Essential for projects using AI-assisted development.

schema-markup

7
from wpank/ai

Add, fix, or optimize schema markup and structured data. Use when the user mentions schema markup, structured data, JSON-LD, rich snippets, schema.org, FAQ schema, product schema, review schema, or breadcrumb schema.

prompt-engineering

7
from wpank/ai

Master advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability in production. Use when optimizing prompts, improving LLM outputs, designing production prompt templates, or building AI-powered features.

professional-communication

7
from wpank/ai

Write effective professional messages for software teams. Use when drafting emails, Slack/Teams messages, meeting agendas, status updates, or translating technical concepts for non-technical audiences. Triggers on email, slack, teams, message, meeting agenda, status update, stakeholder communication, escalation, jargon translation.

persona-docs

7
from wpank/ai

Create persona documentation for a product or codebase. Use when asked to create persona docs, document target users, define user journeys, document onboarding flows, or when starting a new product and needing to define its audience. Persona docs should be the first documentation created for any product.

mermaid-diagrams

7
from wpank/ai

Create software diagrams using Mermaid syntax. Use when users need to create, visualize, or document software through diagrams including class diagrams, sequence diagrams, flowcharts, ERDs, C4 architecture diagrams, state diagrams, git graphs, and other diagram types. Triggers include requests to diagram, visualize, model, map out, or show the flow of a system.

game-changing-features

7
from wpank/ai

Find 10x product opportunities and high-leverage improvements. Use when the user wants strategic product thinking, mentions 10x, wants to find high-impact features, or asks what would make a product dramatically more valuable.

clear-writing

7
from wpank/ai

Write clear, concise prose for humans — documentation, READMEs, API docs, commit messages, error messages, UI text, reports, and explanations. Combines Strunk's rules for clearer prose with technical documentation patterns, structure templates, and review checklists.

brainstorming

7
from wpank/ai

Explore ideas before implementation through collaborative dialogue. Use before any creative work — creating features, building components, adding functionality, or modifying behavior. Turns ideas into fully formed designs and specs through structured conversation.

Article Illustrator

7
from wpank/ai

When the user wants to add illustrations to an article or blog post. Triggers on: "illustrate article", "add images to article", "generate illustrations", "article images", or requests to visually enhance written content. Analyzes article structure, identifies positions for visual aids, and generates illustrations using a Type x Style two-dimension approach.

subagent-driven-development

7
from wpank/ai

Execute implementation plans by dispatching a fresh subagent per task with two-stage review (spec compliance then code quality). Use when you have an implementation plan with mostly independent tasks and want high-quality, fast iteration within a single session.

skill-judge

7
from wpank/ai

Evaluate Agent Skill quality against official specifications. Use when reviewing SKILL.md files, auditing skill packages, improving skill design, or checking if a skill follows best practices. Provides 8-dimension scoring (120 points) with actionable improvements. Triggers on review skill, evaluate skill, audit skill, improve skill, skill quality, SKILL.md review.