From liteharness
Reverse-engineer any codebase, plugin, or repo into an evidence-first case study with file:line citations for every claim. Pattern extraction for future reference — not a bug hunt.
How this skill is triggered — by the user, by Claude, or both
Slash command
/liteharness:ls-casestudyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate a detailed, evidence-backed case study of a codebase, plugin, repo, or system. Every claim must cite a file path and line number. This is pattern extraction for future reference — not a bug hunt, not a review.
Generate a detailed, evidence-backed case study of a codebase, plugin, repo, or system. Every claim must cite a file path and line number. This is pattern extraction for future reference — not a bug hunt, not a review.
The user provides one or more of:
If no intent is stated, ask: "What are you building that this case study should inform?"
Dispatch 2-3 polymathic scouts (Haiku, read-only) in parallel to gather raw evidence:
Scout 1 — Structure Mapper:
Glob for all source files. Read build configs, manifests, plugin descriptors (.uplugin, package.json, pyproject.toml, Cargo.toml, etc.). Map the dependency graph. Report: file counts, module structure, entry points, dependency list. Every finding = file:line.
Scout 2 — API Surface Scanner:
Grep for public interfaces, exported functions, class declarations, route handlers, IPC handlers, event emitters. Report: public API surface with file:line for each entry point. Identify the core patterns (subsystem, singleton, event bus, async action, etc.).
Scout 3 — Flow Tracer (if the system has runtime behavior):
Trace the primary flow: startup → initialization → main loop → shutdown. Identify entry points, lifecycle hooks, configuration loading, error handling patterns. Report each step with file:line evidence.
Synthesize scout reports into a structured case study document. Follow this format exactly:
# Case Study: [System Name] Patterns for [Target Application]
Intent
- This is a case study of [system], written as a pattern reference for [future use].
- [Scope exclusions if any].
Scope and evidence sources
- [file:line] — [short note about what this line tells us]
- [file:line] — [short note]
- ... (every evidence source listed upfront)
Evidence glossary
- Each evidence line includes a short note about the referenced line and, when it starts a block, a brief description of what the following lines do.
---
## 1) [Category name] ([what it tells us])
- [Claim with plain language explanation]. Evidence: [file:line], [file:line]
- [Next claim]. Evidence: [file:line]
## 2) [Next category]
...
## N) [Target application] design notes (adaptation guidance)
These are recommendations based on the observed patterns above, not requirements.
- [Recommendation based on evidence]
- [Pattern takeaway for the target application]
Choose categories based on what the system actually does. Common categories:
| Category | When to use |
|---|---|
| Plugin/module framing | Always — what is this thing? |
| UX entry points | If it has a UI surface |
| Core components | Always — the main classes/modules and their roles |
| Data flow / lifecycle | If it has runtime behavior |
| Configuration | If it has settings/config files |
| API surface | If it exposes APIs (REST, IPC, JS bridge, etc.) |
| Error handling | If it has a distinct error strategy |
| Credential/auth model | If it handles secrets or auth |
| Streaming/async patterns | If it does async work or streaming |
| Provider/adapter pattern | If it supports multiple backends |
| Persistence | If it stores data |
| Testing patterns | If it has tests worth studying |
Don't force categories that don't apply. 4-8 sections is typical.
The final section maps observed patterns to the target application. These are recommendations, not requirements. Frame them as:
Save the case study to one of:
Docs/CaseStudies/[SystemName]_CaseStudy_[Target].md (if inside a project)<your-project-dir>/docs/case-studies/[slug].md (if saving to a specific project)Before delivering, verify:
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub ahostbr/liteharness-plugin --plugin liteharness