.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/development
Prepare a machine — a fresh laptop or a throwaway container — to run coding agents, before any repository exists. Detects which of Lisa's supported agents (Claude Code, Codex, Cursor, OpenCode, Antigravity, Copilot) are already installed, asks which credential manager the machine uses (Bitwarden, 1Password, Doppler, Vault, AWS, or none), and installs only what is missing, each by its vendor's own preferred method. Idempotent, headless by default, and emits a Dockerfile for a spin-up/spin-down environment. Run it on a new machine, in a container, or before cloning anything.
tools
Provision and verify a remote execution environment for a host project — Codex Cloud today, other remote surfaces as they are added. Generates a repository-owned setup script that installs the declared toolchain, materializes secrets through lisa-secrets-access, and runs the project's own hook. Provisions by API where one exists, by driving the vendor console where one does not, and by emitting exact config otherwise — then proves the result with the same read-back regardless of which tier did the work. Use before dispatching any work with executionEnv.
tools
Bring a developer's machine in line with the toolchain the project declares. Reports every tool in remoteEnv.tools that is missing, outdated, or unpinned for this platform, and installs the missing ones into ~/.local/bin from the same pinned, checksummed entries the remote surfaces use — but only when asked. Same manifest, same pins, same installers as lisa-setup-remote-env; what differs is consent and that the pin is a floor rather than an equality. Run it on a fresh checkout, after a manifest change, or when a tool fails at the moment of use.
tools
Route one unit of work to a remote execution surface. Reads the executionEnv parameter (local by default, codex-cloud or claude-web today), verifies the environment is provisioned and bound to this repository, submits a thin skill invocation, records the task identifier to .lisa/remote-dispatch.json, and exits without polling. Routing only — the remote runs the identical skill from the identical repository. Composable and inline: other skills invoke it via the Skill tool rather than users calling it directly.