MCPInstall

knowledge

Query knowledge artifacts across all locations. Triggers: "find learnings", "search patterns", "query knowledge", "what do we know about", "where is the plan".

Installs
164
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/boshu2/agentops --skill knowledge
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads knowledge automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Knowledge Skill

YOU MUST EXECUTE THIS WORKFLOW. Do not just describe it.

Find and retrieve knowledge from past work.

Execution Steps

Given /knowledge <query>:

Step 1: Search with ao CLI (if available)

ao search "<query>" --limit 10 2>/dev/null

If results found, read the relevant files.

Step 2: Search .agents/ Directory

# Search learnings
grep -r "<query>" .agents/learnings/ 2>/dev/null | head -10

# Search patterns
grep -r "<query>" .agents/patterns/ 2>/dev/null | head -10

# Search research
grep -r "<query>" .agents/research/ 2>/dev/null | head -10

# Search retros
grep -r "<query>" .agents/retros/ 2>/dev/null | head -10

Step 3: Search Plans

# Local plans
grep -r "<query>" .agents/plans/ 2>/dev/null | head -10

# Global plans
grep -r "<query>" ~/.claude/plans/ 2>/dev/null | head -10

Step 3.5: Search Global Patterns

# Global patterns (cross-repo knowledge)
grep -r "<query>" ~/.claude/patterns/ 2>/dev/null | head -10

Global patterns contain knowledge promoted from any repository via /learn --global. These are high-confidence, cross-project learnings.

Step 3.6: Search Global Learnings

# Global learnings (cross-repo abstracted knowledge)
grep -r "<query>" ~/.agents/learnings/ 2>/dev/null | head -10

Global learnings are abstracted, transferable insights promoted from repo-specific learnings via /learn --promote or classified as cross-cutting by /retro.

Step 3.7: Search Global Patterns (new location)

# Global patterns (new location, cross-repo)
grep -r "<query>" ~/.agents/patterns/ 2>/dev/null | head -10

Step 4: Use Semantic Search (if MCP available)

Tool: mcp__smart-connections-work__lookup
Parameters:
  query: "<query>"
  limit: 10

Step 5: Read Relevant Files

For each match found, use the Read tool to get full content.

Step 6: Synthesize Results

Combine findings into a coherent response:

  • What do we know about this topic?
  • What learnings are relevant?
  • What patterns apply?
  • What past decisions were made?

Step 7: Report to User

Present the knowledge found:

  1. Summary of findings
  2. Key learnings (with IDs)
  3. Relevant patterns
  4. Links to source files
  5. Confidence level (how much we know)

Knowledge Locations

TypeLocationFormat
Learnings.agents/learnings/Markdown
Patterns.agents/patterns/Markdown
Research.agents/research/Markdown
Retros.agents/retros/Markdown
Plans.agents/plans/Markdown
Global Plans~/.claude/plans/Markdown
Global Learnings~/.agents/learnings/Cross-repo abstracted learnings
Global Patterns~/.agents/patterns/Cross-repo reusable patterns
Legacy Patterns~/.claude/patterns/Read-only fallback (deprecated for writes)

Key Rules

  • Search multiple locations - knowledge may be scattered
  • Use ao CLI first - semantic search is better
  • Fall back to grep - if ao not available
  • Read full files - don't just report matches
  • Synthesize - combine findings into useful answer

Example Queries

/knowledge authentication    # Find auth-related learnings
/knowledge "rate limiting"   # Find rate limit patterns
/knowledge kubernetes        # Find K8s knowledge
/knowledge "what do we know about caching"

Examples

Finding Past Learnings

User says: /knowledge "error handling patterns"

What happens:

  1. Agent tries ao search "error handling patterns", finds 3 matches
  2. Agent searches .agents/learnings/ with grep, finds 5 additional matches
  3. Agent searches .agents/patterns/ for related patterns, finds 2 matches
  4. Agent reads all matched files using Read tool
  5. Agent synthesizes findings into coherent response
  6. Agent reports: "We have 5 learnings about error handling: L1 (always wrap errors), L3 (use typed errors), L12 (log before returning), L15 (context propagation), L22 (retry with backoff)"
  7. Agent provides links to source files and confidence level: high (multiple confirmations)

Result: Complete knowledge synthesis with 5 specific learnings and 2 related patterns, all with source citations.

Querying Without ao CLI

User says: /knowledge "database migrations"

What happens:

  1. Agent tries ao search, command not found
  2. Agent falls back to grep search across .agents/ directories
  3. Agent finds 2 matches in learnings, 1 in research, 0 in patterns
  4. Agent reads matched files
  5. Agent synthesizes: "Limited knowledge found. L8 recommends using transaction-wrapped migrations. Research doc from 2026-01-20 analyzed migration tools."
  6. Agent reports medium confidence (only 2 sources)

Result: Knowledge found despite missing ao CLI, with appropriate confidence level based on source count.

Troubleshooting

ProblemCauseSolution
No results foundQuery too specific or knowledge not yet capturedBroaden search terms. Try synonyms. Check if topic was covered in recent work but retro not yet run. Suggest running /retro to extract recent learnings.
Too many results (overwhelming)Very broad query termNarrow query with more specific terms. Filter by date: search only recent learnings. Use semantic search (ao CLI) for better ranking if available.
Results lack contextGrep matches found but files don't address queryRead full files, not just matching lines. Synthesize from surrounding context. May need to trace back to original research with /trace.
Confidence level unclearMixed or contradictory sourcesReport conflicting information explicitly. Note which sources agree/disagree. Suggest running /research to investigate further if critical.

FAQ

What does the knowledge skill do?

Query knowledge artifacts across all locations. Triggers: "find learnings", "search patterns", "query knowledge", "what do we know about", "where is the plan".

How do I install knowledge?

Run npx skills add https://github.com/boshu2/agentops --skill knowledge in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/knowledge/ (personal) or .claude/skills/knowledge/ (project).

Which AI agents can use knowledge?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is knowledge safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains knowledge?

It is published by boshu2 in boshu2/agentops. It has 164 recorded installs.

More from boshu2/agentops

View all →

council

boshu2/agentops

Compare independent opinions from several models or contexts without inflating agreement. Use when: wanting a second opinion or debate, or summarizing several reviewers' results.

3K installs

doc

boshu2/agentops

Write source-checked docs, READMEs, change descriptions and handoffs. Use when: documenting a change, leaving or resuming a handoff, or drafting a questionnaire for someone else.

research

boshu2/agentops

Answer one cited question on code, history, claims or patterns. Use when: asked how it works, why it changed, if a claim or done/shipped report holds, or a pattern warrants a rule.

plan

boshu2/agentops

Shape a request into one end-to-end slice with observable behavior; review write scope and reversible decisions. Use when: planning, breaking down or scoping a change.

swarm

boshu2/agentops

Dispatch explicit disjoint packets exactly once through a caller-selected executor. Triggers: "swarm", "dispatch disjoint packets", "parallel explicit tasks".

1.5K installs

rpi

boshu2/agentops

Drive one accepted change through implementation and checks to done, with one fresh review only where a mistake is costly. Use when: asked to run or orchestrate work through RPI.

Popular code quality & workflow skills

View category →

grill-me

mattpocock/skills

A relentless interview to sharpen a plan or design.

Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

handoff

mattpocock/skills

Compact the current conversation into a handoff document for another agent to pick up.

domain-modeling

mattpocock/skills

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

codebase-design

mattpocock/skills

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

diagnosing-bugs

mattpocock/skills

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.