
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- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads knowledge automatically when relevant.
- 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:
- Summary of findings
- Key learnings (with IDs)
- Relevant patterns
- Links to source files
- Confidence level (how much we know)
Knowledge Locations
| Type | Location | Format |
|---|---|---|
| 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:
- Agent tries
ao search "error handling patterns", finds 3 matches - Agent searches
.agents/learnings/with grep, finds 5 additional matches - Agent searches
.agents/patterns/for related patterns, finds 2 matches - Agent reads all matched files using Read tool
- Agent synthesizes findings into coherent response
- 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)"
- 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:
- Agent tries
ao search, command not found - Agent falls back to grep search across
.agents/directories - Agent finds 2 matches in learnings, 1 in research, 0 in patterns
- Agent reads matched files
- Agent synthesizes: "Limited knowledge found. L8 recommends using transaction-wrapped migrations. Research doc from 2026-01-20 analyzed migration tools."
- Agent reports medium confidence (only 2 sources)
Result: Knowledge found despite missing ao CLI, with appropriate confidence level based on source count.
Troubleshooting
| Problem | Cause | Solution |
|---|---|---|
| No results found | Query too specific or knowledge not yet captured | Broaden 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 term | Narrow query with more specific terms. Filter by date: search only recent learnings. Use semantic search (ao CLI) for better ranking if available. |
| Results lack context | Grep matches found but files don't address query | Read full files, not just matching lines. Synthesize from surrounding context. May need to trace back to original research with /trace. |
| Confidence level unclear | Mixed or contradictory sources | Report 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
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.
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".
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
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
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.