| name | ksb-framework |
| version | 1.0.1 |
| compliance-level | gold |
| categories | ["decision-framework","infrastructure","learning"] |
| description | Auto-apply Knowledge-Skills-Behaviors framework to guide Claude's reasoning |
| user-invocable | true |
| context | inject |
| triggers | ["/ksb","ksb","apply ksb","use framework","review with ksb","ksb check","growth protocol"] |
| adjacencies | [{"target":"smart-goal","when":"planning","weight":0.8,"action":"Plan learning"},{"target":"lexicon-builder","when":"execution","weight":0.7,"action":"Build domain lexicon"}] |
KSB Framework Skill
Systematically apply the Knowledge-Skills-Behaviors framework to ensure Claude operates at peak effectiveness.
Quick Reference
Before Starting Work
┌─────────────────────────────────────────────────────────────┐
│ 1. SCOPE HAMMER: What's the minimum viable solution? │
│ 2. BUILD VS WRAP: Should I use a library? │
│ 3. DOMAIN VALUE CHECK: Existing constants to use? │
│ 4. CORNELIUS CHECK: Foundation or Leaf code? │
└─────────────────────────────────────────────────────────────┘
While Working
┌─────────────────────────────────────────────────────────────┐
│ 1. PROFESSIONAL OBJECTIVITY: Be direct, not sycophantic │
│ 2. SOCRATIC EXPLORATION: Ask when unclear │
│ 3. KISS: Keep it simple │
│ 4. FIRST PRINCIPLES: Challenge assumptions │
└─────────────────────────────────────────────────────────────┘
When Writing Code
┌─────────────────────────────────────────────────────────────┐
│ PATTERNS TO APPLY: │
│ • Guard Clauses: Exit early for failures │
│ • Error Handling: Catch specific, preserve context │
│ • Public API: Expose through __init__.py │
│ • UACA: Respect L1-L5 hierarchy │
│ │
│ ANTI-PATTERNS TO AVOID: │
│ • Magic Numbers: Use named constants │
│ • Premature Abstraction: Rule of Three │
│ • God Objects: Single responsibility │
└─────────────────────────────────────────────────────────────┘
When Testing
┌─────────────────────────────────────────────────────────────┐
│ • AAA: Arrange-Act-Assert structure │
│ • Test-First Debugging: Write failing test before fix │
│ • Property Testing: For pure functions with invariants │
└─────────────────────────────────────────────────────────────┘
When Reviewing
┌─────────────────────────────────────────────────────────────┐
│ CORNELIUS ROBINSON LENS: │
│ 1. Foundation or Leaf? │
│ 2. If Foundation: Robust? Documented? Tested? Decoupled? │
│ 3. Trapped potential hiding inside? │
│ 4. Enable or Constrain future development? │
└─────────────────────────────────────────────────────────────┘
After Completing
┌─────────────────────────────────────────────────────────────┐
│ SUCCESS? → PATTERN EXTRACTION │
│ • What worked well? │
│ • Can this be abstracted? │
│ • Create new KSB unit? │
│ │
│ FAILURE? → PAIN BUTTON │
│ • Acknowledge the pain │
│ • 5 Whys to root cause │
│ • Knowledge, Skill, or Behavior gap? │
│ • Create preventive KSB unit │
└─────────────────────────────────────────────────────────────┘
Full Checklist Mode
When invoked with /ksb check, run through this complete checklist:
Pre-Task Checklist
During-Task Checklist
Post-Task Checklist
NexVigilant-Specific Checks
When working on pharmacovigilance code:
Location Reference
| Category | Path |
|---|
| Principles | ~/.claude/knowledge/principles/ |
| Code Patterns | ~/.claude/knowledge/patterns/code/ |
| Testing Patterns | ~/.claude/knowledge/patterns/testing/ |
| Debugging Patterns | ~/.claude/knowledge/patterns/debugging/ |
| Anti-Patterns | ~/.claude/knowledge/anti-patterns/ |
| PV Domain | ~/.claude/knowledge/domains/pharmacovigilance/ |
| Decision Frameworks | ~/.claude/behaviors/decision-frameworks/ |
| Review Lenses | ~/.claude/behaviors/review-lenses/ |
| Communication | ~/.claude/behaviors/communication-styles/ |
| Growth Protocols | ~/.claude/behaviors/growth-protocols/ |
Usage
/ksb - Show quick reference
/ksb check - Run full checklist
/ksb pain - Trigger Pain Button protocol
/ksb extract - Trigger Pattern Extraction
/ksb review - Apply Cornelius Robinson lens
Execution Output (REQUIRED)
Protocol Reference: ~/.claude/behaviors/skill-execution-transparency.md
Pre-Flight Block
## KSB Framework Executing...
### Pre-Flight
**Working directory:** {clean/dirty - from git status}
**Branch:** {current branch}
**Blockers:** {none/list any blocking issues}
**Selected:** {ksb | ksb check | ksb pain | ksb extract | ksb review}
**Rationale:** {Why this mode was selected}
Progress Reporting
| Signal | Meaning | When to Use |
|---|
| GREEN | Success | Check passed |
| YELLOW | Warning | Check passed with notes |
| RED | Failure | Check failed |
| WHITE | Info | Informational |
Example (ksb check):
GREEN M1: Pre-Task - Scope defined, libraries evaluated
GREEN M2: During-Task - KISS applied, patterns followed
YELLOW M3: Post-Task - Tests exist but edge cases need attention
GREEN M4: NexVigilant Checks - Signal thresholds from constants
Completion Block
---
**Completed:** KSB checklist complete
**Artifacts:** Checklist results displayed
**Next:** Execute with /proceed, frame goal with /smart-goal, or review with /sentinel
Post-Skill Navigation (MANDATORY)
After the Completion Block, Claude calls the skill router to generate dynamic "What's Next?" navigation:
python3 ~/.claude/skills/skill-navigator/scripts/skill_router.py \
--skill ksb-framework --context {success|needs_review|needs_execution}
Protocol Reference: ~/.claude/behaviors/post-skill-navigation.md
This generates context-aware recommendations based on skill-graph.yaml. Do NOT hardcode navigation blocks.
Keep Moving Forward.