.claude/skills/lisa-learn/SKILL.md
This skill should be used when analyzing a downstream project's git diff after Lisa was applied to identify improvements that should be upstreamed back to Lisa templates. It validates the environment, captures the diff, correlates changes with Lisa template directories, categorizes each change, and offers to upstream improvements.
npx skillsauth add codyswanngt/lisa lisa-learnInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Analyze the git diff in a downstream project after Lisa was applied. Identify improvements the project had that Lisa overwrote, potential breakage, safe overrides, and neutral changes. Offer to upstream improvements back to Lisa templates.
This completes a feedback loop: /lisa-integration-test applies and verifies, /lisa-learn analyzes the transition for upstream opportunities, and /lisa-review-project compares static drift.
This skill must be run FROM the Lisa repository directory. The target project must have Lisa applied and have uncommitted changes from a recent Lisa run.
Confirm running from Lisa by checking for src/core/lisa.ts.
This command must be run FROM the Lisa repository.
Current directory does not contain src/core/lisa.ts.
Usage: /lisa-learn /path/to/target-project
Extract project path from $ARGUMENTS. If not provided, ask the user:
Which project would you like to analyze?
Path: [user provides path]
Validate the project path:
package.json for Node-based projects, bin/rails or config/application.rb for Rails projects)Check the project has uncommitted changes: git -C <project-path> status --porcelain
No uncommitted changes found in the project.
Run `bun run dev <project-path>` first, then re-run /lisa-learn to analyze what changed.
Detect project types by checking the project filesystem:
cdk.json exists OR aws-cdk in package.json dependenciesnest-cli.json exists OR @nestjs in package.json dependenciesapp.json exists OR eas.json exists OR expo in package.json dependenciestsconfig.json exists OR typescript in package.json dependenciesbin/rails exists OR config/application.rb existspackage.json without "private": true AND has main, bin, exports, or filesBuild the type hierarchy. Example: if expo detected, types = [all, typescript, expo]
[all]Build the file map by scanning Lisa's template directories:
{type}/copy-overwrite/, {type}/copy-contents/, {type}/create-only/{ [relativePath]: { strategy, sourceTemplate } }Run these commands against the project:
git -C <project-path> diff — full diff for modified tracked filesgit -C <project-path> diff --stat — summary of changesgit -C <project-path> status --porcelain — identify new/untracked files (?? prefix) and modified files (M prefix)Store the full diff output and the list of changed files for analysis.
For each file that appears in the git diff or status output:
{ file, strategy, sourceTemplate, diff }Categorize each changed file based on its strategy and the nature of the diff:
| Category | Meaning | Action | |----------|---------|--------| | Upstream Candidate | Project had something better that Lisa overwrote | Offer to upstream | | Potential Breakage | Lisa's change might break the project | Warn user | | Safe Override | Lisa's update is correct, project was outdated | No action needed | | Neutral Change | Cosmetic/formatting differences | Skip |
Analysis rules by strategy:
copy-overwrite files (primary targets for learning):
- lines = project's old version (what was there before Lisa), + lines = Lisa's replacement- lines) represents an improvement over Lisa's version:
+ lines) might break the project:
copy-contents files:
+ lines (additions are safe, they're new content Lisa added)merge / package-lisa files (e.g., package.json):
create-only files:
Collateral changes (not in file map):
Ask the user if they want to run verification checks:
Would you like to run typecheck/lint/test on the project to detect breakage?
1. Yes — run all checks
2. No — skip verification
If yes:
bun.lockb → bunpnpm-lock.yaml → pnpmyarn.lock → yarnpackage-lock.json → npmcd <project-path> && <pm> run typecheckcd <project-path> && <pm> run lintcd <project-path> && <pm> run testCreate a markdown report:
# Lisa Learn Report
**Lisa Directory:** {lisa-path}
**Target Project:** {project-path}
**Project Types:** {types}
**Project Name:** {from package.json name or directory basename}
**Generated:** {current date/time ISO}
## Summary
- **Total files changed:** X
- **Upstream Candidates:** X
- **Potential Breakage:** X
- **Safe Overrides:** X
- **Neutral Changes:** X
- **Collateral Changes:** X
## Upstream Candidates
These files had improvements that Lisa overwrote. Consider adopting them back into Lisa templates.
### {relative/path/to/file}
**Source Template:** {type}/copy-overwrite/{path}
**Strategy:** copy-overwrite
<details>
<summary>View diff (- = project's version, + = Lisa's version)</summary>
\`\`\`diff
{diff output}
\`\`\`
</details>
**Analysis:** {Why the project's version was better and what should be upstreamed}
---
[Repeat for each upstream candidate]
## Potential Breakage
These changes might break the project. Review carefully.
### {relative/path/to/file}
**Source Template:** {type}/copy-overwrite/{path}
**Strategy:** copy-overwrite
<details>
<summary>View diff</summary>
\`\`\`diff
{diff output}
\`\`\`
</details>
**Risk:** {What might break and why}
---
[Repeat for each potential breakage]
## Safe Overrides
These are correct template updates where Lisa's version is an improvement over the project's outdated version.
<details>
<summary>X files safely updated</summary>
- {file1} — {brief reason}
- {file2} — {brief reason}
</details>
## Neutral Changes
<details>
<summary>X files with cosmetic/formatting differences</summary>
- {file1}
- {file2}
</details>
## Collateral Changes
Files not managed by Lisa that were affected:
- {file1} — {brief description}
For each Upstream Candidate, offer to copy the project's pre-Lisa version back into the corresponding Lisa template:
I found X upstream candidates. Would you like to upstream any improvements back to Lisa?
[List files with brief descriptions]
Options:
1. Upstream all candidates
2. Select specific files to upstream
3. Review candidates in detail first
4. Skip — no changes to Lisa
If the user wants to upstream:
git -C <project-path> show HEAD:<relativePath>
{relativePath} to {sourceTemplate}?"If any Potential Breakage items were identified, offer options:
I found X potential breakage items. How would you like to handle them?
Options:
1. Fix in Lisa templates (upstream the fix)
2. Fix in project local overrides (*.local.* files)
3. Review each breakage item
4. Skip — handle manually later
For option 1 (fix upstream): Analyze the breakage, determine the fix, apply it to the Lisa template, and report.
For option 2 (fix in project): Identify the appropriate local override file (e.g., tsconfig.local.json, eslint.config.local.ts, vitest.config.local.ts, jest.config.local.ts) and apply the fix there.
git -C <project-path> show HEAD:<path> to get the committed version before Lisa's uncommitted changesexpo/copy-overwrite/, upstream there, not to all/copy-overwrite/all/copy-overwrite/documentation
Onboard a user to the project via its LLM Wiki. Interviews the user about themselves in relation to the project, captures that to project-scoped memory only, then gives a guided tour of what the project is and sample questions they can ask. Use when someone is new to the project or asks to be onboarded. Read-mostly — it does not open PRs or write PII into the wiki.
documentation
Migrate an existing, hand-rolled wiki implementation onto the lisa-wiki kernel — phased and compatibility-first, with a strict no-loss guarantee. Use when adopting lisa-wiki in a repo that already has its own wiki/, ingest skills, docs, or roles. Renaming things into the canonical shape is fine; losing functionality or data is not. Ends by running /doctor.
development
Health-check the LLM Wiki. Reports orphan pages, contradictions, stale claims, broken internal links, missing index/log coverage, structure-manifest violations, and secret/tenant leaks. Use periodically or before hardening a wiki. Read-only — it reports findings, it does not fix them.
testing
Ingest source material into the LLM Wiki. With an argument (URL, file path, or prompt) it ingests that one source; with no argument it runs a full ingest across every enabled non-external-write source. Routes to the right connector, then runs the ordered pipeline (source note → synthesis → index → log → verify → state → commit/PR). Use whenever new knowledge should enter the wiki.