Knowledge ops

From brucesongs/kali-claw · View interactive version

Knowledge ops is an AI agent skill from the GitHub repository brucesongs/kali-claw. Build and maintain structured, persistent knowledge graphs across sessions. Knowledge-ops transforms ephemeral session findings into reusable intelligence — connecting entities, tracking confidence over time, and enabling recall across engagements.

How to use this skill

Skill file

Knowledge Operations (knowledge-ops)

Summary

Knowledge-ops transforms ephemeral session findings into reusable intelligence — connecting entities, tracking confidence over time, and enabling recall across engagements.

Domain: knowledge

Skill Identity

| Attribute | Value |

|-----------|-------|

| Domain | Knowledge Operations |

| Skill ID | knowledge-ops |

| Version | 1.0.0 |

| Hacker Laws | Law 3 (Intelligence Over Force), Law 8 (Learn from Every Operation), Law 9 (Systematic Over Random) |

| Related Skills | codebase-onboarding, deep-research, social-intelligence |

Purpose

Build and maintain structured, persistent knowledge graphs across sessions. Knowledge-ops transforms ephemeral session findings into reusable intelligence — connecting entities, tracking confidence over time, and enabling recall across engagements.

Without knowledge-ops, every session starts from zero. With it, each session builds on the last.

Core Concepts

Knowledge Unit

The atomic element of the knowledge graph. Each unit contains:

{
  "id": "KU-2026-05-001",
  "type": "finding | entity | relationship | pattern | hypothesis",
  "created": "2026-05-11",
  "updated": "2026-05-11",
  "confidence": 78,
  "tags": ["auth", "JWT", "CVE"],
  "content": "The auth service uses HS256 with a static secret in config.go:45",
  "source": "codebase-onboarding:auth-service",
  "linked_to": ["KU-2026-04-012", "KU-2026-05-003"],
  "expires": null
}

Knowledge Graph

A network of linked knowledge units. Relationships between units reveal:

Knowledge Base

A collection of knowledge graphs organized by domain (target, technology, vulnerability type). Stored in the memory/ directory as markdown files with structured frontmatter.

Knowledge Types

| Type | Description | Example |

|------|-------------|---------|

| entity | A person, system, domain, IP, org | target.com, admin@target.com, 192.168.1.1 |

| finding | A discovered fact about a target | SQL injection in search endpoint |

| relationship | Link between two entities | User X administers System Y |

| pattern | Recurring vulnerability or behavior | This org consistently uses outdated JWT libs |

| hypothesis | Unconfirmed, needs validation | Admin portal may be accessible via VPN bypass |

| intelligence | Aggregated, analyzed insight | Target org has poor patch management practices |

Methodology

Phase 1: Capture

Extract knowledge units from session outputs:

Phase 2: Structure

Assign type, tags, confidence, and links to each unit. Establish relationships between related units.

Phase 3: Store

Write structured units to the appropriate memory file. Follow the naming convention: memory/YYYY-MM-DD-[topic].md.

Phase 4: Retrieve

At session start, query the knowledge base for relevant units. Use tags, entity names, and linked IDs to surface prior context.

Phase 5: Maintain

Update confidence scores as findings are confirmed or refuted. Mark expired intelligence. Remove stale hypotheses that were disproven.

Confidence Model

Confidence scores represent certainty about a knowledge unit:

| Score | Meaning | Action |

|-------|---------|--------|

| 0–25 | Speculation — no evidence | Label as hypothesis |

| 26–50 | Unconfirmed — single source | Needs validation |

| 51–75 | Probable — multiple consistent signals | Use with caution |

| 76–90 | High confidence — independently confirmed | Act on it |

| 91–100 | Verified — demonstrated/exploited | Treat as fact |

Confidence is not static. Update it when:

Storage Format

Knowledge File Template

---
id: KU-[YYYY]-[MM]-[NNN]
type: [finding|entity|relationship|pattern|hypothesis|intelligence]
target: [target name or scope]
confidence: [0-100]
created: [YYYY-MM-DD]
updated: [YYYY-MM-DD]
tags: [tag1, tag2, tag3]
linked: [KU-ID-1, KU-ID-2]
source: [skill that produced this]
expires: [YYYY-MM-DD or null]
---

## Detail

[Full context, evidence, commands used, observed behavior]

## Connections

- **Confirms**: [what this validates]
- **Contradicts**: [what this disproves]
- **Leads to**: [next investigation or action]

## Confidence History

| Date | Score | Reason |
|------|-------|--------|
| [date] | [score] | [why this score] |

Use Cases

  1. Target Intelligence Accumulation: Track everything learned about a target across multiple sessions
  2. Vulnerability Pattern Tracking: Recognize when the same weakness appears in different systems
  3. Cross-Engagement Intelligence: Identify recurring patterns across different targets (org-level behavior)
  4. Pentest Report Preparation: Aggregate structured findings for final report generation
  5. Knowledge Handoff: Pass complete context to another session or team member

Detection Methods

Knowledge Base Audit

SIEM Detection Rules

Defense Evasion Techniques

Knowledge Base Exfiltration Stealth

Vector Store Poisoning Stealth

Integration

Hacker Laws Alignment

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.