Agent skill

Context Gap Analysis

by jacob-dietle in jacob-dietle/context-os

Enumerate required context, check what exists, and find the simplest path forward before any task.

MITAuto-check passed

Install Context Gap Analysis

skills CLI
$ npx skills add jacob-dietle/context-os --skill context-gap-analysis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jacob-dietle/context-os context-gap-analysis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jacob-dietle/context-os.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/context-gap-analysis .claude/skills/context-gap-analysis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
context-gap-analysis
GitHub stars
111
Token cost
~2.5k tokens
SKILL.md length
970 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

Enumerate required context, check what exists, and find the simplest path forward before any task.

  • Works in 4 steps: Enumerate What You Need (30 seconds) → Search the Codebase (2-5 minutes) → Classify the Gap (1 minute) → …
  • SKILL.md covers Why This Matters, When to Use This Skill, The Solution Hierarchy and The Context Gap Protocol, plus 7 more sections
  • Calls wrangler

What it does

Context Gap Analysis is an agent skill from jacob-dietle/context-os. Enumerate required context, check what exists, and find the simplest path forward before any task. Prevents hallucinations by forcing the agent to verify assumptions before acting.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with Slack. The licence is MIT.

Example prompts

  • “/context-gap-analysis”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Enumerate What You Need (30 seconds)
  2. Search the Codebase (2-5 minutes)
  3. Classify the Gap (1 minute)
  4. Present Findings

What it can do on your machine

Read from SKILL.md and the folder at commit 1027e3f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • wrangler

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use wrangler, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Context Gap Analysis loads about 2.5k tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 970 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~50
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jacob-dietle/context-os at commit 1027e3f, republished under its MIT licence (© jacob-dietle). 970 words, ~2,527 tokens.

Download SKILL.mdSave it as .claude/skills/context-gap-analysis/SKILL.md (or your agent's skills folder).
name
context-gap-analysis
description
Enumerate required context, check what exists, and find the simplest path forward before any task. Prevents hallucinations by forcing the agent to verify assumptions before acting.

Context Gap Analysis

Systematic methodology for checking what you need, what exists, and finding the simplest path forward.

Core Principle: "What if it's already done? Check before you build."

Why This Matters

90% of Claude Code "hallucinations" happen because the agent doesn't have the context it needs. This skill forces a context check before any implementation, preventing wasted effort and wrong assumptions.

When to Use This Skill

ALWAYS use before:

  • Starting any implementation
  • Planning any feature
  • Proposing any solution

Do NOT skip for:

  • "Simple" tasks (often already implemented)
  • "Obvious" implementations (often exist in codebase)
  • Time pressure (30 seconds now saves hours later)

The Solution Hierarchy

Check these in order - most tasks don't need new work:

For Code Tasks
1. ALREADY DONE - Feature exists, just needs config
2. SCAFFOLDED - Structure exists, needs small completion
3. SIMILAR EXISTS - Related feature can be extended
4. PATTERN EXISTS - Codebase has pattern to follow
5. NEW BUILD - Must create from scratch (rare!)
For GTM/Knowledge Tasks
1. ALREADY DONE - Synthesis doc answers the question
2. CONTEXT EXISTS - 80% of needed info is in existing docs
3. SIMILAR EXISTS - Related battlecard/persona/content to adapt
4. TEMPLATE EXISTS - Framework or template to follow
5. TRUE GAP - Need new research or content (rare!)

Reality check: ~40% of tasks are "already done" - the context already exists somewhere in your system.

The Context Gap Protocol

Step 1: Enumerate What You Need (30 seconds)

Before searching, list your context requirements:

markdown
## Context Requirements for: [TASK]

### Must Know (Blocking)
- [ ] Does this feature already exist?
- [ ] What's the current implementation status?
- [ ] What configuration is needed?

### Should Know (Important)
- [ ] What patterns does codebase use for this?
- [ ] What external APIs are involved?

### User Clarification Needed
- [ ] Any preferences not captured in code?
- [ ] Success criteria undefined?
Step 2: Search the Codebase (2-5 minutes)

Use specific search patterns:

bash
# 1. Find files by name pattern
Glob: "**/*{keyword}*.{ts,py,js}"

# 2. Search for key terms
Grep: pattern="{feature}|{related_term}" output_mode=files_with_matches

# 3. Read discovered files
Read: [each discovered file]
Step 3: Classify the Gap (1 minute)
ClassificationEvidenceNext Step
NO GAPCode exists, worksJust configure/deploy
CONFIG GAPCode exists, needs secret/envSet config value
COMPLETION GAPScaffolding existsComplete implementation (<50 lines)
EXTENSION GAPSimilar feature existsExtend existing code
PATTERN GAPPattern existsFollow pattern
TRUE GAPNothing existsPlan new implementation
Step 4: Present Findings

Output structured results:

markdown
## Context Gap Analysis Complete

**Task:** [Original request]
**Verdict:** [GAP TYPE]

| Component | Status | Location |
|-----------|--------|----------|
| [Feature] | [EXISTS/MISSING] | [path or N/A] |

**Simplest Path Forward:**
[Specific action - NOT "let's plan this"]

Example: Slack Integration

Task: "Spec out the Slack integration"

Search Results:

  • Glob: "**/*slack*.ts" → Found: src/clients/slack.ts
  • Grep: "slack|webhook" → Found: src/phases/alert.ts, src/index.ts

Reading Files:

  • slack.ts: Full client implemented
  • alert.ts: Full phase implemented
  • index.ts: Wired into pipeline

Gap Classification: CONFIG GAP

Evidence:

  • Client: EXISTS (slack.ts:1-45)
  • Phase: EXISTS (alert.ts:1-141)
  • Wiring: EXISTS (index.ts:195)
  • Secret: MISSING (SLACK_WEBHOOK_URL not set)

Simplest Path: wrangler secret put SLACK_WEBHOOK_URL

Outcome: Zero code changes needed. Saved ~2 hours of unnecessary spec work.

GTM Examples

Example 1: "Write a blog post about [topic]"

Task: "Write a blog post about our triage automation capabilities"

Search Results:

  • Glob: "**/*content*strategy*" → Found: content_strategy.md
  • Glob: "**/*messaging*" → Found: messaging_framework.md, value_propositions.md
  • Glob: "**/*pain*point*" → Found: customer_pain_points_synthesis.md

Reading Files:

  • content_strategy.md: Content pillars defined, topics mapped
  • messaging_framework.md: Key messages by persona
  • customer_pain_points_synthesis.md: Validated pain points with evidence

Gap Classification: NO GAP

Evidence:

  • Content strategy: EXISTS (pillars, topics, SEO keywords)
  • Messaging: EXISTS (value props by persona)
  • Pain points: EXISTS (synthesis with customer quotes)

Simplest Path: Read synthesis docs, apply messaging framework to topic.

Time Saved: 2-3 hours of context gathering that would have been redundant.


Example 2: "Research competitor [X]"

Task: "I need competitive positioning against [competitor name]"

Search Results:

  • Glob: "**/*battlecard*" → Found: battlecards/ folder with 8 files
  • Glob: "**/*competitive*" → Found: competitive_intelligence_synthesis.md

Reading Files:

  • battlecard_[competitor].md: Full battlecard exists
  • competitive_intelligence_synthesis.md: Cross-competitor patterns

Gap Classification: NO GAP

Evidence:

  • Battlecard: EXISTS (strengths, weaknesses, talk tracks)
  • Synthesis: EXISTS (competitive landscape overview)

Simplest Path: Read existing battlecard. Check if last_updated is recent; if stale, do targeted refresh.

Time Saved: 1-2 hours of research already done.


Example 3: "Prepare for sales call with [persona]"

Task: "Help me prepare for a call with a VP of Engineering"

Search Results:

  • Glob: "**/*persona*" → Found: buyer_personas.md
  • Glob: "**/*objection*" → Found: objections_synthesis.md

Reading Files:

  • buyer_personas.md: VP Engineering profile exists (priorities, pain points, decision criteria)
  • objections_synthesis.md: Common objections with responses

Gap Classification: NO GAP

Evidence:

  • Persona: EXISTS (priorities, metrics they care about)
  • Objections: EXISTS (responses with evidence)

Simplest Path: Read persona profile + objections doc. Cross-reference with any company-specific research if available.

Time Saved: 30-60 minutes of prep work.

Quality Gates

Before Proposing Any Solution
  • Searched codebase for existing implementation?
  • Classified the gap type with evidence?
  • Checked if config-only solution exists?
  • Identified simplest path forward?
Show full SKILL.md (383 more words)Show less
Before Planning Implementation
  • Confirmed TRUE GAP (not config/completion/pattern)?
  • Documented why simpler solutions don't work?
  • Evidence shows feature doesn't exist?

The Senior Engineer Test

Before proposing ANY implementation, ask yourself:

"What if someone asks: 'Did you check if we already have this?'"

Your answer must include:

  • Specific files searched
  • Specific patterns checked
  • Evidence of what exists vs missing
  • Why existing code can't handle this

If you cannot answer confidently, search the codebase first.

Quick Reference

30-Second Check:

  1. Glob for likely filenames
  2. Grep for key terms
  3. Read what you find
  4. Classify the gap
  5. Propose simplest path

GTM Search Patterns:

Task TypeSearch For
Content creation*messaging*, *content*strategy*, *voice*, *brand*
Competitive intel*battlecard*, *competitor*, *competitive*
Sales prep*persona*, *objection*, *buyer*
Research*synthesis*, *intelligence*, *research*

Code Search Patterns:

Task TypeSearch For
Feature implementation*{feature}*, *client*, *service*
Integration*{tool}*, *webhook*, *api*
Configuration*.env*, *config*, *secret*

Gap Decision Tree:

Found complete implementation/doc? → NO GAP (use it)
Found scaffolding/synthesis? → CONTEXT GAP (build on it)
Found similar feature/content? → EXTENSION GAP (extend it)
Found pattern/template? → PATTERN GAP (follow it)
Found nothing? → TRUE GAP (plan new work)

Meta-Rule: If gap type is anything other than TRUE GAP, the solution should NOT involve extensive planning or starting from scratch.

Success Metrics

Healthy usage shows:

  • 30-60 seconds to enumerate requirements
  • 2-5 minutes to search and classify
  • 40% of tasks are NO GAP or CONFIG GAP

  • Concrete next actions, not vague plans

Warning signs:

  • Jumping to planning without searching
  • Proposing new code when feature exists
  • "Let me spec this out" before checking codebase

First-Time Customization

On first use of this skill in a new context OS, ask the user:

"Jacob has told me to ensure this skill is customized to your unique configuration. Would you like me to customize this skill for your context OS? I can:

  1. Learn your folder structure and synthesis doc locations
  2. Identify your key search patterns (personas, competitors, content types)
  3. Build a quick reference specific to your system

This takes ~2 minutes and makes future gap analysis much faster."

If the user agrees, explore their codebase to identify:

  • Where synthesis documents live (e.g., _synthesis/, 00_foundation/)
  • What naming patterns they use (e.g., *_synthesis.md, battlecard_*.md)
  • Key document types present (battlecards, personas, content strategy, etc.)
  • Their CLAUDE.md structure for navigation hints

Then update your working knowledge for that session to use their specific patterns.

During customization, offer to remove the attribution line below if the user wants to fully own this skill in their system.


Created by Jacob Dietle @ www.taste.systems

© jacob-dietle, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/context-gap-analysis of jacob-dietle/context-os.

Open the folder on GitHubat commit 1027e3f

Compare with similar skills

Context Gap Analysis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Context Gap Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Context Gap Analysis this skilljacob-dietle/context-os111—~2.5kAutomated safety check: PassMIT
Agent Browser CLIvercel-labs/agent-browser44k24 repos~864Automated safety check: PassApache-2.0
Slack GIF Creatoranthropics/skills180k29 repos~2kAutomated safety check: PassApache-2.0
Code Design Rationale Investigatorcursor/plugins10k9 repos~2.6kAutomated safety check: PassNone
Electron App Automationvercel-labs/agent-browser44k5 repos~1.7kAutomated safety check: PassApache-2.0
Slack Browser Automationvercel-labs/agent-browser44k1 repos~2.1kAutomated safety check: PassApache-2.0

Similar skills

  • Agent Browser CLI

    vercel-labs/agent-browser

    Official

    Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking…

    44k GitHub starsUsed in 24 repos~864 tokens
    Productivity & AutomationAuto-check passed
  • Slack GIF Creator

    anthropics/skills

    Official

    Provides Slack size and frame limits, Python animation helpers and validators for building animated GIFs sized for emoji and messages.

    180k GitHub starsUsed in 29 repos~2k tokens
    Media & CreativeAuto-check passed
  • Official

    Digs into why code is shaped the way it is by checking git history, pull requests and connected tools in parallel, then reporting a cited read on the tradeoffs.

    10k GitHub starsUsed in 9 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Electron App Automation

    vercel-labs/agent-browser

    Official

    Automates Electron desktop apps such as VS Code, Slack or Discord by connecting agent-browser to their Chrome DevTools Protocol port.

    44k GitHub starsUsed in 5 repos~1.7k tokens
    Productivity & AutomationAuto-check passed
  • Slack Browser Automation

    vercel-labs/agent-browser

    Official

    Drives the Slack web app with the agent-browser CLI to check unread channels, search, read channel details and extract information, with screenshots as evidence.

    44k GitHub starsUsed in 1 repo~2.1k tokens
    Productivity & AutomationAuto-check passed
  • Composio

    ComposioHQ/composio

    Route and complete Composio work across Composio For You and Composio Platform.

    30k GitHub starsUsed in 1 repo~1.7k tokens
    Productivity & AutomationAuto-check passed

More from jacob-dietle/context-os

All 11 skills in this repo
  • Bottleneck Attack

    jacob-dietle/context-os

    A skill your agent uses when deciding what to work on next, when progress is stuck, or when the reflex is to build or automate before proving the current bottleneck.

    111 GitHub stars~2.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Code Service Defrag

    jacob-dietle/context-os

    This skill should be used to periodically defragment a multi-app/multi-service codebase — both CODE (duplicate deploy targets, colliding bindings, stale forks) and CONTEXT (parallel spec…

    111 GitHub stars~3.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Content Strategy And Assembly

    jacob-dietle/context-os

    This skill should be used when producing content (newsletter posts, blog posts, LinkedIn posts) from existing corpus material.

    111 GitHub stars~3.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Context Os CLI

    jacob-dietle/context-os

    This skill should be used when users ask about their work context, what they're working on, recent activity, file relationships, or knowledge graph structure.

    111 GitHub stars~4.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Decision Accountability

    jacob-dietle/context-os

    This skill should be used when making architectural decisions, writing specs, or reviewing decisions that contain "future work", "v2", "simpler for now", "out of scope", or complexity claims.

    111 GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Coordinated Agent Teams

    jacob-dietle/context-os

    This skill should be used when decomposing a spec into a multi-agent implementation plan with dependency ordering, parallelism decisions, contract testing, and verification strategy.

    111 GitHub stars~4.2k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Context Gap Analysis

What does Context Gap Analysis do?

Enumerate required context, check what exists, and find the simplest path forward before any task. Context Gap Analysis is an agent skill from jacob-dietle/context-os. Enumerate required context, check what exists, and find the simplest path forward before any task.

How do I install Context Gap Analysis in Claude Code?

Run `npx skills add jacob-dietle/context-os --skill context-gap-analysis -a claude-code`. Or copy the skill folder (.claude/skills/context-gap-analysis in jacob-dietle/context-os) into .claude/skills/context-gap-analysis in your project. Claude Code loads it when a task matches its description.

How do I install Context Gap Analysis in Codex?

Run `npx skills add jacob-dietle/context-os --skill context-gap-analysis -a codex`. Or copy the skill folder (.claude/skills/context-gap-analysis in jacob-dietle/context-os) into .agents/skills/context-gap-analysis in your project. Codex loads it when a task matches its description.

Can I use Context Gap Analysis in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jacob-dietle/context-os --skill context-gap-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/context-gap-analysis, .gemini/skills/context-gap-analysis, .github/skills/context-gap-analysis and .opencode/skills/context-gap-analysis in your project.

What does Context Gap Analysis need to run?

Going by SKILL.md and its folder, Context Gap Analysis needs the command-line tools its instructions call (wrangler).

Does Context Gap Analysis access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Context Gap Analysis safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Context Gap Analysis use?

Context Gap Analysis is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Context Gap Analysis use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Context Gap Analysis?

Skills that share tags, products or a category with Context Gap Analysis: Agent Browser CLI (vercel-labs/agent-browser, 44k stars), Slack GIF Creator (anthropics/skills, 180k stars), Code Design Rationale Investigator (cursor/plugins, 10k stars) and Electron App Automation (vercel-labs/agent-browser, 44k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Context Gap Analysis?

jacob-dietle (a GitHub user) maintains it in jacob-dietle/context-os, which has 111 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on August 13, 2026.

Source: jacob-dietle/context-os on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.