knowledge-capture
Skill0 starsChanged 5 months agoMITView on GitHub
Capture and persist knowledge from a resolved incident, troubleshooting session, or RCA into the agent's context — so the next SRE who faces the same problem benefits immediately. This is the closing step of every incident and troubleshooting session. It converts ephemeral knowledge (in someone's head or a Slack thread) into durable, searchable, agent-readable context. Trigger keywords: save this, remember this fix, update the runbook, capture this, add to knowledge base, document what we found, don't want to lose this, next time this happens, update agent context, this happened before, same issue again, knowledge capture, close out incident.
9 other projects use a version of this.
Adopted by
Most recently taken up by
- tderoussel/agent-skillstheir own version, first seen Nov 1, 2026
- ravidsrk/agent-skillstheir own version, first seen Nov 1, 2026
- NoobyGains/godmodetheir own version, first seen Nov 1, 2026
- NashEQify/forgetheir own version, first seen Oct 25, 2026
- ARCASSystems/FounderOStheir own version, first seen Oct 24, 2026
- hangljoe/AI-PreSales-Skillstheir own version, first seen Sep 28, 2026
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- NoobyGains/godmode★ 118same name
- basicmachines-co/basic-memory-plugins★ 9same name
- bordenet/superpowers-plus★ 8same name
- ARCASSystems/FounderOS★ 7same name
- Empty8492/knowledge-capture★ 2same name
- NashEQify/forge★ 2same name
- hangljoe/AI-PreSales-Skills★ 1same name
- ravidsrk/agent-skills★ 1same name
- tderoussel/agent-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- capacity-planningSkill
- chaos-engineeringSkill
- cost-optimizationSkill
- deployment-safetySkill
- iac-reviewSkill
- import-rcaSkill
- incident-responseSkill
- observabilitySkill
- oncall-handoffSkill
- oncall-runbookSkill
- postmortemSkill
- production-readiness-reviewSkill
- rca-summarySkill
- rfcSkill
- root-cause-analysisSkill
- runbook-generatorSkill
- security-postureSkill
- slo-monitoringSkill
- toil-trackingSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 6 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
Before loading context files, check if context/CONTEXT.md exists in the current directory.
- Distinctive: line 31
Use the answers inline for this session.
- Distinctive: line 39
Every resolved incident contains knowledge.
- Distinctive: line 75
If a runbook exists, update it with:
- Very specific: line 152
If a new runbook was created, add it to skills/oncall-runbook/references/alert-catalog.md:
- Distinctive: line 163
If the incident could have been caught earlier, propose concrete alert improvements:
- Distinctive: line 226
Run knowledge-capture at the end of EVERY incident, even P2s and false positives.
- Distinctive: line 229
Do not wait for the postmortem to capture knowledge.
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Knowledge Capture Skill
Setup Check
Before loading context files, check if context/CONTEXT.md exists in the current directory.
If context/CONTEXT.md exists — read it and proceed normally.
If context/CONTEXT.md does not exist — this skill was installed standalone (e.g. via npx skills add). Ask the user these questions before proceeding:
- Role —
junior-sre/senior-sre/sre-manager(shapes output depth and tone) - Cloud provider —
aws/gcp/azure/on-prem/hybrid - Observability stack — e.g. Datadog, Prometheus+Grafana, New Relic
- Company name and primary services affected (if relevant to this task)
Use the answers inline for this session. For persistent setup across all skills, suggest:
pipx install sre-agent
sre-agent initPurpose
Every resolved incident contains knowledge. This skill ensures that knowledge is structured and stored so that:
- The agent can use it immediately in future similar incidents.
- Any SRE — junior or senior, new or experienced — gets the same quality of guidance.
- The team is not dependent on any one person's memory.
Instructions
Step 1: Identify What Was Learned
At the end of any troubleshooting session or incident, ask the user:
- "What was the actual root cause?" (even if different from initial hypothesis)
- "What was the fix that worked?"
- "What did we try first that did NOT work?"
- "Was there anything in the runbook that was wrong or missing?"
- "Is there a signal we could have caught this earlier? (metric, log pattern, alert)"
- "Would you recognize this faster next time? What would you look for?"
These six questions extract the knowledge that usually stays in someone's head.
Step 2: Classify the Knowledge Type
Determine which knowledge artifacts need to be created or updated:
| Type | When to create/update | File location |
| Runbook update | Fix or triage steps changed | skills/oncall-runbook/references/<service>-<alert>.md |
| New runbook | No runbook existed for this failure mode | skills/oncall-runbook/references/<service>-<alert>.md + update alert-catalog.md |
| Failure pattern | New failure mode discovered for a service | skills/knowledge-base/patterns/<service>-<failure-mode>.md |
| Diagnostic shortcut | Found a faster way to diagnose | Add to runbook triage steps |
| False positive note | Alert fired but was not a real incident | Add to runbook "known issues" section |
| Company context update | Tech stack changed, severity levels updated | context/company/ files |
Step 3: Update the Runbook
If a runbook exists, update it with:
Add to triage steps (if a faster diagnostic was found):
### [NEW] Step X: Check <specific thing> first
This was identified in the 2024-01-15 incident as the fastest signal.
```bash
<command that surfaces the issue in < 30 seconds>Expected: <what to look for>
**Add to "What did NOT work"** (prevents future SREs from wasting time):
```markdown
## Dead Ends (do not repeat these)
- **Restarting the pod** does not help — the issue is in the DB, not the application.
Discovered: 2024-01-15 incident. Added by: SRE team.
- **Scaling up replicas** makes it worse — more pods = more connections = faster exhaustion.Add to "Known issues / False positives":
## Known False Positives
- This alert fires during scheduled batch jobs between 02:00–03:00 UTC.
Check job schedule before paging secondary. Discovered: 2024-02-01.Update "How we detect it faster next time":
## Early Warning Signals (catch this before it pages)
- DB connection count climbing above 70% of pool limit → investigate before it pages
Metric: <metric name and query>
Threshold: add alert at 75% (P2) and 90% (P1)Step 4: Create a Failure Pattern Entry
For novel failure modes, create a structured pattern entry:
File: skills/knowledge-base/patterns/<service>-<failure-mode>.md
# Failure Pattern: <Service> — <Failure Mode>
**First observed:** YYYY-MM-DD
**Times seen:** 1
**Last seen:** YYYY-MM-DD
**Related incidents:** [links or incident IDs]
## Signature
How to recognize this failure mode when you see it:
- Observable symptom: <what metrics/logs show>
- Typical trigger: <what usually causes it>
- Time of day pattern: <if any>
- Traffic pattern correlation: <if any>
## Fastest Diagnostic Path
1. Check <X> → if you see <Y>, this is the pattern
2. Confirm by checking <Z>
Total time to confirm: ~X minutes
## Fix
<what actually resolves it — specific commands or steps>
## Why It Happens
<brief technical explanation — enough to understand, not a full postmortem>
## Prevention
<what would prevent this from happening or being caught earlier>
## Dead Ends
- Do NOT try <X> — it does not help because <reason>
## Notes
<anything else worth knowing — edge cases, variations, related failure modes>Step 5: Update the Alert Catalog
If a new runbook was created, add it to skills/oncall-runbook/references/alert-catalog.md:
## <Service Name>
- Alert: <alert-name>
Runbook: skills/oncall-runbook/references/<file>.md
Severity: P<N>
Last updated: YYYY-MM-DD
Notes: <any important context about this alert>Step 6: Propose Early Warning Improvements
If the incident could have been caught earlier, propose concrete alert improvements:
Early warning gap identified:
Current detection: PagerDuty fired at 90% connection pool utilization
Could have been: P2 alert at 70% would give 15 extra minutes of lead time
Proposed new alert:
Metric: db_connection_pool_utilization
Threshold: > 70% for 5 minutes → P2 (no page, Slack only)
Threshold: > 85% for 2 minutes → P1 (page primary)
Add to: skills/observability/ alert recommendationsStep 7: Confirm and Commit
Show the user a summary of all knowledge updates made:
Knowledge capture complete for: [Incident Name]
Updated:
✓ skills/oncall-runbook/references/postgresql-connection-exhaustion.md
- Added "scaling replicas makes it worse" dead end
- Added early warning signal at 70% pool utilization
- Updated triage step 2 with faster diagnostic command
Created:
✓ skills/knowledge-base/patterns/postgres-connection-exhaustion.md
- New failure pattern documented with full signature
Catalog:
✓ alert-catalog.md updated
Next recommended action:
- Add a P2 alert at 70% connection pool utilization (see above)
- Propose an RFC for connection pooler (PgBouncer) to prevent recurrenceThe Compounding Effect
Each captured incident makes the agent more useful for the next one:
Incident 1: SRE spends 47 min, no runbook
→ knowledge-capture runs → runbook created
Incident 2 (3 months later, different SRE): same failure mode
→ agent finds the runbook → resolution in 12 min
→ knowledge-capture adds "false positive at 02:00 UTC" finding
Incident 3 (6 months later, junior SRE, 2am): same failure mode
→ agent finds runbook + false positive note → "is this the batch job window?"
→ checks → confirms false positive → no incident → 3 minThe knowledge stays even when the SRE who discovered it leaves.
Guidelines
- Run knowledge-capture at the end of EVERY incident, even P2s and false positives. False positives are especially valuable — they prevent future unnecessary pages.
- "Dead ends" are as valuable as the fix. Future SREs waste time on the same wrong paths.
- Do not wait for the postmortem to capture knowledge. Do it while the incident is fresh. The postmortem is the formal document; this is the operational knowledge.
- A 5-minute knowledge capture prevents a 47-minute incident next time.
Importing Historical RCAs
This skill captures knowledge from incidents that just happened. If your team has an
existing bank of RCAs written before the agent was set up, use the import-rca skill
instead — it accepts any RCA format (Google SRE, Atlassian, PagerDuty, Confluence, or
free-form) and converts them into knowledge-base patterns in bulk.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

